Updated license header to reference Apache 2.0 License
[platform/upstream/iotivity.git] / include / OCApi.h
1 //******************************************************************
2 //
3 // Copyright 2014 Intel Corporation All Rights Reserved.
4 //
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6 //
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
10 //
11 //      http://www.apache.org/licenses/LICENSE-2.0
12 //
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.
18 //
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
20
21 #ifndef __INTEL_OCAPI_H_2014_07_10
22  #define __INTEL_OCAPI_H_2014_07_10
23
24 #include <string>
25 #include <vector>
26
27 namespace OC {
28
29 class OCResource;
30
31 } // namespace OC
32
33 namespace OC { namespace OCReflect {
34
35 struct entity;
36
37 }} // namespace OC::OCReflect
38
39 namespace OC {
40
41  enum class OCPlatformStatus {
42         PlatformUp,
43         PlatformDown
44  };
45
46  enum class OCAdvertisementStatus{
47         None
48  };
49
50  typedef std::string URI;
51
52  enum class ServiceType
53  {
54          InProc,
55          OutOfProc
56  };
57
58  enum class ModeType
59  {
60          Server,
61          Client,
62          Both
63  };
64
65  struct PlatformConfig
66  {
67          ServiceType serviceType; // This will indicate whether it is InProc or OutOfProc
68          ModeType mode; // This will indicate whether we want to do server, client or both
69          std::string ipAddress; // This is the ipAddress of the server to connect to
70      uint16_t port; // Port of the server
71  };
72
73 } // namespace OC
74
75 #endif