00001 #ifndef _RDA_DEVICE_HANDLE_H
00002 #define _RDA_DEVICE_HANDLE_H
00003
00004
00005
00006 #include <rda/Data.h>
00007 #include <rda/Exception.h>
00008
00009 class rdaRequest;
00010 class rdaReplyHandler;
00011
00049 class rdaDeviceHandle
00050 {
00051 public:
00052
00065 virtual const char* getDeviceName() const = 0;
00066
00071 virtual const char* getClassName() const = 0;
00073
00090 virtual rdaData* get(const char* propName)
00091 throw (rdaBadParameter, rdaTimeOut, rdaNoConnection, rdaIOError,
00092 rdaInternalException, rdaInternalError) = 0;
00093
00104 virtual rdaData * get(const char * propName,
00105 const rdaData & context)
00106 throw (rdaBadParameter,rdaTimeOut, rdaNoConnection, rdaIOError,
00107 rdaInternalException, rdaInternalError) = 0;
00108
00120 virtual rdaData * get(const char * propName,
00121 const char * cycleSelector)
00122 throw (rdaBadParameter, rdaTimeOut, rdaNoConnection, rdaIOError,
00123 rdaInternalException, rdaInternalError) = 0;
00124
00138 virtual rdaData * get(const char * propName,
00139 const char * cycleSelector,
00140 const rdaData & context)
00141 throw (rdaBadParameter, rdaTimeOut, rdaNoConnection, rdaIOError,
00142 rdaInternalException, rdaInternalError) = 0;
00143
00151 virtual void set(const char * propName,
00152 const rdaData & value)
00153 throw (rdaBadParameter, rdaTimeOut, rdaNoConnection,
00154 rdaIOError, rdaInternalException, rdaInternalError) = 0;
00155
00164 virtual void set(const char * propName,
00165 const rdaData & value,
00166 const rdaData & context)
00167 throw (rdaBadParameter, rdaTimeOut, rdaNoConnection,
00168 rdaIOError, rdaInternalException, rdaInternalError) = 0;
00169
00179 virtual void set(const char * propName,
00180 const char * cycleSelector,
00181 const rdaData & value)
00182 throw (rdaBadParameter, rdaTimeOut, rdaNoConnection,
00183 rdaIOError, rdaInternalException, rdaInternalError) = 0;
00184
00196 virtual void set(const char * propName,
00197 const char * cycleSelector,
00198 const rdaData & value,
00199 const rdaData & context)
00200 throw (rdaBadParameter, rdaTimeOut, rdaNoConnection,
00201 rdaIOError, rdaInternalException, rdaInternalError) = 0;
00203
00222 virtual void get(const char * propName,
00223 rdaReplyHandler * replyHandler)
00224 throw (rdaBadParameter, rdaNoConnection, rdaInternalException,
00225 rdaInternalError) = 0;
00226
00240 virtual void get(const char * propName,
00241 rdaReplyHandler * replyHandler,
00242 const rdaData & context)
00243 throw (rdaBadParameter, rdaNoConnection, rdaInternalException,
00244 rdaInternalError) = 0;
00245
00259 virtual void get(const char * propName,
00260 const char * cycleSelector,
00261 rdaReplyHandler * replyHandler)
00262 throw (rdaBadParameter, rdaNoConnection, rdaInternalException,
00263 rdaInternalError) = 0;
00264
00279 virtual void get(const char * propName,
00280 const char * cycleSelector,
00281 rdaReplyHandler * replyHandler,
00282 const rdaData & context)
00283 throw (rdaBadParameter, rdaNoConnection, rdaInternalException,
00284 rdaInternalError) = 0;
00285
00299 virtual void set(const char * propName,
00300 const rdaData & value,
00301 rdaReplyHandler * replyHandler)
00302 throw (rdaBadParameter, rdaNoConnection,
00303 rdaInternalException, rdaInternalError) = 0;
00304
00320 virtual void set(const char * propName,
00321 const rdaData & value,
00322 rdaReplyHandler * replyHandler,
00323 const rdaData & context)
00324 throw (rdaBadParameter, rdaNoConnection, rdaInternalException,
00325 rdaInternalError) = 0;
00326
00341 virtual void set(const char * propName,
00342 const char * cycleSelector,
00343 const rdaData & value,
00344 rdaReplyHandler * replyHandler)
00345 throw (rdaBadParameter, rdaNoConnection,
00346 rdaInternalException, rdaInternalError) = 0;
00347
00363 virtual void set(const char * propName,
00364 const char * cycleSelector,
00365 const rdaData & value,
00366 rdaReplyHandler * replyHandler,
00367 const rdaData & context)
00368 throw (rdaBadParameter, rdaNoConnection,
00369 rdaInternalException, rdaInternalError) = 0;
00371
00411 virtual rdaRequest *
00412 monitorOn(const char * propName,
00413 bool onChange,
00414 rdaReplyHandler * replyHandler)
00415 throw (rdaBadParameter, rdaTimeOut, rdaNoConnection, rdaIOError,
00416 rdaInternalException, rdaInternalError) = 0;
00417
00453 virtual rdaRequest *
00454 monitorOn(const char * propName,
00455 bool onChange,
00456 rdaReplyHandler * replyHandler,
00457 const rdaData& context)
00458 throw (rdaBadParameter, rdaTimeOut, rdaNoConnection, rdaIOError,
00459 rdaInternalException, rdaInternalError) = 0;
00460
00496 virtual rdaRequest *
00497 monitorOn(const char * propName,
00498 const char * cycleSelector,
00499 bool onChange,
00500 rdaReplyHandler * replyHandler)
00501 throw (rdaBadParameter, rdaTimeOut, rdaNoConnection,
00502 rdaIOError, rdaInternalException, rdaInternalError) = 0;
00503
00540 virtual rdaRequest *
00541 monitorOn(const char * propName,
00542 const char * cycleSelector,
00543 bool onChange,
00544 rdaReplyHandler * replyHandler,
00545 const rdaData& context)
00546 throw (rdaBadParameter, rdaTimeOut, rdaNoConnection,
00547 rdaIOError, rdaInternalException, rdaInternalError) = 0;
00548
00569 virtual void monitorOff(rdaRequest * request)
00570 throw (rdaBadParameter, rdaTimeOut) = 0;
00571
00573
00574
00575
00576
00577
00578
00579
00580 virtual void release() = 0;
00581
00582 virtual ~rdaDeviceHandle() {}
00583 protected:
00584
00585 rdaDeviceHandle() {}
00586 };
00587
00620 #endif
00621