leo hendrickson / Mbed OS example-Ethernet-mbed-Cloud-connect
Committer:
leothedragon
Date:
Tue May 04 08:55:12 2021 +0000
Revision:
0:8f0bb79ddd48
nmn

Who changed what in which revision?

UserRevisionLine numberNew contents of line
leothedragon 0:8f0bb79ddd48 1 /*
leothedragon 0:8f0bb79ddd48 2 * Copyright (c) 2015 ARM Limited. All rights reserved.
leothedragon 0:8f0bb79ddd48 3 * SPDX-License-Identifier: Apache-2.0
leothedragon 0:8f0bb79ddd48 4 * Licensed under the Apache License, Version 2.0 (the License); you may
leothedragon 0:8f0bb79ddd48 5 * not use this file except in compliance with the License.
leothedragon 0:8f0bb79ddd48 6 * You may obtain a copy of the License at
leothedragon 0:8f0bb79ddd48 7 *
leothedragon 0:8f0bb79ddd48 8 * http://www.apache.org/licenses/LICENSE-2.0
leothedragon 0:8f0bb79ddd48 9 *
leothedragon 0:8f0bb79ddd48 10 * Unless required by applicable law or agreed to in writing, software
leothedragon 0:8f0bb79ddd48 11 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
leothedragon 0:8f0bb79ddd48 12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
leothedragon 0:8f0bb79ddd48 13 * See the License for the specific language governing permissions and
leothedragon 0:8f0bb79ddd48 14 * limitations under the License.
leothedragon 0:8f0bb79ddd48 15 */
leothedragon 0:8f0bb79ddd48 16 #ifndef EVENT_DATA_H
leothedragon 0:8f0bb79ddd48 17 #define EVENT_DATA_H
leothedragon 0:8f0bb79ddd48 18
leothedragon 0:8f0bb79ddd48 19 #include "mbed-client/m2mvector.h"
leothedragon 0:8f0bb79ddd48 20
leothedragon 0:8f0bb79ddd48 21 //FORWARD DECLARATION
leothedragon 0:8f0bb79ddd48 22 class M2MObject;
leothedragon 0:8f0bb79ddd48 23
leothedragon 0:8f0bb79ddd48 24
leothedragon 0:8f0bb79ddd48 25 typedef Vector<M2MObject *> M2MObjectList;
leothedragon 0:8f0bb79ddd48 26
leothedragon 0:8f0bb79ddd48 27 class M2MSecurity;
leothedragon 0:8f0bb79ddd48 28
leothedragon 0:8f0bb79ddd48 29 class EventData
leothedragon 0:8f0bb79ddd48 30 {
leothedragon 0:8f0bb79ddd48 31 public:
leothedragon 0:8f0bb79ddd48 32 virtual ~EventData() {}
leothedragon 0:8f0bb79ddd48 33 };
leothedragon 0:8f0bb79ddd48 34
leothedragon 0:8f0bb79ddd48 35 class M2MSecurityData : public EventData
leothedragon 0:8f0bb79ddd48 36 {
leothedragon 0:8f0bb79ddd48 37 public:
leothedragon 0:8f0bb79ddd48 38 M2MSecurityData()
leothedragon 0:8f0bb79ddd48 39 :_object(NULL){}
leothedragon 0:8f0bb79ddd48 40 virtual ~M2MSecurityData() {}
leothedragon 0:8f0bb79ddd48 41 M2MSecurity *_object;
leothedragon 0:8f0bb79ddd48 42 };
leothedragon 0:8f0bb79ddd48 43
leothedragon 0:8f0bb79ddd48 44 class ResolvedAddressData : public EventData
leothedragon 0:8f0bb79ddd48 45 {
leothedragon 0:8f0bb79ddd48 46 public:
leothedragon 0:8f0bb79ddd48 47 ResolvedAddressData()
leothedragon 0:8f0bb79ddd48 48 :_address(NULL),
leothedragon 0:8f0bb79ddd48 49 _port(0){}
leothedragon 0:8f0bb79ddd48 50 virtual ~ResolvedAddressData() {}
leothedragon 0:8f0bb79ddd48 51 const M2MConnectionObserver::SocketAddress *_address;
leothedragon 0:8f0bb79ddd48 52 uint16_t _port;
leothedragon 0:8f0bb79ddd48 53 };
leothedragon 0:8f0bb79ddd48 54
leothedragon 0:8f0bb79ddd48 55 class ReceivedData : public EventData
leothedragon 0:8f0bb79ddd48 56 {
leothedragon 0:8f0bb79ddd48 57 public:
leothedragon 0:8f0bb79ddd48 58 ReceivedData()
leothedragon 0:8f0bb79ddd48 59 :_data(NULL),
leothedragon 0:8f0bb79ddd48 60 _size(0),
leothedragon 0:8f0bb79ddd48 61 _port(0),
leothedragon 0:8f0bb79ddd48 62 _address(NULL){}
leothedragon 0:8f0bb79ddd48 63 virtual ~ReceivedData() {}
leothedragon 0:8f0bb79ddd48 64 uint8_t *_data;
leothedragon 0:8f0bb79ddd48 65 uint16_t _size;
leothedragon 0:8f0bb79ddd48 66 uint16_t _port;
leothedragon 0:8f0bb79ddd48 67 const M2MConnectionObserver::SocketAddress *_address;
leothedragon 0:8f0bb79ddd48 68 };
leothedragon 0:8f0bb79ddd48 69
leothedragon 0:8f0bb79ddd48 70 class M2MRegisterData : public EventData
leothedragon 0:8f0bb79ddd48 71 {
leothedragon 0:8f0bb79ddd48 72 public:
leothedragon 0:8f0bb79ddd48 73 M2MRegisterData()
leothedragon 0:8f0bb79ddd48 74 :_object(NULL){}
leothedragon 0:8f0bb79ddd48 75 virtual ~M2MRegisterData() {}
leothedragon 0:8f0bb79ddd48 76 M2MSecurity *_object;
leothedragon 0:8f0bb79ddd48 77 M2MBaseList _base_list;
leothedragon 0:8f0bb79ddd48 78 };
leothedragon 0:8f0bb79ddd48 79
leothedragon 0:8f0bb79ddd48 80 class M2MUpdateRegisterData : public EventData
leothedragon 0:8f0bb79ddd48 81 {
leothedragon 0:8f0bb79ddd48 82 public:
leothedragon 0:8f0bb79ddd48 83 M2MUpdateRegisterData()
leothedragon 0:8f0bb79ddd48 84 :_object(NULL),
leothedragon 0:8f0bb79ddd48 85 _lifetime(0){}
leothedragon 0:8f0bb79ddd48 86 virtual ~M2MUpdateRegisterData() {}
leothedragon 0:8f0bb79ddd48 87 M2MSecurity *_object;
leothedragon 0:8f0bb79ddd48 88 uint32_t _lifetime;
leothedragon 0:8f0bb79ddd48 89 M2MBaseList _base_list;
leothedragon 0:8f0bb79ddd48 90 };
leothedragon 0:8f0bb79ddd48 91
leothedragon 0:8f0bb79ddd48 92
leothedragon 0:8f0bb79ddd48 93 #endif //EVENT_DATA_H
leothedragon 0:8f0bb79ddd48 94