Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed Socket lwip-eth lwip-sys lwip
Fork of 6_songs-from-the-cloud by
m2minterfaceobserver.h
00001 /* 00002 * Copyright (c) 2015 ARM Limited. All rights reserved. 00003 * SPDX-License-Identifier: Apache-2.0 00004 * Licensed under the Apache License, Version 2.0 (the License); you may 00005 * not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an AS IS BASIS, WITHOUT 00012 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 #ifndef M2M_INTERFACE_OBSERVER_H 00017 #define M2M_INTERFACE_OBSERVER_H 00018 00019 #include "mbed-client/m2mbase.h" 00020 #include "mbed-client/m2minterface.h" 00021 00022 //FORWARD DECLARATION 00023 class M2MServer; 00024 00025 /** 00026 * @brief M2MInterfaceObserver 00027 * This is an observer class that updates the calling application about 00028 * various events associated with various Interface operations. 00029 * Also, it informs about various errors that can occur during any of the above 00030 * operations. 00031 */ 00032 class M2MInterfaceObserver { 00033 00034 public: 00035 00036 /** 00037 * @brief Callback indicating that the bootstap has been done successfully. 00038 * @param server_object Server object that contains information fetched 00039 * about the LWM2M server from the bootstrap server. This object can be used 00040 * to register to the LWM2M server. The object ownership is passed. 00041 */ 00042 virtual void bootstrap_done(M2MSecurity *server_object) = 0; 00043 00044 /** 00045 * @brief Callback indicating that the device object has been registered 00046 * successfully to the LWM2M server. 00047 * @param security_object Server object on which the device object is 00048 * registered. The object ownership is passed. 00049 * @param server_object, Object containing information about the LWM2M server. 00050 * The client maintains the object. 00051 */ 00052 virtual void object_registered(M2MSecurity *security_object, const M2MServer &server_object) = 0; 00053 00054 /** 00055 * @brief Callback indicating that the device object has been successfully unregistered 00056 * from the LWM2M server. 00057 * @param server_object Server object from which the device object is 00058 * unregistered. The object ownership is passed. 00059 */ 00060 virtual void object_unregistered(M2MSecurity *server_object) = 0; 00061 00062 /** 00063 * @brief Callback indicating that the device object registration has been successfully 00064 * updated on the LWM2M server. 00065 * @param security_object Server object on which the device object registration 00066 * updated. The object ownership is passed. 00067 * @param server_object, Object containing information about the LWM2M server. 00068 * The client maintains the object. 00069 */ 00070 virtual void registration_updated(M2MSecurity *security_object, const M2MServer & server_object) = 0; 00071 00072 /** 00073 * @brief Callback indicating that there is an error during the operation. 00074 * @param error Error code informing about the error that occured. 00075 */ 00076 virtual void error(M2MInterface::Error error) = 0; 00077 00078 /** 00079 * @brief Callback indicating that the value of the resource object is updated by the server. 00080 * @param base Object whose value is updated. 00081 * @param type Type of object. 00082 */ 00083 virtual void value_updated(M2MBase *base, M2MBase::BaseType type) = 0; 00084 }; 00085 00086 #endif // M2M_INTERFACE_OBSERVER_H
Generated on Tue Jul 12 2022 12:47:47 by
