client-cpp  0.10.0
Kaa.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2014-2016 CyberVision, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may 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,
12  * WITHOUT 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 
17 #ifndef KAA_HPP_
18 #define KAA_HPP_
19 
20 #include <memory>
21 
22 #include <botan/botan.h>
23 #include <botan/init.h>
24 
25 #include "kaa/IKaaClient.hpp"
29 
30 namespace kaa {
31 
37 class Kaa
38 {
39 public:
43  Kaa() = delete;
44 
48  Kaa(const Kaa&) = delete;
49 
53  Kaa& operator=(const Kaa&) = delete;
54 
63  static std::shared_ptr<IKaaClient> newClient(
64  IKaaClientPlatformContextPtr context = std::make_shared<KaaClientPlatformContext>(),
65  KaaClientStateListenerPtr listener = std::make_shared<KaaClientStateListener>());
66 
67 private:
68  static Botan::LibraryInitializer botanInit_;
69 };
70 
71 }
72 
73 #endif
std::shared_ptr< IKaaClientPlatformContext > IKaaClientPlatformContextPtr
Kaa()=delete
Use newClient() to create a Kaa client instance.
std::shared_ptr< KaaClientStateListener > KaaClientStateListenerPtr
Kaa & operator=(const Kaa &)=delete
Use newClient() to create a Kaa client instance.
static std::shared_ptr< IKaaClient > newClient(IKaaClientPlatformContextPtr context=std::make_shared< KaaClientPlatformContext >(), KaaClientStateListenerPtr listener=std::make_shared< KaaClientStateListener >())
Creates a new instance of a Kaa client.
Creates a new Kaa client based on IKaaClientPlatformContext and optional KaaClientStateListener.
Definition: Kaa.hpp:37