Mistake on this page? Email us
m2mobservationhandler.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 ARM Limited. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  * Licensed under the Apache License, Version 2.0 (the License); you may
5  * not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS, WITHOUT
12  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #ifndef M2M_OBSERVATION_HANDLER_H
17 #define M2M_OBSERVATION_HANDLER_H
18 
19 // Needed for M2MBase::Operation
20 #include "m2mbase.h"
22 //FORWARD DECLARATION
24 
32 {
33  public:
34 
45  virtual bool observation_to_be_sent(M2MBase *object,
46  uint16_t obs_number,
47  const m2m::Vector<uint16_t> &changed_instance_ids,
48  bool send_object = false) = 0;
49 
55  virtual void resource_to_be_deleted(M2MBase *base) = 0;
56 
62  virtual void value_updated(M2MBase *base) = 0;
63 
68  virtual void remove_object(M2MBase *object) = 0;
69 
70 #ifndef DISABLE_DELAYED_RESPONSE
71 
75  virtual void send_delayed_response(M2MBase *base) = 0;
76 #endif
77 
78 #ifdef ENABLE_ASYNC_REST_RESPONSE
79 
88  virtual void send_asynchronous_response(M2MBase *base,
89  const uint8_t *payload,
90  size_t payload_len,
91  const uint8_t* token,
92  const uint8_t token_len,
93  coap_response_code_e code) = 0;
94 #endif
95 };
96 
97 
98 #endif // M2M_OBSERVATION_HANDLER_H
Definition: m2mobservationhandler.h:31
virtual bool observation_to_be_sent(M2MBase *object, uint16_t obs_number, const m2m::Vector< uint16_t > &changed_instance_ids, bool send_object=false)=0
The observation callback to be sent to the server due to a change in a parameter under observation...
virtual void resource_to_be_deleted(M2MBase *base)=0
A callback for removing an NSDL resource from the data structures.
virtual void send_delayed_response(M2MBase *base)=0
Sends a delayed post response to the server with &#39;COAP_MSG_CODE_RESPONSE_CHANGED&#39; response code...
The base class based on which all LwM2M object models can be created.
Definition: m2mbase.h:63
virtual void remove_object(M2MBase *object)=0
A callback for removing an object from the list.
M2MBase. This class is the base class based on which all LwM2M object models can be created...
CoAP response code values.
virtual void value_updated(M2MBase *base)=0
A callback indicating that the value of the resource object is updated by server. ...
Definition: m2mresourceinstance.h:32
Definition: m2mvector.h:30