otaupdaterClient.h
Go to the documentation of this file.
1 
5 #pragma once
6 
7 #include "otaupdaterProto.pb.h"
8 
9 #include "../../../../LIBRARIES/MIDDLEWARE/src/com/dpyMwClient.h"
10 #include "otaupdaterApi.h"
11 
16 {
17 private:
18  void RegisterCallbacks();
19 public:
20  OtaUpdaterClient(std::string &ip, int dport, int sport);
22 
23  void getStatus(dpyOtaupdater::status_handler_function handler);
24  void getStatus_S(dpyOtaupdater::status_handler_function handler);
25  void getStatus_U();
26 
27  void sync(dpyOtaupdater::result_handler_function handler);
28  void getUpdates(dpyOtaupdater::updateslist_handler_function handler);
29  void getVersion(dpyOtaupdater::versionlist_handler_function handler, std::vector<std::string> packages = {""});
30  void getRemoteVersions(dpyOtaupdater::remoteversionlist_handler_function handler, std::vector<std::string> packages = {});
31 
32  void upgrade(dpyOtaupdater::result_handler_function handler, std::vector<std::string> packages = {""});
33  void install(dpyOtaupdater::result_handler_function handler, std::vector<std::string> packages = {""});
34  void uninstall(dpyOtaupdater::result_handler_function handler, std::vector<std::string> packages = {""});
35 
36  void rollback(dpyOtaupdater::result_handler_function handler);
37  void discard(dpyOtaupdater::result_handler_function handler);
39 
40  void addChannel(dpyOtaupdater::result_handler_function handler, std::string name, dpyOtaupdater::Channel channel);
41  void delChannel(dpyOtaupdater::result_handler_function handler, std::string name);
42  void getChannels(dpyOtaupdater::channels_handler_function handler, std::string name = "");
43 
44  void getOperationPercentage(dpyOtaupdater::operation_percentage_handler_function handler);
45  void getOperationPercentage_S(dpyOtaupdater::operation_percentage_handler_function handler);
46  void getOperationPercentage_U();
47 };
boost::function< void(boost::system::error_code error_code, std::vector< std::pair< std::string, std::string >> &updatesList)> remoteversionlist_handler_function
Handler for GetRemoteVersions function callback.
Definition: otaupdaterApi.h:127
boost::function< void(boost::system::error_code error_code, std::vector< std::pair< std::string, Channel >> &channelList)> channels_handler_function
Handler for getchannels function callback.
Definition: otaupdaterApi.h:120
boost::function< void(boost::system::error_code error_code)> result_handler_function
Handler for command function callback.
Definition: otaupdaterApi.h:111
Definition: otaupdaterApi.h:27
boost::function< void(boost::system::error_code error_code, int status, int rfsstatus)> status_handler_function
Handler for status function callback.
Definition: otaupdaterApi.h:89
Interacts with ota updater service.
Definition: otaupdaterClient.h:15
boost::function< void(boost::system::error_code error_code, int operation, int percentage)> operation_percentage_handler_function
Handler for operation percentage function callback.
Definition: otaupdaterApi.h:137
boost::function< void(boost::system::error_code error_code, std::map< std::string, std::pair< std::string, std::string >> &versionList)> versionlist_handler_function
Handler for getVersions function callback.
Definition: otaupdaterApi.h:103
Manages dealer and susbriber.
Definition: dpyMwClient.h:59
boost::function< void(boost::system::error_code error_code, std::vector< std::pair< std::string, std::string >> &updatesList)> updateslist_handler_function
Handler for getUpdates function callback.
Definition: otaupdaterApi.h:96