cavdevice.h

Go to the documentation of this file.
00001 
00009 #ifndef CG_UPNP_AV_CAVDEVICE_H
00010 #define CG_UPNP_AV_CAVDEVICE_H
00011 
00012 #include <cybergarage/typedef.h>
00013 #include <cybergarage/upnp/cdevice.h>
00014 #include <cybergarage/contentdirectory/ccontentdirectory.h>
00015 
00016 typedef struct _CgUpnpAVDevice
00017 {
00018         BOOL headFlag;
00019         struct _CgUpnpAVDevice* prev;
00020         struct _CgUpnpAVDevice* next;
00021 
00023         CgString* udn;
00024 
00026         CgUpnpAVCDS* contentDirectoryService;
00027 
00028 } CgUpnpAVDevice, CgUpnpAVDeviceList;
00029 
00030 /********************************************************
00031  * CgAVDevice List
00032  ********************************************************/
00033 
00037 CgUpnpAVDeviceList* cg_upnp_av_devicelist_new();
00038 
00042 void cg_upnp_av_devicelist_delete(CgUpnpAVDeviceList* nodelist);
00043 
00049 #define cg_upnp_av_devicelist_gets(devicelist) \
00050         (CgUpnpAVDevice*) cg_list_next((CgList*) devicelist)
00051 
00057 #define cg_upnp_av_devicelist_clear(devicelist) \
00058         cg_list_clear((CgList*) devicelist, \
00059         (CG_LIST_DESTRUCTORFUNC) cg_upnp_av_device_delete)
00060 
00066 #define cg_upnp_av_devicelist_add(devicelist, device) \
00067         cg_list_add((CgList*) devicelist, (CgList*) device)
00068 
00074 #define cg_upnp_av_devicelist_size(devicelist) \
00075         cg_list_size((CgList*) devicelist)
00076 
00084 CgUpnpAVDevice* cg_upnp_av_devicelist_find(CgUpnpAVDeviceList* avDeviceList,
00085                                        const char* udn);
00086 
00087 /*****************************************************************************
00088  * AV Device
00089  *****************************************************************************/
00090 
00097 CgUpnpAVDevice* cg_upnp_av_device_new();
00098 
00104 void cg_upnp_av_device_delete(CgUpnpAVDevice* avDevice);
00105 
00111 void cg_upnp_av_device_clear(CgUpnpAVDevice* avDevice);
00112 
00118 #define cg_upnp_av_device_next(avDevice) \
00119         (CgUpnpAVDevice*) cg_list_next((CgList*) avDevice)
00120 
00127 BOOL cg_upnp_av_device_isavcapable(CgUpnpAVDevice* avDevice);
00128 
00129 /*****************************************************************************
00130  * UDN
00131  *****************************************************************************/
00132 
00139 #define cg_upnp_av_device_setudn(avDevice, udn) \
00140         cg_string_setvalue(avDevice->udn, udn)
00141 
00148 #define cg_upnp_av_device_getudn(avDevice) \
00149         cg_string_getvalue(avDevice->udn)
00150 
00151 /*****************************************************************************
00152  * Content Directory Service
00153  *****************************************************************************/
00154 
00160 #define cg_upnp_av_device_getcds(avDevice) \
00161         (avDevice->contentDirectoryService)
00162 
00163 /*****************************************************************************
00164  * UPnP Device
00165  *****************************************************************************/
00166 
00173 CgUpnpDevice* cg_upnp_av_device_getupnpdevice(CgUpnpAVDevice* avDevice);
00174 
00175 #endif

Generated on Mon Aug 14 10:23:32 2006 for CyberLinkC-AV by  doxygen 1.4.6