123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 |
- #ifndef _ARGUS_EVENT_H
- #define _ARGUS_EVENT_H
- namespace Argus
- {
- class Event : public InterfaceProvider
- {
- protected:
- ~Event() {}
- };
- class EventType : public NamedUUID
- {
- public:
- EventType(uint32_t time_low_
- , uint16_t time_mid_
- , uint16_t time_hi_and_version_
- , uint16_t clock_seq_
- , uint8_t c0, uint8_t c1, uint8_t c2, uint8_t c3, uint8_t c4, uint8_t c5
- , const char* name)
- : NamedUUID(time_low_, time_mid_, time_hi_and_version_, clock_seq_,
- c0, c1, c2, c3, c4, c5, name)
- {}
- EventType()
- : NamedUUID(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "EVENT_TYPE_UNSPECIFIED")
- {}
- };
- DEFINE_UUID(EventType, EVENT_TYPE_ERROR, 2c80d8b0,2bfd,11e5,a2cb,08,00,20,0c,9a,66);
- DEFINE_UUID(EventType, EVENT_TYPE_CAPTURE_STARTED, 2c80d8b1,2bfd,11e5,a2cb,08,00,20,0c,9a,66);
- DEFINE_UUID(EventType, EVENT_TYPE_CAPTURE_COMPLETE, 2c80d8b2,2bfd,11e5,a2cb,08,00,20,0c,9a,66);
- DEFINE_UUID(InterfaceID, IID_EVENT, 98bcb49e,fd7d,11e4,a322,16,97,f9,25,ec,7b);
- class IEvent : public Interface
- {
- public:
- static const InterfaceID& id() { return IID_EVENT; }
-
- virtual EventType getEventType() const = 0;
-
- virtual uint64_t getTime() const = 0;
-
- virtual uint32_t getCaptureId() const = 0;
- protected:
- ~IEvent() {}
- };
- DEFINE_UUID(InterfaceID, IID_EVENT_ERROR, 13e0fc70,1ab6,11e5,b939,08,00,20,0c,9a,66);
- class IEventError : public Interface
- {
- public:
- static const InterfaceID& id() { return IID_EVENT_ERROR; }
-
- virtual Status getStatus() const = 0;
- protected:
- ~IEventError() {}
- };
- DEFINE_UUID(InterfaceID, IID_EVENT_CAPTURE_COMPLETE, 8b2b40b5,f1e4,4c4d,ae1c,f3,93,f6,54,06,d5);
- class IEventCaptureComplete : public Interface
- {
- public:
- static const InterfaceID& id() { return IID_EVENT_CAPTURE_COMPLETE; }
-
- virtual const CaptureMetadata* getMetadata() const = 0;
-
- virtual Status getStatus() const = 0;
- protected:
- ~IEventCaptureComplete() {}
- };
- }
- #endif
|