50 #ifndef _DeviceDomain_H_
51 #define _DeviceDomain_H_
53 #include "network/ISocketService.h"
54 #include "network/BroadcastSocketService.h"
55 #include "network/MulticastSocketService.h"
56 #include "network/NetworkUtil.h"
57 #include "device/IDeviceService.h"
58 #include "RemoteEventService.h"
59 #include "IDeviceDomain.h"
66 namespace multidevice {
69 static char headerStream[HEADER_SIZE];
72 static unsigned int myIP;
73 static bool taskIndicationFlag;
79 unsigned int sourceIp;
88 double receivedTimeStamp;
90 unsigned int frameSize;
95 string base_device_ncl_path;
105 bool broadcastTaskRequest(
char* data,
int taskSize);
106 virtual bool taskRequest(
int destDevClass,
char* data,
int taskSize)=0;
107 virtual bool passiveTaskRequest(
char* data,
int taskSize)=0;
108 virtual bool activeTaskRequest(
char* data,
int taskSize)=0;
110 void parseTaskHeader();
111 void printTaskHeader();
112 bool addDevice(
int reqDeviceClass,
int width,
int height,
int srvPort);
115 void postConnectionRequestTask();
118 virtual void postConnectionRequestTask(
int width,
int height)=0;
119 virtual void receiveConnectionRequest(
char* task)=0;
120 virtual void postAnswerTask(
int reqDeviceClass,
int answer)=0;
121 virtual void receiveAnswerTask(
char* answerTask)=0;
124 virtual bool postMediaContentTask(
int destDevClass,
string url)=0;
127 virtual bool receiveMediaContentTask(
char* task)=0;
137 virtual bool receiveEventTask(
char* task)=0;
140 virtual void setDeviceInfo(
int width,
int height,
string base_device_ncl_path);
141 int getDeviceClass();
144 virtual bool runControlTask()=0;
145 virtual bool runDataTask()=0;
148 virtual void checkDomainTasks();
Definition: RemoteEventService.h:80
Definition: ISocketService.h:61
Definition: IRemoteDeviceListener.h:62
Definition: DeviceDomain.h:67
Definition: IDeviceDomain.h:65
Definition: IDeviceService.h:64