#include <cybergarage/typedef.h>
#include <cybergarage/xml/cxml.h>
#include <cybergarage/util/clist.h>
#include <cybergarage/util/cstring.h>
#include <cybergarage/upnp/cargument.h>
#include <cybergarage/upnp/cupnp_status.h>
Data Structures | |
struct | _CgUpnpAction |
Defines | |
#define | CG_UPNP_ACTION_ELEM_NAME "action" |
#define | CG_UPNP_ACTIONLIST_ELEM_NAME "actionList" |
#define | CG_UPNP_ACTION_NAME "name" |
#define | cg_upnp_action_next(action) (CgUpnpAction *)cg_list_next((CgList *)action) |
#define | cg_upnp_action_isactionnode(node) cg_xml_node_isname(node, CG_UPNP_ACTION_ELEM_NAME) |
#define | cg_upnp_action_getactionnode(action) (action->actionNode) |
#define | cg_upnp_action_setservice(action, service) (action->parentService = service) |
#define | cg_upnp_action_getservice(action) ((CgUpnpService *)action->parentService) |
#define | cg_upnp_action_setname(action, value) cg_xml_node_setchildnode(cg_upnp_action_getactionnode(action), CG_UPNP_ACTION_NAME, value) |
#define | cg_upnp_action_getname(action) cg_xml_node_getchildnodevalue(cg_upnp_action_getactionnode(action), CG_UPNP_ACTION_NAME) |
#define | cg_upnp_action_isname(action, name) cg_streq(cg_upnp_action_getname(action), name) |
#define | cg_upnp_action_getargumentlist(action) (action->argumentList) |
#define | cg_upnp_action_getarguments(action) ((CgUpnpArgument *)cg_list_next((CgList *)action->argumentList)) |
#define | cg_upnp_action_hasargumentbyname(action, name) ((cg_upnp_action_getargumentbyname(action,name) != NULL) ? TRUE : FALSE) |
#define | cg_upnp_action_setstatuscode(action, code) cg_upnp_status_setcode(action->upnpStatus, code) |
#define | cg_upnp_action_getstatuscode(action) cg_upnp_status_getcode(action->upnpStatus) |
#define | cg_upnp_action_setstatusdescription(action, value) cg_upnp_status_setdescription(action->upnpStatus, value) |
#define | cg_upnp_action_getstatusdescription(action) cg_upnp_status_getdescription(action->upnpStatus) |
#define | cg_upnp_action_setlistener(action, func) (action->listener = func) |
#define | cg_upnp_action_getlistener(action) (action->listener) |
#define | cg_upnp_action_setlistner cg_upnp_action_setlistener |
#define | cg_upnp_action_getlistner cg_upnp_action_getlistener |
#define | cg_upnp_action_setuserdata(action, value) (action->userData = value) |
#define | cg_upnp_action_getuserdata(action) (action->userData) |
#define | cg_upnp_actionlist_clear(actionList) cg_list_clear((CgList *)actionList, (CG_LIST_DESTRUCTORFUNC)cg_upnp_action_delete) |
#define | cg_upnp_actionlist_size(actionList) cg_list_size((CgList *)actionList) |
#define | cg_upnp_actionlist_gets(actionList) (CgUpnpAction *)cg_list_next((CgList *)actionList) |
#define | cg_upnp_actionlist_add(actionList, action) cg_list_add((CgList *)actionList, (CgList *)action) |
Typedefs | |
typedef struct _CgUpnpAction | CgUpnpAction |
typedef struct _CgUpnpAction | CgUpnpActionList |
typedef BOOL(* | CG_UPNP_ACTION_LISTNER )(CgUpnpAction *) |
Functions | |
CgUpnpAction * | cg_upnp_action_new () |
void | cg_upnp_action_delete (CgUpnpAction *action) |
void | cg_upnp_action_setactionnode (CgUpnpAction *action, CgXmlNode *node) |
CgUpnpArgument * | cg_upnp_action_getargumentbyname (CgUpnpAction *action, char *name) |
char * | cg_upnp_action_getargumentvaluebyname (CgUpnpAction *action, char *name) |
BOOL | cg_upnp_action_setargumentvaluebyname (CgUpnpAction *action, char *name, char *value) |
CgUpnpActionList * | cg_upnp_actionlist_new () |
void | cg_upnp_actionlist_delete (CgUpnpActionList *actionList) |
#define CG_UPNP_ACTION_ELEM_NAME "action" |
#define cg_upnp_action_getactionnode | ( | action | ) | (action->actionNode) |
Get the action's XML node (i.e. the XML representation of the action)
action | The action in question |
#define cg_upnp_action_getargumentlist | ( | action | ) | (action->argumentList) |
Get the action's list of arguments
action | The action in question |
#define cg_upnp_action_getarguments | ( | action | ) | ((CgUpnpArgument *)cg_list_next((CgList *)action->argumentList)) |
Get the first argument from the action's list of arguments. Use as the starting point in iteration loops.
action | The action in question |
#define cg_upnp_action_getlistener | ( | action | ) | (action->listener) |
Get the action's listener function
action | The action in question |
#define cg_upnp_action_getlistner cg_upnp_action_getlistener |
#define cg_upnp_action_getname | ( | action | ) | cg_xml_node_getchildnodevalue(cg_upnp_action_getactionnode(action), CG_UPNP_ACTION_NAME) |
Get the action's name
action | The action in question |
#define cg_upnp_action_getservice | ( | action | ) | ((CgUpnpService *)action->parentService) |
Get the action's parent service
action | The action in question |
#define cg_upnp_action_getstatuscode | ( | action | ) | cg_upnp_status_getcode(action->upnpStatus) |
Get the action's latest status code
action | The action in question |
#define cg_upnp_action_getstatusdescription | ( | action | ) | cg_upnp_status_getdescription(action->upnpStatus) |
Get the action's latest status description
action | The action in question |
#define cg_upnp_action_getuserdata | ( | action | ) | (action->userData) |
Get the action's arbitrary user data pointer
action | The action in question |
#define cg_upnp_action_hasargumentbyname | ( | action, | |||
name | ) | ((cg_upnp_action_getargumentbyname(action,name) != NULL) ? TRUE : FALSE) |
Find out, whether the action has an argument by the given name
action | The action in question | |
name | The name to look for |
#define cg_upnp_action_isactionnode | ( | node | ) | cg_xml_node_isname(node, CG_UPNP_ACTION_ELEM_NAME) |
Check, whether the given XML node is an action node
node | The CgXmlNode* |
#define cg_upnp_action_isname | ( | action, | |||
name | ) | cg_streq(cg_upnp_action_getname(action), name) |
Check, whether the action's name matches the one given as parameter.
action | The action in question | |
name | The name string to compare |
#define CG_UPNP_ACTION_NAME "name" |
#define cg_upnp_action_next | ( | action | ) | (CgUpnpAction *)cg_list_next((CgList *)action) |
Get the next action in a list of actions. Use as an iterator.
action | The current action |
#define cg_upnp_action_setlistener | ( | action, | |||
func | ) | (action->listener = func) |
Set the action's listener function
action | The action in question | |
func | The listener function of type: BOOL (*CG_UPNP_ACTION_LISTNER)(CgUpnpAction *) |
#define cg_upnp_action_setlistner cg_upnp_action_setlistener |
#define cg_upnp_action_setname | ( | action, | |||
value | ) | cg_xml_node_setchildnode(cg_upnp_action_getactionnode(action), CG_UPNP_ACTION_NAME, value) |
Set the action's name
action | The action in question | |
value | The action's name |
#define cg_upnp_action_setservice | ( | action, | |||
service | ) | (action->parentService = service) |
Set the action's parent service
action | The action in question | |
service | The action's parent service |
#define cg_upnp_action_setstatuscode | ( | action, | |||
code | ) | cg_upnp_status_setcode(action->upnpStatus, code) |
Set the action's latest status code
action | The action in question | |
code | The status code (int) |
#define cg_upnp_action_setstatusdescription | ( | action, | |||
value | ) | cg_upnp_status_setdescription(action->upnpStatus, value) |
Set the action's latest status description
action | The action in question | |
value | The status description string |
#define cg_upnp_action_setuserdata | ( | action, | |||
value | ) | (action->userData = value) |
Set the action's arbitrary user data pointer
action | The action in question | |
value | The user data pointer (void*) |
#define cg_upnp_actionlist_add | ( | actionList, | |||
action | ) | cg_list_add((CgList *)actionList, (CgList *)action) |
Add an action to a list of actions
actionList | The list in question | |
action | The action to add to the list |
#define cg_upnp_actionlist_clear | ( | actionList | ) | cg_list_clear((CgList *)actionList, (CG_LIST_DESTRUCTORFUNC)cg_upnp_action_delete) |
Clear the contents of a list of actions
actionList | The list of actions to clear |
#define CG_UPNP_ACTIONLIST_ELEM_NAME "actionList" |
#define cg_upnp_actionlist_gets | ( | actionList | ) | (CgUpnpAction *)cg_list_next((CgList *)actionList) |
Get the first action in a list of actions. Use as the starting point in iteration loops.
actionList | The list in question |
#define cg_upnp_actionlist_size | ( | actionList | ) | cg_list_size((CgList *)actionList) |
Get the number of actions in a list of actions
actionList | The list in question |
typedef BOOL(* CG_UPNP_ACTION_LISTNER)(CgUpnpAction *) |
typedef struct _CgUpnpAction CgUpnpAction |
typedef struct _CgUpnpAction CgUpnpActionList |
void cg_upnp_action_delete | ( | CgUpnpAction * | action | ) |
Destroy an action
action | The action to destroy |
CgUpnpArgument* cg_upnp_action_getargumentbyname | ( | CgUpnpAction * | action, | |
char * | name | |||
) |
Find an argument from the action by the argument's name.
action | The action in question | |
name | The name of the argument to look for |
char* cg_upnp_action_getargumentvaluebyname | ( | CgUpnpAction * | action, | |
char * | name | |||
) |
Get a value of the specified argument from the action by the argument's name directly.
action | The action in question | |
name | The name of the argument to look for |
CgUpnpAction* cg_upnp_action_new | ( | ) |
Create a new action
void cg_upnp_action_setactionnode | ( | CgUpnpAction * | action, | |
CgXmlNode * | node | |||
) |
Set the action's XML node (i.e. the XML representation of the action)
action | The action in question | |
node | The CgXmlNode* |
BOOL cg_upnp_action_setargumentvaluebyname | ( | CgUpnpAction * | action, | |
char * | name, | |||
char * | value | |||
) |
Set a value of the specified argument from the action by the argument's name directly.
action | The action in question | |
name | The name of the argument to look for | |
value | The value to set |
void cg_upnp_actionlist_delete | ( | CgUpnpActionList * | actionList | ) |
Destroy a list of actions
actionList | The list of actions to destroy |
CgUpnpActionList* cg_upnp_actionlist_new | ( | ) |
Create a new list of actions