1 //******************************************************************
3 // Copyright 2015 Samsung Electronics All Rights Reserved.
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
11 // http://www.apache.org/licenses/LICENSE-2.0
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21 #ifndef BROKERTYPES_H_
22 #define BROKERTYPES_H_
27 #include "OCPlatform.h"
30 #include "PrimitiveResource.h"
32 #define BROKER_TAG PCF("BROKER")
33 #define BASE_LAYER_C 0
34 #define BROKER_TRANSPORT OCConnectivityType::OC_IPV4
36 typedef std::function<void(std::shared_ptr<OC::OCResource>)> FindCB;
38 typedef std::function<OCStackResult(BROKER_STATE)> BrokerCB;
40 typedef std::function<DISCOVER_TRANSACTION(std::shared_ptr<PrimitiveResource> resource)> DiscoverCB;
42 enum class DISCOVER_TRANSACTION
48 enum class BROKER_STATE
56 typedef OC::OCPlatform::OCPresenceHandle BasePresenceHandle;
57 typedef std::function<void(OCStackResult, const unsigned int,
58 const std::string&)> SubscribeCallback;
60 typedef std::function<void(const HeaderOptions&, const ResponseStatement&, int)> GetCallback;
62 #endif // BROKERTYPES_H_