client-cpp  0.9.0
IKaaClientStateListener.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 IKAACLIENTSTATELISTENER_HPP_
18 #define IKAACLIENTSTATELISTENER_HPP_
19 
20 #include <memory>
21 
22 namespace kaa {
23 
24 class KaaException;
25 
33 public:
34 
39  virtual void onStarted() = 0;
40 
46  virtual void onStartFailure(const KaaException& exception) = 0;
47 
52  virtual void onPaused() = 0;
53 
59  virtual void onPauseFailure(const KaaException& exception) = 0;
60 
65  virtual void onResumed() = 0;
66 
72  virtual void onResumeFailure(const KaaException& exception) = 0;
73 
78  virtual void onStopped() = 0;
79 
85  virtual void onStopFailure(const KaaException& exception) = 0;
86 
87  virtual ~IKaaClientStateListener() = default;
88 };
89 
90 typedef std::shared_ptr<IKaaClientStateListener> IKaaClientStateListenerPtr;
91 
92 } /* namespace kaa */
93 
94 #endif /* IKAACLIENTSTATELISTENER_HPP_ */
virtual void onPauseFailure(const KaaException &exception)=0
On failure during Kaa client pause. Typically related to failure to free some resources.
virtual void onStartFailure(const KaaException &exception)=0
On failure during Kaa client startup. Typically failure is related to network issues.
virtual void onResumed()=0
On successful resume of Kaa client. Kaa client is successfully connected to Kaa cluster and is ready ...
virtual ~IKaaClientStateListener()=default
virtual void onStopFailure(const KaaException &exception)=0
On failure during Kaa client stop. Typically related to failure to free some resources.
virtual void onStarted()=0
On successful start of Kaa client. Kaa client is successfully connected to Kaa cluster and is ready f...
virtual void onStopped()=0
On successful stop of Kaa client. Kaa client is successfully stopped and does not consume any resourc...
Notifies about Kaa client state changes and errors.
virtual void onResumeFailure(const KaaException &exception)=0
On failure during Kaa client resume. Typically failure is related to network issues.
virtual void onPaused()=0
On successful pause of Kaa client. Kaa client is successfully paused and does not consume any resourc...
std::shared_ptr< IKaaClientStateListener > IKaaClientStateListenerPtr