Go to the source code of this file.
Classes | |
| struct | Interface |
| struct | InterfaceNode |
Defines | |
| #define | INTERFACE_GETLU(p, k) ((unsigned long)ATOUL(interface_get(p,k))) |
| #define | INTERFACE_GETLI(p, k) ((signed long)ATOUL(interface_get(p,k))) |
| #define | INTERFACE_GETL(p, k) INTERFACE_GETLI(p,k) |
| #define | INTERFACE_GETI(p, k) ((int)(ATOI(interface_get(p,k)))) |
| #define | INTERFACE_GETU(p, k) ((unsigned int)(ATOI(interface_get(p,k)))) |
| #define | INTERFACE_PUTLU(p, k, v) interface_put(p, k, stringf ("%lu", (unsigned long)v)) |
| #define | INTERFACE_PUTLI(p, k, v) interface_put(p, k, stringf ("%li", (long)v)) |
| #define | INTERFACE_PUTL(p, k, v) INTERFACE_PUTLI(p,k,v) |
| #define | INTERFACE_PUTI(p, k, v) interface_put(p, k, stringf ("%i", (int)v)) |
| #define | INTERFACE_PUTU(p, k, v) interface_put(p, k, stringf ("%u", (unsigned int)v)) |
Typedefs | |
| typedef void(* | InterfaceForeach )(Interface *p, InterfaceNode *inode, void *udata) |
Functions | |
| LIBGIFT_EXPORT Interface * | interface_new (char *command, char *value) |
| LIBGIFT_EXPORT void | interface_free (Interface *p) |
| LIBGIFT_EXPORT void | interface_set_command (Interface *p, char *command) |
| LIBGIFT_EXPORT void | interface_set_value (Interface *p, char *value) |
| LIBGIFT_EXPORT char * | interface_get (Interface *p, char *key) |
| LIBGIFT_EXPORT BOOL | interface_put (Interface *p, char *key, char *value) |
| LIBGIFT_EXPORT void | interface_foreach (Interface *p, char *key, InterfaceForeach func, void *udata) |
| LIBGIFT_EXPORT void | interface_foreach_ex (Interface *p, InterfaceNode *node, InterfaceForeach func, void *udata) |
| LIBGIFT_EXPORT String * | interface_serialize (Interface *p) |
| LIBGIFT_EXPORT Interface * | interface_unserialize (char *data, size_t len) |
| LIBGIFT_EXPORT int | interface_send (Interface *p, TCPC *c) |
|
|
Foreach callback for the Interface structure.
|
|
||||||||||||||||||||
|
Loop through all interface elements that exists non-recursively at the key path specified by key.
|
|
||||||||||||||||||||
|
Loop through all interface elements given an interface node as a starting point. This is useful when it is necessary to manually implement loop recursion with interface_foreach, ie, you are trying to parse all SOURCE elements for a given transfer. See interface_foreach for more details.
|
|
|
Destroy a previously created instance. |
|
||||||||||||
|
Retrieve an interface element's value given a fully qualified key path. For example, if you wanted to get the Artist meta data for a given ITEM result (once parsed), you would use:
|
|
||||||||||||
|
Create a new instance intended for manual construction (generally this is used for data delivery, instead of parsing or handling).
|
|
||||||||||||||||
|
Add an interface element (key and value set) at the specified key path. See interface_get for more information on key paths.
|
|
||||||||||||
|
Simple abstract wrapper for delivering all the contents represented by an Interface instance to an established socket connection. Basically just serializes the data and schedules for delivery.
|
|
|
Flatten a fully constructed Interface instance into a simple String object. This is used prior to network delivery of the data represented by p.
|
|
||||||||||||
|
Basic write accessor for the interface command. |
|
||||||||||||
|
Basic write accessor for the interface command's value. |
|
||||||||||||
|
Parse a serialized interface object back into the high-level structure required for the API defined here to work. This is a required step for actually handling the data received over a socket.
|
1.3.7