#include <cybergarage/typedef.h>
#include <cybergarage/xml/cxml.h>
#include <cybergarage/util/clist.h>
Data Structures | |
struct | _CgUpnpIcon |
Defines | |
#define | CG_UPNP_ICON_ELEM_NAME "icon" |
#define | CG_UPNP_ICONLIST_ELEM_NAME "iconList" |
#define | CG_UPNP_ICON_MIME_TYPE "mimeType" |
#define | CG_UPNP_ICON_WIDTH "width" |
#define | CG_UPNP_ICON_HEIGHT "height" |
#define | CG_UPNP_ICON_DEPTH "depth" |
#define | CG_UPNP_ICON_URL "url" |
#define | cg_upnp_icon_next(icon) (CgUpnpIcon *)cg_list_next((CgList *)icon) |
#define | cg_upnp_icon_isiconnode(node) cg_xml_node_isname(node, CG_UPNP_ICON_ELEM_NAME) |
#define | cg_upnp_icon_seticonnode(icon, node) (icon->iconNode = node) |
#define | cg_upnp_icon_geticonnode(icon) (icon->iconNode) |
#define | cg_upnp_icon_setmimetype(icon, value) cg_xml_node_setchildnode(cg_upnp_icon_geticonnode(icon), CG_UPNP_ICON_MIME_TYPE, value) |
#define | cg_upnp_icon_getmimetype(icon) cg_xml_node_getchildnodevalue(cg_upnp_icon_geticonnode(icon), CG_UPNP_ICON_MIME_TYPE) |
#define | cg_upnp_icon_setwidth(icon, value) cg_xml_node_setchildnode(cg_upnp_icon_geticonnode(icon), CG_UPNP_ICON_WIDTH, value) |
#define | cg_upnp_icon_getwidth(icon) cg_xml_node_getchildnodevalue(cg_upnp_icon_geticonnode(icon), CG_UPNP_ICON_WIDTH) |
#define | cg_upnp_icon_setheight(icon, value) cg_xml_node_setchildnode(cg_upnp_icon_geticonnode(icon), CG_UPNP_ICON_HEIGHT, value) |
#define | cg_upnp_icon_getheight(icon) cg_xml_node_getchildnodevalue(cg_upnp_icon_geticonnode(icon), CG_UPNP_ICON_HEIGHT) |
#define | cg_upnp_icon_setdepth(icon, value) cg_xml_node_setchildnode(cg_upnp_icon_geticonnode(icon), CG_UPNP_ICON_DEPTH, value) |
#define | cg_upnp_icon_getdepth(icon) cg_xml_node_getchildnodevalue(cg_upnp_icon_geticonnode(icon), CG_UPNP_ICON_DEPTH) |
#define | cg_upnp_icon_seturl(icon, value) cg_xml_node_setchildnode(cg_upnp_icon_geticonnode(icon), CG_UPNP_ICON_URL, value) |
#define | cg_upnp_icon_geturl(icon) cg_xml_node_getchildnodevalue(cg_upnp_icon_geticonnode(icon), CG_UPNP_ICON_URL) |
#define | cg_upnp_iconlist_clear(iconList) cg_list_clear((CgList *)iconList, (CG_LIST_DESTRUCTORFUNC)cg_upnp_icon_delete) |
#define | cg_upnp_iconlist_size(iconList) cg_list_size((CgList *)iconList) |
#define | cg_upnp_iconlist_gets(iconList) (CgUpnpIcon *)cg_list_next((CgList *)iconList) |
#define | cg_upnp_iconlist_add(iconList, icon) cg_list_add((CgList *)iconList, (CgList *)icon) |
Typedefs | |
typedef _CgUpnpIcon | CgUpnpIcon |
typedef _CgUpnpIcon | CgUpnpIconList |
Functions | |
CgUpnpIcon * | cg_upnp_icon_new () |
void | cg_upnp_icon_delete (CgUpnpIcon *dev) |
CgUpnpIconList * | cg_upnp_iconlist_new () |
void | cg_upnp_iconlist_delete (CgUpnpIconList *iconList) |
#define CG_UPNP_ICON_DEPTH "depth" |
#define CG_UPNP_ICON_ELEM_NAME "icon" |
#define cg_upnp_icon_getdepth | ( | icon | ) | cg_xml_node_getchildnodevalue(cg_upnp_icon_geticonnode(icon), CG_UPNP_ICON_DEPTH) |
Get icon's colour depth
#define cg_upnp_icon_getheight | ( | icon | ) | cg_xml_node_getchildnodevalue(cg_upnp_icon_geticonnode(icon), CG_UPNP_ICON_HEIGHT) |
Get icon height
#define cg_upnp_icon_geticonnode | ( | icon | ) | (icon->iconNode) |
Get the XML icon node from an icon struct
icon | The icon struct |
#define cg_upnp_icon_getmimetype | ( | icon | ) | cg_xml_node_getchildnodevalue(cg_upnp_icon_geticonnode(icon), CG_UPNP_ICON_MIME_TYPE) |
Get the icon's MIME type
#define cg_upnp_icon_geturl | ( | icon | ) | cg_xml_node_getchildnodevalue(cg_upnp_icon_geticonnode(icon), CG_UPNP_ICON_URL) |
Get icon's URL
#define cg_upnp_icon_getwidth | ( | icon | ) | cg_xml_node_getchildnodevalue(cg_upnp_icon_geticonnode(icon), CG_UPNP_ICON_WIDTH) |
Get icon width
#define CG_UPNP_ICON_HEIGHT "height" |
#define cg_upnp_icon_isiconnode | ( | node | ) | cg_xml_node_isname(node, CG_UPNP_ICON_ELEM_NAME) |
Check whether the given node is a member of an icon list
node | List node |
#define CG_UPNP_ICON_MIME_TYPE "mimeType" |
#define cg_upnp_icon_next | ( | icon | ) | (CgUpnpIcon *)cg_list_next((CgList *)icon) |
Get the next icon in list. Use as an iterator.
icon | Node in a list of icons |
#define cg_upnp_icon_setdepth | ( | icon, | |||
value | ) | cg_xml_node_setchildnode(cg_upnp_icon_geticonnode(icon), CG_UPNP_ICON_DEPTH, value) |
Set icon's colour depth
icon | Icon in question | |
value | Colour depth |
#define cg_upnp_icon_setheight | ( | icon, | |||
value | ) | cg_xml_node_setchildnode(cg_upnp_icon_geticonnode(icon), CG_UPNP_ICON_HEIGHT, value) |
Set icon height
icon | Icon in question | |
value | Icon height |
#define cg_upnp_icon_seticonnode | ( | icon, | |||
node | ) | (icon->iconNode = node) |
Set the XML icon node to an icon struct
icon | The icon struct | |
node | XML node |
#define cg_upnp_icon_setmimetype | ( | icon, | |||
value | ) | cg_xml_node_setchildnode(cg_upnp_icon_geticonnode(icon), CG_UPNP_ICON_MIME_TYPE, value) |
Set the icon's MIME type
icon | Icon in question | |
value | MIME type |
#define cg_upnp_icon_seturl | ( | icon, | |||
value | ) | cg_xml_node_setchildnode(cg_upnp_icon_geticonnode(icon), CG_UPNP_ICON_URL, value) |
Set icon's URL
icon | Icon in question | |
value | Icon's URL |
#define cg_upnp_icon_setwidth | ( | icon, | |||
value | ) | cg_xml_node_setchildnode(cg_upnp_icon_geticonnode(icon), CG_UPNP_ICON_WIDTH, value) |
Set icon width
icon | Icon in question | |
value | Icon width |
#define CG_UPNP_ICON_URL "url" |
#define CG_UPNP_ICON_WIDTH "width" |
Add an icon to an icon list
iconList | List of icons | |
icon | Icon to add |
#define cg_upnp_iconlist_clear | ( | iconList | ) | cg_list_clear((CgList *)iconList, (CG_LIST_DESTRUCTORFUNC)cg_upnp_icon_delete) |
Clear the contents of an icon list
iconList | List of icons |
#define CG_UPNP_ICONLIST_ELEM_NAME "iconList" |
#define cg_upnp_iconlist_gets | ( | iconList | ) | (CgUpnpIcon *)cg_list_next((CgList *)iconList) |
#define cg_upnp_iconlist_size | ( | iconList | ) | cg_list_size((CgList *)iconList) |
Get the size (number of elements) of an icon list
iconList | List of icons |
typedef struct _CgUpnpIcon CgUpnpIcon |
The generic icon struct
typedef struct _CgUpnpIcon CgUpnpIconList |
The generic icon struct
void cg_upnp_icon_delete | ( | CgUpnpIcon * | dev | ) |
Delete an icon struct
dev | Icon to delete |
CgUpnpIcon* cg_upnp_icon_new | ( | ) |
Create a new icon struct
void cg_upnp_iconlist_delete | ( | CgUpnpIconList * | iconList | ) |
Delete a list of icons
iconList | List of icons |
CgUpnpIconList* cg_upnp_iconlist_new | ( | ) |
Create a new list of icons