forked from aregtech/areg-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathServiceComponent.cpp
30 lines (25 loc) · 900 Bytes
/
ServiceComponent.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/**
* \file common/src/ServiceComponent.cpp
* \brief Implementation of the service component.
**/
#include "common/src/ServiceComponent.hpp"
Component * ServiceComponent::CreateComponent(const NERegistry::ComponentEntry & entry, ComponentThread & owner)
{
return DEBUG_NEW ServiceComponent(entry, owner);
}
void ServiceComponent::DeleteComponent(Component & compObject, const NERegistry::ComponentEntry & entry)
{
delete (&compObject);
}
ServiceComponent::ServiceComponent(const NERegistry::ComponentEntry & entry, ComponentThread & owner)
: Component ( owner, entry.mRoleName)
, HelloServiceStub ( static_cast<Component &>(self()) )
{
}
void ServiceComponent::requestHelloService(const String & client)
{
// output message
printf("\'Hello Service!\' from %s\n", client.getString());
// reply to unblock the request
responseHelloService(true);
}