ADTF  3.18.2
service_intf.h
Go to the documentation of this file.
1 
8 #ifndef _ADTF_UCOM_ANT_SERVICE_INTERFACE_INCLUDES_HEADER_
9 #define _ADTF_UCOM_ANT_SERVICE_INTERFACE_INCLUDES_HEADER_
10 
11 namespace adtf
12 {
13 namespace ucom
14 {
15 namespace ant
16 {
17 
23 class DOEXPORT IService : public IObjectInfo
24 {
25 public:
30  ADTF_IID(IService, "service.ant.ucom.adtf.iid");
31 
32  public:
161  enum tServiceEvent : uint32_t
162  {
164  SE_Unknown = 0,
165 
170  SE_Starting = 1,
171 
176  SE_Ready = 2,
177 
182  SE_Stopping = 3,
183 
188  SE_Stopped = 4,
189 
194  SE_ChangeRunLevel = 5
195  };
196 
197 
198  enum class tServiceState: uint32_t
199  {
200  Deinitialized = 0,
201  Initialized = 1
202  };
203 
204  public:
205 
206  virtual tServiceState GetState() const = 0;
207 
208  virtual tResult SetState(tServiceState eState) = 0;
209 
224  virtual tResult ServiceEvent(int nEventId,
225  uint32_t ui32Param1 = 0,
226  uint32_t ui32Param2 = 0,
227  void* pvData = nullptr,
228  int szData = 0) = 0;
229 
230  protected:
232  ~IService() = default;
233 };
234 
235 }//namespace ant
236 
239 
240 }//namespace ucom
241 }//namespace adtf
242 
243 //*************************************************************************************************
244 #endif //_ADTF_UCOM_ANT_SERVICE_INTERFACE_INCLUDES_HEADER_
The IObjectInfo interface provides methods for getting and setting class information.
The IService interface provides defines methods for system services.
Definition: service_intf.h:24
ADTF_IID(IService, "service.ant.ucom.adtf.iid")
Marks the IService to be castable with the ucom_cast<>
tServiceEvent
Service event identifiers called through IService::ServiceEvent.
Definition: service_intf.h:162
virtual tResult ServiceEvent(int nEventId, uint32_t ui32Param1=0, uint32_t ui32Param2=0, void *pvData=nullptr, int szData=0)=0
Signal service event.
~IService()=default
Protected destructor --> Use implemented Destroy() instead of delete!
ant::IService IService
Alias always bringing the latest version of ant::IService into scope.
Definition: service_intf.h:238
Namespace for entire ADTF SDK.