X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=service%2Fresource-container%2Fexamples%2FContainerSampleClient.cpp;h=60993a8964cb080537bbcc08112fe6ce87dff435;hb=7f00f942c39b7bc27c7eeecf213a239c3fe4173c;hp=3a8bf4e5d0757b0ec9d4f5160baa3b4eb1910c26;hpb=c8e38ab66cbbb5dbbcd4aa7b702751fce5804338;p=platform%2Fupstream%2Fiotivity.git diff --git a/service/resource-container/examples/ContainerSampleClient.cpp b/service/resource-container/examples/ContainerSampleClient.cpp index 3a8bf4e..60993a8 100644 --- a/service/resource-container/examples/ContainerSampleClient.cpp +++ b/service/resource-container/examples/ContainerSampleClient.cpp @@ -180,9 +180,13 @@ void onPost2(const HeaderOptions &headerOptions, const OCRepresentation &rep, co } if (OBSERVE_TYPE_TO_USE == ObserveType::Observe) + { std::cout << std::endl << "Observe is used." << std::endl << std::endl; + } else if (OBSERVE_TYPE_TO_USE == ObserveType::ObserveAll) + { std::cout << std::endl << "ObserveAll is used." << std::endl << std::endl; + } curResource->observe(OBSERVE_TYPE_TO_USE, QueryParamsMap(), &onObserve); @@ -713,9 +717,9 @@ int main(int argc, char *argv[]) cv.wait(lock); } - catch (OCException &e) + catch (const OCException &e) { - oclog() << "Exception in main: " << e.what(); + std::cout << "Exception in main: " << e.what(); } return 0;