cavtcontrolpoint.h

Go to the documentation of this file.
00001 /* 
00002  * CyberLinkC AV API for Control Points
00003  *
00004  * cavtcontrolpoint.h
00005  *
00006  * Copyright 2005 Nokia Corporation
00007  */
00008 
00009 #ifndef CG_UPNP_AV_CAVTCONTROLPOINT_H
00010 #define CG_UPNP_AV_CAVTCONTROLPOINT_H
00011 
00012 #include <cybergarage/avtransport/cavtransport.h>
00013 #include <cybergarage/avtransport/cavtactionarguments.h>
00014 #include <cybergarage/upnp/cdevice.h>
00015 
00036 int cg_upnp_av_avt_control_invokeaction(CgUpnpDevice* upnpDevice,
00037                                         char* actionName,
00038                                         char** errorString,
00039                                         ...);
00040 
00052 #define cg_upnp_av_avt_control_setavtransporturi(upnpDevice, \
00053                                                  errorString, \
00054                                                  instanceID, \
00055                                                  uri, \
00056                                                  uriMetaData) \
00057         \
00058         cg_upnp_av_avt_control_invokeaction(upnpDevice, \
00059                         CG_UPNP_AVT_ACTION_SET_AVTRANSPORTURI, \
00060                         errorString, \
00061                         CG_UPNP_AVT_ARG_INSTANCEID, instanceID, \
00062                         CG_UPNP_AVT_ARG_CURRENTURI, uri, \
00063                         CG_UPNP_AVT_ARG_CURRENTURIMETADATA, uriMetaData, \
00064                         NULL)
00065 
00077 #define cg_upnp_av_avt_control_setnextavtransporturi(upnpDevice, \
00078                                                      errorString, \
00079                                                      instanceID, \
00080                                                      nextUri, \
00081                                                      nextUriMetaData) \
00082         \
00083         cg_upnp_av_avt_control_invokeaction(upnpDevice, \
00084                         CG_UPNP_AVT_ACTION_SET_NEXTAVTRANSPORTURI, \
00085                         errorString, \
00086                         CG_UPNP_AVT_ARG_INSTANCEID, instanceID, \
00087                         CG_UPNP_AVT_ARG_NEXTURI, nextUri, \
00088                         CG_UPNP_AVT_ARG_NEXTURIMETADATA, nextUriMetaData, \
00089                         NULL)
00090 
00110 #define cg_upnp_av_avt_control_getmediainfo(upnpDevice, \
00111                                             errorString, \
00112                                             instanceID, \
00113                                             nrTracks, \
00114                                             mediaDuration, \
00115                                             currentUri, \
00116                                             currentUriMetaData, \
00117                                             nextUri, \
00118                                             nextUriMetaData, \
00119                                             playMedium, \
00120                                             recordMedium, \
00121                                             writeStatus) \
00122         \
00123         cg_upnp_av_avt_control_invokeaction(upnpDevice, \
00124                         CG_UPNP_AVT_ACTION_GET_MEDIAINFO, \
00125                         errorString, \
00126                         CG_UPNP_AVT_ARG_INSTANCEID, \
00127                         instanceID, \
00128                         CG_UPNP_AVT_ARG_NRTRACKS, \
00129                         nrTracks, \
00130                         CG_UPNP_AVT_ARG_MEDIADURATION, \
00131                         mediaDuration, \
00132                         CG_UPNP_AVT_ARG_CURRENTURI, \
00133                         currentUri, \
00134                         CG_UPNP_AVT_ARG_CURRENTURIMETADATA, \
00135                         currentUriMetaData, \
00136                         CG_UPNP_AVT_ARG_NEXTURI, \
00137                         nextUri, \
00138                         CG_UPNP_AVT_ARG_NEXTURIMETADATA, \
00139                         nextUriMetaData, \
00140                         CG_UPNP_AVT_ARG_PLAYMEDIUM, \
00141                         playMedium, \
00142                         CG_UPNP_AVT_ARG_RECORDMEDIUM, \
00143                         recordMedium, \
00144                         CG_UPNP_AVT_ARG_WRITESTATUS, \
00145                         writeStatus, \
00146                         NULL)
00147 
00160 #define cg_upnp_av_avt_control_gettransportinfo(upnpDevice, \
00161                                                 errorString, \
00162                                                 instanceID, \
00163                                                 currentTransportState, \
00164                                                 currentTransportStatus, \
00165                                                 currentSpeed) \
00166         \
00167         cg_upnp_av_avt_control_invokeaction(upnpDevice, \
00168                         CG_UPNP_AVT_ACTION_GET_TRANSPORTINFO, \
00169                         errorString, \
00170                         CG_UPNP_AVT_ARG_INSTANCEID, \
00171                         instanceID, \
00172                         CG_UPNP_AVT_ARG_CURRENTTRANSPORTSTATE, \
00173                         currentTransportState, \
00174                         CG_UPNP_AVT_ARG_CURRENTTRANSPORTSTATUS, \
00175                         currentTransportStatus, \
00176                         CG_UPNP_AVT_ARG_CURRENTSPEED, \
00177                         currentSpeed, \
00178                         NULL)
00179 
00197 #define cg_upnp_av_avt_control_getpositioninfo(upnpDevice, \
00198                                                errorString, \
00199                                                instanceID, \
00200                                                track, \
00201                                                trackDuration, \
00202                                                trackMetaData, \
00203                                                trackURI, \
00204                                                relTime, \
00205                                                absTime, \
00206                                                relCount, \
00207                                                absCount) \
00208         \
00209         cg_upnp_av_avt_control_invokeaction(upnpDevice, \
00210                 CG_UPNP_AVT_ACTION_GET_POSITIONINFO, \
00211                 errorString, \
00212                 CG_UPNP_AVT_ARG_INSTANCEID, \
00213                 instanceID, \
00214                 CG_UPNP_AVT_ARG_TRACK, \
00215                 track, \
00216                 CG_UPNP_AVT_ARG_TRACKDURATION, \
00217                 trackDuration, \
00218                 CG_UPNP_AVT_ARG_TRACKMETADATA, \
00219                 trackMetaData, \
00220                 CG_UPNP_AVT_ARG_TRACKURI, \
00221                 trackURI, \
00222                 CG_UPNP_AVT_ARG_RELTIME, \
00223                 relTime, \
00224                 CG_UPNP_AVT_ARG_ABSTIME, \
00225                 absTime, \
00226                 CG_UPNP_AVT_ARG_RELCOUNT, \
00227                 relCount, \
00228                 CG_UPNP_AVT_ARG_ABSCOUNT, \
00229                 absCount, \
00230                 NULL)
00231 
00232                                             
00233 
00243 #define cg_upnp_av_avt_control_getdevicecapabilities(upnpDevice, \
00244                                                      errorString, \
00245                                                      instanceID, \
00246                                                      playMedia, \
00247                                                      recMedia, \
00248                                                      recQualityModes) \
00249         \
00250         cg_upnp_av_avt_control_invokeaction(upnpDevice, \
00251                 CG_UPNP_AVT_ACTION_GET_DEVICECAPABILITIES, \
00252                 errorString, \
00253                 CG_UPNP_AVT_ARG_INSTANCEID, \
00254                 instanceID, \
00255                 CG_UPNP_AVT_ARG_PLAYMEDIA, \
00256                 playMedia, \
00257                 CG_UPNP_AVT_ARG_RECMEDIA, \
00258                 recMedia, \
00259                 CG_UPNP_AVT_ARG_RECQUALITYMODES, \
00260                 recQualityModes, \
00261                 NULL)
00262 
00274 #define cg_upnp_av_avt_control_gettransportsettings(upnpDevice, \
00275                                                     errorString, \
00276                                                     instanceID, \
00277                                                     playMode, \
00278                                                     recQualityMode) \
00279         \
00280         cg_upnp_av_avt_control_invokeaction(upnpDevice, \
00281                 CG_UPNP_AVT_ACTION_GET_TRANSPORTSETTINGS, \
00282                 errorString, \
00283                 CG_UPNP_AVT_ARG_INSTANCEID, \
00284                 instanceID, \
00285                 CG_UPNP_AVT_ARG_PLAYMODE, \
00286                 playMode, \
00287                 CG_UPNP_AVT_ARG_RECQUALITYMODE, \
00288                 recQualityMode, \
00289                 NULL)
00290 
00291 /*****************************************************************************
00292  * Media transport control actions
00293  *****************************************************************************/
00294 
00304 #define cg_upnp_av_avt_control_stop(upnpDevice, \
00305                                     errorString, \
00306                                     instanceID) \
00307         \
00308         cg_upnp_av_avt_control_invokeaction(upnpDevice, \
00309         CG_UPNP_AVT_ACTION_STOP, \
00310         errorString, \
00311         CG_UPNP_AVT_ARG_INSTANCEID, \
00312         instanceID, \
00313         NULL)
00314 
00325 #define cg_upnp_av_avt_control_play(upnpDevice, \
00326                                     errorString, \
00327                                     instanceID, \
00328                                     speed) \
00329         \
00330         cg_upnp_av_avt_control_invokeaction(upnpDevice, \
00331         CG_UPNP_AVT_ACTION_PLAY, \
00332         errorString, \
00333         CG_UPNP_AVT_ARG_INSTANCEID, \
00334         instanceID, \
00335         CG_UPNP_AVT_ARG_SPEED, \
00336         speed, \
00337         NULL)
00338 
00348 #define cg_upnp_av_avt_control_pause(upnpDevice, \
00349                                      errorString, \
00350                                      instanceID) \
00351         \
00352         cg_upnp_av_avt_control_invokeaction(upnpDevice, \
00353         CG_UPNP_AVT_ACTION_PAUSE, \
00354         errorString, \
00355         CG_UPNP_AVT_ARG_INSTANCEID, \
00356         instanceID, \
00357         NULL)
00358 
00368 #define cg_upnp_av_avt_control_record(upnpDevice, \
00369                                       errorString, \
00370                                       instanceID) \
00371         \
00372         cg_upnp_av_avt_control_invokeaction(upnpDevice, \
00373         CG_UPNP_AVT_ACTION_RECORD, \
00374         errorString, \
00375         CG_UPNP_AVT_ARG_INSTANCEID, \
00376         instanceID, \
00377         NULL)
00378 
00390 #define cg_upnp_av_avt_control_seek(upnpDevice, \
00391                                     errorString, \
00392                                     instanceID, \
00393                                     unit, \
00394                                     target) \
00395         \
00396         cg_upnp_av_avt_control_invokeaction(upnpDevice, \
00397         CG_UPNP_AVT_ACTION_SEEK, \
00398         errorString, \
00399         CG_UPNP_AVT_ARG_INSTANCEID, \
00400         instanceID, \
00401         CG_UPNP_AVT_ARG_UNIT, \
00402         unit, \
00403         CG_UPNP_AVT_ARG_TARGET, \
00404         target, \
00405         NULL)
00406 
00417 #define cg_upnp_av_avt_control_next(upnpDevice, \
00418                                     errorString, \
00419                                     instanceID) \
00420         \
00421         cg_upnp_av_avt_control_invokeaction(upnpDevice, \
00422         CG_UPNP_AVT_ACTION_NEXT, \
00423         errorString, \
00424         CG_UPNP_AVT_ARG_INSTANCEID, \
00425         instanceID, \
00426         NULL)
00427 
00438 #define cg_upnp_av_avt_control_previous(upnpDevice, \
00439                                         errorString, \
00440                                         instanceID) \
00441         \
00442         cg_upnp_av_avt_control_invokeaction(upnpDevice, \
00443         CG_UPNP_AVT_ACTION_PREVIOUS, \
00444         errorString, \
00445         CG_UPNP_AVT_ARG_INSTANCEID, \
00446         instanceID, \
00447         NULL)
00448 
00449 /*****************************************************************************
00450  * Mode setting actions
00451  *****************************************************************************/
00452 
00464 #define cg_upnp_av_avt_control_setplaymode(upnpDevice, \
00465                                            errorString, \
00466                                            instanceID, \
00467                                            newPlayMode) \
00468         \
00469         cg_upnp_av_avt_control_invokeaction(upnpDevice, \
00470         CG_UPNP_AVT_ACTION_SET_PLAYMODE, \
00471         errorString, \
00472         CG_UPNP_AVT_ARG_INSTANCEID, \
00473         instanceID, \
00474         CG_UPNP_AVT_ARG_NEWPLAYMODE, \
00475         newPlayMode, \
00476         NULL)
00477 
00488 #define cg_upnp_av_avt_control_setrecordqualitymode(upnpDevice, \
00489                                                     errorString, \
00490                                                     instanceID, \
00491                                                     newRecordQualityMode) \
00492         \
00493         cg_upnp_av_avt_control_invokeaction(upnpDevice, \
00494         CG_UPNP_AVT_ACTION_SET_RECORDQUALITYMODE, \
00495         errorString, \
00496         CG_UPNP_AVT_ARG_INSTANCEID, \
00497         instanceID, \
00498         CG_UPNP_AVT_ARG_NEWRECORDQUALITYMODE, \
00499         newRecordQualityMode, \
00500         NULL)
00501         
00502 
00503 /*****************************************************************************
00504  * Current transport action settings
00505  *****************************************************************************/
00506 
00518 #define cg_upnp_av_avt_control_getcurrenttransportactions(upnpDevice, \
00519                                                           errorString, \
00520                                                           instanceID, \
00521                                                           actions) \
00522         \
00523         cg_upnp_av_avt_control_invokeaction(upnpDevice, \
00524         CG_UPNP_AVT_ACTION_GET_CURRENTTRANSPORTACTIONS, \
00525         errorString, \
00526         CG_UPNP_AVT_ARG_INSTANCEID, \
00527         instanceID, \
00528         CG_UPNP_AVT_ARG_ACTIONS, \
00529         actions, \
00530         NULL)
00531 
00532 #endif /* CG_UPNP_AV_CAVTCONTROLPOINT_H */

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