Friendly LWM2M client
AudioClip.h
Go to the documentation of this file.
1 /*
2  * AudioClip
3  * Generated on: 2024-03-11 13:52:27
4  * Created by: Sinai RnD
5  */
6 
7 #ifndef WPP_O_3339_AUDIO_CLIP_H
8 #define WPP_O_3339_AUDIO_CLIP_H
9 
10 #include "AudioClipConfig.h"
11 #include "AudioClipInfo.h"
12 #include "Instance.h"
13 #include "InstSubject.h"
14 
15 /* --------------- Сode_h block 0 start --------------- */
16 /* --------------- Сode_h block 0 end --------------- */
17 
18 namespace wpp {
19 
20 class WppClient;
21 class Object;
22 
23 /* --------------- Сode_h block 1 start --------------- */
24 /* --------------- Сode_h block 1 end --------------- */
25 
26 class AudioClip : public Instance {
27 public:
28  enum ID: ID_T {
29  CLIP_5522 = 5522,
30  #if RES_3339_5523
31  TRIGGER_5523 = 5523,
32  #endif
33  #if RES_3339_5548
34  LEVEL_5548 = 5548,
35  #endif
36  #if RES_3339_5524
37  DURATION_5524 = 5524,
38  #endif
39  #if RES_3339_5750
40  APPLICATION_TYPE_5750 = 5750,
41  #endif
42  };
43 
44  /* --------------- Code_h block 2 start --------------- */
45  /* --------------- Code_h block 2 end --------------- */
46 
47 public:
48  AudioClip(lwm2m_context_t &context, const OBJ_LINK_T &id);
49  ~AudioClip();
50 
51  /* --------------- Helpful methods --------------- */
57  static Object & object(WppClient &ctx);
58 
65  static AudioClip * instance(WppClient &ctx, ID_T instId = ID_T_MAX_VAL);
66 
73  static AudioClip * createInst(WppClient &ctx, ID_T instId = ID_T_MAX_VAL);
74 
81  static bool removeInst(WppClient &ctx, ID_T instId);
82 
83  /* --------------- Code_h block 3 start --------------- */
84  /* --------------- Code_h block 3 end --------------- */
85 
86 protected:
87  /* --------------- Instance implementation part --------------- */
88  /*
89  * Handles information about resource operation that made server
90  */
91  void serverOperationNotifier(Instance *securityInst, ItemOp::TYPE type, const ResLink &resLink) override;
92  /*
93  * Handles information about resource operation that made user
94  */
95  void userOperationNotifier(ItemOp::TYPE type, const ResLink &resLink) override;
96 
97  /* --------------- Code_h block 4 start --------------- */
98  /* --------------- Code_h block 4 end --------------- */
99 
100 private:
101  /* --------------- Class private methods --------------- */
102  /*
103  * Creates resources without initializing.
104  */
105  void resourcesCreate();
106  /*
107  * Initialize resources with default values
108  * SINGLE resource always must have at least one instance.
109  */
110  void resourcesInit();
111 
112  /* --------------- Code_h block 5 start --------------- */
113  /* --------------- Code_h block 5 end --------------- */
114 
115 private:
116  /* --------------- Class private properties --------------- */
117  /* --------------- Code_h block 6 start --------------- */
118  /* --------------- Code_h block 6 end --------------- */
119 };
120 
121 } /* namespace wpp */
122 
123 #endif /* WPP_O_3339_AUDIO_CLIP_H */
#define ID_T_MAX_VAL
Definition: WppTypes.h:16
AudioClip(lwm2m_context_t &context, const OBJ_LINK_T &id)
Definition: AudioClip.cpp:22
void serverOperationNotifier(Instance *securityInst, ItemOp::TYPE type, const ResLink &resLink) override
This method must be implemented by the derived class, and handle information about resource operation...
Definition: AudioClip.cpp:59
static bool removeInst(WppClient &ctx, ID_T instId)
Removes an instance of the object.
Definition: AudioClip.cpp:55
void userOperationNotifier(ItemOp::TYPE type, const ResLink &resLink) override
This method must be implemented by the derived class, and handle information about resource operation...
Definition: AudioClip.cpp:78
static AudioClip * instance(WppClient &ctx, ID_T instId=ID_T_MAX_VAL)
Gets an instance of the object.
Definition: AudioClip.cpp:43
static Object & object(WppClient &ctx)
Gets the Object reference.
Definition: AudioClip.cpp:39
static AudioClip * createInst(WppClient &ctx, ID_T instId=ID_T_MAX_VAL)
Creates an instance of the object.
Definition: AudioClip.cpp:49
Instance is interface class that implements manipulation with derived class resources....
Definition: Instance.h:40
The Object class implements manipulation with Instance interface class and its inheritors.
Definition: Object.h:32
Represents a client interface for Wpp library.
Definition: WppClient.h:37
The WppConnection class represents a connection interface for the Wpp library.
Definition: WppClient.cpp:14
uint16_t ID_T
Definition: WppTypes.h:15
TYPE
Enum representing the different types of operations.
Definition: ItemOp.h:29