projects
/
platform
/
upstream
/
iotivity.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 0.9.2
[platform/upstream/iotivity.git]
/
service
/
things-manager
/
sampleapp
/
linux
/
groupsyncaction
/
phone.cpp
diff --git
a/service/things-manager/sampleapp/linux/groupsyncaction/phone.cpp
b/service/things-manager/sampleapp/linux/groupsyncaction/phone.cpp
old mode 100644
(file)
new mode 100755
(executable)
index
1e9ad79
..
4693637
--- a/
service/things-manager/sampleapp/linux/groupsyncaction/phone.cpp
+++ b/
service/things-manager/sampleapp/linux/groupsyncaction/phone.cpp
@@
-40,6
+40,11
@@
static ActionSet* gPlayStart;
static ActionSet* gPlayStop;
static ActionSet* gPlayStop;
+void presenceCallback(std::string msg, OCStackResult res)
+{
+ std::cout << "Presence Callback: " << msg << "(" << res << ")" << std::endl;
+}
+
void onFindGroup(std::shared_ptr< OCResource > resource)
{
if (resource)
void onFindGroup(std::shared_ptr< OCResource > resource)
{
if (resource)
@@
-60,6
+65,12
@@
void onFindGroup(std::shared_ptr< OCResource > resource)
{
cout << "onFindGroup : Found group is saved now." << endl;
gFindGroup = resource;
{
cout << "onFindGroup : Found group is saved now." << endl;
gFindGroup = resource;
+ {
+ OCStackResult res;
+ res = gThingManager->subscribeCollectionPresence( resource, &presenceCallback);
+
+ std::cout << "Return Value: " << res << std::endl;
+ }
}
gThingManager->joinGroup(gFindGroup, gPhoneResourceHandle);
}
gThingManager->joinGroup(gFindGroup, gPhoneResourceHandle);