From: jyong2.kim Date: Tue, 8 Mar 2016 04:10:24 +0000 (+0900) Subject: Modified const variable of baseline interface and excetion class. X-Git-Tag: 1.2.0+RC1~572 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=832bd02e260653329348ef74eca550760d7dc896;p=platform%2Fupstream%2Fiotivity.git Modified const variable of baseline interface and excetion class. When adding already has scene and scene member, throw exception class is changed to RE layer exception class. And const variable of baseline interface is changed at create RCSResourceObject. Change-Id: I94c9d48e6d7dc9843d028130360c42fabb931191 Signed-off-by: jyong2.kim Reviewed-on: https://gerrit.iotivity.org/gerrit/5531 Tested-by: jenkins-iotivity Reviewed-by: Uze Choi --- diff --git a/service/scene-manager/src/SceneCollectionResource.cpp b/service/scene-manager/src/SceneCollectionResource.cpp index 7585d61..d461556 100644 --- a/service/scene-manager/src/SceneCollectionResource.cpp +++ b/service/scene-manager/src/SceneCollectionResource.cpp @@ -84,8 +84,9 @@ namespace OIC RCSResourceObject::Ptr SceneCollectionResource::createResourceObject() { return RCSResourceObject::Builder( - m_uri, SCENE_COLLECTION_RT, OC_RSRVD_INTERFACE_DEFAULT). + m_uri, SCENE_COLLECTION_RT, BASELINE_IF). addInterface(OC::BATCH_INTERFACE). + addInterface(LINK_BATCH). setDiscoverable(true).setObservable(false).build(); } @@ -131,7 +132,7 @@ namespace OIC } else { - throw std::exception(); + throw RCSInvalidParameterException("Scene name is duplicate!"); } } @@ -148,7 +149,7 @@ namespace OIC if (foundmember != m_sceneMembers.end()) { - throw std::exception(); + throw RCSBadRequestException("It is already registered member."); } m_sceneMembers.push_back(newMember); diff --git a/service/scene-manager/src/SceneCommons.h b/service/scene-manager/src/SceneCommons.h index f1c8962..c2d5a37 100644 --- a/service/scene-manager/src/SceneCommons.h +++ b/service/scene-manager/src/SceneCommons.h @@ -67,9 +67,10 @@ namespace OIC const std::string PREFIX_SCENE_MEMBER_URI = "/a/sceneMember"; const std::string LINK_BATCH = "oic.if.lb"; + const std::string BASELINE_IF = "oic.if.baseline"; const OCConnectivityType SCENE_CONNECTIVITY = CT_ADAPTER_IP; - const std::string SCENE_CLIENT_REQ_IF = OC::DEFAULT_INTERFACE; + const std::string SCENE_CLIENT_REQ_IF = BASELINE_IF; const std::string SCENE_CLIENT_CREATE_REQ_IF = OC::BATCH_INTERFACE; const int SCENE_RESPONSE_SUCCESS = 200; diff --git a/service/scene-manager/src/SceneListResource.cpp b/service/scene-manager/src/SceneListResource.cpp index ef1585a..cf2d4ff 100644 --- a/service/scene-manager/src/SceneListResource.cpp +++ b/service/scene-manager/src/SceneListResource.cpp @@ -46,8 +46,9 @@ namespace OIC RCSResourceObject::Ptr SceneListResource::createResourceObject() { return RCSResourceObject::Builder( - SCENE_LIST_URI, SCENE_LIST_RT, OC_RSRVD_INTERFACE_DEFAULT). + SCENE_LIST_URI, SCENE_LIST_RT, BASELINE_IF). addInterface(OC::BATCH_INTERFACE). + addInterface(LINK_BATCH). setDiscoverable(true).setObservable(false).build(); }