Initial merge-commit of the OIC code. Should successfully do discovery for single...
[platform/upstream/iotivity.git] / csdk / controller / core / include / core / Protocol.hpp
1 //******************************************************************
2 //
3 // Copyright 2014 Intel Corporation All Rights Reserved.
4 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
5
6 #ifndef PROTOCOL_H_
7 #define PROTOCOL_H_
8
9 // ============================================================================
10 // Includes
11 // ============================================================================
12 #include <string>
13 #include <set>
14 #include <memory>
15 #include <stdint.h>
16 #include "Device.hpp"
17
18 // ============================================================================
19 // Forward declaration
20 // ============================================================================
21 namespace Intel {
22         namespace CCFL {
23                 namespace API {
24                         class Model;
25                 }
26         }
27 }
28
29 // ============================================================================
30 // Namespace
31 // ============================================================================
32 namespace Intel {
33 namespace CCFL {
34 namespace Protocols {
35
36 class Protocol
37 {
38 public:
39         typedef std::shared_ptr<Protocol> SharedPtr;
40         typedef std::weak_ptr<Protocol> WeakPtr;
41         typedef uint32_t Handle;
42
43         static const Handle INVALID_HANDLE = (Handle)0;
44 public:
45         virtual ~Protocol() {};
46
47 public:
48         virtual void setModel(const std::shared_ptr<Intel::CCFL::API::Model>& model) = 0;
49         virtual const Handle getHandle() = 0;
50         virtual void setHandle(const Handle handle) = 0;
51         virtual const std::string& getName() = 0;
52         virtual void forceDeviceDiscovery() = 0;
53 };
54
55 }
56 }
57 }
58
59 #endif /* PROTOCOL_H_ */