cicon.h File Reference

#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_getchildnodeintvalue(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_getchildnodeintvalue(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_getchildnodeintvalue(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 struct _CgUpnpIcon CgUpnpIcon
typedef struct _CgUpnpIcon CgUpnpIconList

Functions

CgUpnpIconcg_upnp_icon_new ()
void cg_upnp_icon_delete (CgUpnpIcon *dev)
CgUpnpIconListcg_upnp_iconlist_new ()
void cg_upnp_iconlist_delete (CgUpnpIconList *iconList)

Define Documentation

#define CG_UPNP_ICON_DEPTH   "depth"
#define CG_UPNP_ICON_ELEM_NAME   "icon"
#define cg_upnp_icon_getdepth ( icon   )     cg_xml_node_getchildnodeintvalue(cg_upnp_icon_geticonnode(icon), CG_UPNP_ICON_DEPTH)

Get icon's colour depth

#define cg_upnp_icon_getheight ( icon   )     cg_xml_node_getchildnodeintvalue(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

Parameters:
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_getchildnodeintvalue(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

Parameters:
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.

Parameters:
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

Parameters:
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

Parameters:
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

Parameters:
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

Parameters:
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

Parameters:
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

Parameters:
icon Icon in question
value Icon width
#define CG_UPNP_ICON_URL   "url"
#define CG_UPNP_ICON_WIDTH   "width"
#define cg_upnp_iconlist_add ( iconList,
icon   )     cg_list_add((CgList *)iconList, (CgList *)icon)

Add an icon to an icon list

Parameters:
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

Parameters:
iconList List of icons
#define CG_UPNP_ICONLIST_ELEM_NAME   "iconList"
#define cg_upnp_iconlist_gets ( iconList   )     (CgUpnpIcon *)cg_list_next((CgList *)iconList)
Todo:
Get the first icon from the list for iteration
Parameters:
iconList List of icons
#define cg_upnp_iconlist_size ( iconList   )     cg_list_size((CgList *)iconList)

Get the size (number of elements) of an icon list

Parameters:
iconList List of icons

Typedef Documentation

typedef struct _CgUpnpIcon CgUpnpIcon

The generic icon struct

typedef struct _CgUpnpIcon CgUpnpIconList

Function Documentation

void cg_upnp_icon_delete ( CgUpnpIcon dev  ) 

Delete an icon struct

Parameters:
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

Parameters:
iconList List of icons
CgUpnpIconList* cg_upnp_iconlist_new (  ) 

Create a new list of icons


Generated on Tue Feb 23 23:14:23 2010 for CyberLink for C by  doxygen 1.6.1