1 //******************************************************************
3 // Copyright 2014 Intel Corporation All Rights Reserved.
4 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6 #ifndef CHARACTERISTIC_H_
7 #define CHARACTERISTIC_H_
9 // ============================================================================
11 // ============================================================================
18 // ============================================================================
20 // ============================================================================
25 // ============================================================================
27 // ============================================================================
28 class PropertyGetResult {
29 // ============================================================
31 // ============================================================
33 virtual ~PropertyGetResult() {}
35 // ============================================================
37 // ============================================================
39 virtual QueryResultType getResult() const = 0;
40 virtual const std::string& getName() const = 0;
41 virtual const std::string& getValue() const = 0;
44 typedef std::function<void (const PropertyGetResult&)> PropertyGetFunction;
46 // ============================================================================
48 // ============================================================================
49 class PropertySetResult {
50 // ============================================================
52 // ============================================================
54 virtual ~PropertySetResult() {}
56 // ============================================================
58 // ============================================================
60 virtual QueryResultType getResult() const = 0;
61 virtual const std::string& getName() const = 0;
62 virtual const std::string& getValue() const = 0;
65 typedef std::function<void (const PropertySetResult&)> PropertySetFunction;
67 // ============================================================================
69 // ============================================================================
71 class Characteristic {
72 // ============================================================
74 // ============================================================
76 typedef std::shared_ptr<Characteristic> SharedPtr;
77 typedef std::weak_ptr<Characteristic> WeakPtr;
79 // ============================================================
81 // ============================================================
83 virtual ~Characteristic() {}
85 // ============================================================
87 // ============================================================
89 virtual const std::string& getName() const = 0;
90 virtual bool isReadable() const = 0;
91 virtual bool isWritable() const = 0;
92 virtual bool isConstant() const = 0;