1 //******************************************************************
3 // Copyright 2016 Samsung Electronics All Rights Reserved.
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
11 // http://www.apache.org/licenses/LICENSE-2.0
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
24 * This file contains the declaration of SceneUtils class and constant variables.
27 #ifndef SCENE_COMMONS_H
28 #define SCENE_COMMONS_H
36 const std::string SCENE_LIST_DEFAULT_NAME = "list of scene Collections";
38 const std::string SCENE_KEY_LAST_SCENE = "lastScene";
39 const std::string SCENE_KEY_SCENEVALUES = "sceneValues";
40 const std::string SCENE_KEY_NAME = "n";
41 const std::string SCENE_KEY_ID = "id";
42 const std::string SCENE_KEY_RTS = "rts";
43 const std::string SCENE_KEY_RT = "rt";
44 const std::string SCENE_KEY_IF = "if";
45 const std::string SCENE_KEY_PAYLOAD_LINK = "link";
46 const std::string SCENE_KEY_SCENEMAPPINGS = "sceneMappings";
47 const std::string SCENE_KEY_HREF = "href";
48 const std::string SCENE_KEY_SCENE = "scene";
49 const std::string SCENE_KEY_MEMBERPROPERTY = "memberProperty";
50 const std::string SCENE_KEY_MEMBERVALUE = "memberValue";
51 const std::string SCENE_KEY_CREATEDLINK = "createdlink";
53 const std::string SCENE_KEY_URI = "uri";
54 const std::string SCENE_KEY_CHILD = "child";
56 const std::string SCENE_LIST_RT = "oic.wk.scenelist";
57 const std::string SCENE_MEMBER_RT = "oic.r.scenemember";
58 const std::string SCENE_COLLECTION_RT = "oic.wk.scenecollection";
60 const std::string COAP_TAG = "coap://";
61 const std::string SCENE_LIST_URI = "/SceneListResURI";
62 const std::string PREFIX_SCENE_COLLECTION_URI = "/a/sceneCollection";
63 const std::string PREFIX_SCENE_MEMBER_URI = "/a/sceneMember";
65 const int SCENE_RESPONSE_SUCCESS = 200;
66 const int SCENE_CLIENT_BADREQUEST = 400;
67 const int SCENE_SERVER_INTERNALSERVERERROR = 500;
73 * Returns UUID for Scene collection resource and members ID.
77 static std::string OICGenerateUUIDStr();
80 * Returns host resource's address and uri from coap address.
82 * @param address uri of host resource (e.g. coap://192.168.0.2:12345/a/light)
83 * @param[out] host host resource's address (e.g. 192.168.0.2:12345)
84 * @param[out] uri host resource's uri (e.g. /a/light)
86 * @throw RCSInvalidParameterException
88 static void getHostUriString(
89 const std::string address, std::string *host, std::string *uri);
92 * Returns information of my own network address.
94 * This functionality use the CA interface for getting network information.
95 * But It has design issue. So, It will should change to other interface.
99 static std::string getNetAddress();
104 #endif // SCENE_COMMONS_H