dpyOtaupdater Namespace Reference

Deepsy Otaupdater namespace that includes the different enums, structs or method signatures that should be used.

Classes

struct  Channel
 

Typedefs

typedef boost::function< void(const bool &available)> service_availability_handler
 Prototype of the handler function used to monitor service availability. More...
 
typedef boost::function< void(boost::system::error_code error_code, int status, int rfsstatus)> status_handler_function
 Handler for status function callback. More...
 
typedef 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. More...
 
typedef 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. More...
 
typedef boost::function< void(boost::system::error_code error_code)> result_handler_function
 Handler for command function callback. More...
 
typedef 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. More...
 
typedef 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. More...
 
typedef boost::function< void(boost::system::error_code error_code, int operation, int percentage)> operation_percentage_handler_function
 Handler for operation percentage function callback. More...
 

Enumerations

enum  ServiceStatus {
  INIT = 0, SYNCHRONIZING = 1, IDLE = 2, RECOVERING = 3,
  OPERATING = 4, COMPLETE_RFS = 5, END = 6
}
 
enum  AltRFSStatus {
  OK = 0, ERROR = 1, IN_PROCESS = 2, UPGRADED = 3,
  BACKUP = 4
}
 
enum  OperationType {
  NO_OPERATING = 0, INSTALLING = 1, UPGRADING = 2, REMOVING = 3,
  DOWNLOADING = 4
}
 

Typedef Documentation

typedef boost::function<void(boost::system::error_code error_code, std::vector<std::pair<std::string, Channel>> &channelList)> channels_handler_function

This type of function is called when the getchannels callback is done.

Parameters
error_codeerror code (if any)
channelListvector with the updates list
typedef boost::function<void(boost::system::error_code error_code, int operation, int percentage)> operation_percentage_handler_function

This type of function is called when the operation percentage callback is done.

Parameters
error_codeerror code (if any)
operationenum of the current operation
percentage0-100 value that indicates the operation percentage
typedef boost::function<void(boost::system::error_code error_code, std::vector<std::pair<std::string, std::string>> &updatesList)> remoteversionlist_handler_function
Parameters
error_codeerror code (if any)
updatesListvector with the packages version list
typedef boost::function<void(boost::system::error_code error_code)> result_handler_function

This type of function is called when a command (start,stop,add,del) callback is done.

Parameters
error_codeerror code (if any)
typedef boost::function<void(const bool &available)> service_availability_handler
Parameters
availabletrue if the service is available, false otherwise
typedef boost::function<void(boost::system::error_code error_code, int status, int rfsstatus)> status_handler_function

This type of function is called when the status callback is done.

Parameters
error_codeerror code (if any)
statuswith the service status
statuswith the alternative RFS status
typedef boost::function<void(boost::system::error_code error_code, std::vector<std::pair<std::string, std::string>> &updatesList)> updateslist_handler_function
Parameters
error_codeerror code (if any)
versionListvector with the packages version list
typedef boost::function<void(boost::system::error_code error_code, std::map<std::string, std::pair<std::string, std::string>> &versionList)> versionlist_handler_function
Parameters
error_codeerror code (if any)
versionListvector with the packages version list

Enumeration Type Documentation

Enum with the alternative RFS status

Enumerator
OK 

Alternative RFS has a copy of the current RFS

ERROR 

Alternative RFS has no valid RFS

IN_PROCESS 

Alternative RFS is being upgraded

UPGRADED 

Alternative RFS is upgraded

BACKUP 

Alternative RFS has a backup (previous RFS)

Enum operation types

Enumerator
NO_OPERATING 

No operation

INSTALLING 

Installing operation

UPGRADING 

Upgrading operation

REMOVING 

REMOVING operation

DOWNLOADING 

DOWNLOADING operation

Enum with the service status

Enumerator
INIT 

Initial state

SYNCHRONIZING 

Synchronizing packages

IDLE 

Waiting for command

RECOVERING 

Recovering

OPERATING 

Doing an operation: INSTALL, UPDATE, REMOVE

COMPLETE_RFS 

Updating complete RFS

END 

Final state