See:
Notes:
Go to the source code of this file.
Defines | |
| #define | CGROGGS_STAT_EDITED 0x00000001 |
| Item has been edited. | |
| #define | CGROGGS_STAT_REPLIED 0x00000002 |
| Item has had a reply. | |
Typedefs | |
| typedef cgroggs_data * | cgroggs_handle |
| Handle type. | |
| typedef cgroggs_index_data * | cgroggs_index |
| Index handle type. | |
| typedef cgroggs_item_data * | cgroggs_item |
| Item handle type. | |
Enumerations | |
| enum | cgroggs_error { cgroggs_ok = 0, cgroggs_nomem, cgroggs_lostconn, cgroggs_badresponse, cgroggs_badhost, cgroggs_syscall, cgroggs_cantconn, cgroggs_accessdenied, cgroggs_servererror, cgroggs_invalidarg, cgroggs_serverunimplemented, cgroggs_badhex, cgroggs_hextoolong, cgroggs_authfailed, cgroggs_servercompromised, cgroggs_invalidencoding, cgroggs_cannotencode, cgroggs_nosuchitem } |
| Error codes. More... | |
Functions | |
| const char * | cgroggs_strerror (cgroggs_error e) |
| Convert an error code to a string. | |
| cgroggs_error | cgroggs_new (cgroggs_handle *cp) |
| Create a new handle. | |
| void | cgroggs_destroy (cgroggs_handle c) |
| Destroy a handle. | |
| cgroggs_error | cgroggs_configure (cgroggs_handle c, const char *host, const char *port, const char *user, const char *secret, int level) |
| Configure a handle. | |
| cgroggs_error | cgroggs_connect (cgroggs_handle c) |
| Connect to server. | |
| cgroggs_error | cgroggs_disconnect (cgroggs_handle c) |
| Disconnect from server. | |
| cgroggs_error | cgroggs_alvl (cgroggs_handle c, int newlevel) |
| Change access level. | |
| cgroggs_error | cgroggs_index_fetch (cgroggs_handle c, unsigned long date, int is_sequence, cgroggs_index *indexp) |
| Fetch the index. | |
| void | cgroggs_index_destroy (cgroggs_index i) |
| Destroy an index. | |
| int | cgroggs_index_count (cgroggs_index i) |
| Count the number of items in an index. | |
| unsigned long | cgroggs_index_sequence (cgroggs_index i, int item) |
| Get an index item's sequence number. | |
| unsigned long | cgroggs_index_date (cgroggs_index i, int item) |
| Get an index item's timestamp. | |
| const char * | cgroggs_index_id (cgroggs_index i, int item) |
| Get an index item's ID. | |
| const char * | cgroggs_index_user (cgroggs_index i, int item) |
| Get an index item's user. | |
| const char * | cgroggs_index_subject (cgroggs_index i, int item) |
| Get an index item's subject. | |
| int | cgroggs_index_type (cgroggs_index i, int item) |
| Get an index item's type. | |
| cgroggs_error | cgroggs_item_fetch (cgroggs_handle c, const char *id, cgroggs_item *jp) |
| Fetch an item. | |
| void | cgroggs_item_destroy (cgroggs_item j) |
| Destroy an item handle. | |
| const char * | cgroggs_item_continued_from (cgroggs_item j) |
| Get an item's continued-from field. | |
| const char * | cgroggs_item_continued_in (cgroggs_item j) |
| Get an item's continued-in field. | |
| unsigned long | cgroggs_item_last_edit (cgroggs_item j) |
| Get an item's last-edit field. | |
| unsigned long | cgroggs_item_last_reply (cgroggs_item j) |
| Get an item's last-reply field. | |
| int | cgroggs_item_count (cgroggs_item j) |
| Get an item's reply count. | |
| unsigned long | cgroggs_item_reply_sequence (cgroggs_item j, int n) |
| Get an item reply's sequence number. | |
| unsigned long | cgroggs_item_reply_date (cgroggs_item j, int n) |
| Get an item reply's date. | |
| const char *const * | cgroggs_item_reply (cgroggs_item j, int n, int *nlinesp) |
| Get an item reply's text. | |
| cgroggs_error | cgroggs_stat (cgroggs_handle c, const char *id, char **contfromp, char **continp, unsigned long *lasteditp, unsigned long *lastreplyp, unsigned long *flagsp, char **subjectp) |
| Get item summary information. | |
| int | cgroggs_seq_lt (unsigned long a, unsigned long b) |
| Compare 32-bit sequence numbers. | |
| int | cgroggs_seq_le (unsigned long a, unsigned long b) |
| Compare 32-bit sequence numbers. | |
| int | cgroggs_seq_gt (unsigned long a, unsigned long b) |
| Compare 32-bit sequence numbers. | |
| int | cgroggs_seq_ge (unsigned long a, unsigned long b) |
| Compare 32-bit sequence numbers. | |
| cgroggs_error | cgroggs_motd (cgroggs_handle c, char ***vecp, int *nvecp, unsigned long *lastchangep, unsigned long *timestampp) |
| Retrieve server motd. | |
Variables | |
| void *(* | cgroggs_malloc )(size_t n) |
| Function used to allocate memory. | |
| void *(* | cgroggs_realloc )(void *ptr, size_t n) |
| Function used to reallocate memory. | |
| void(* | cgroggs_free )(void *) |
| Function used to free memory. | |
1.4.6