RDK Documentation (Open Sourced RDK Components)

Description

Data Structures

struct  updateInProgress_t
 
struct  AudioInfo
 
struct  _IARM_Bus_DeviceUpdate_AcceptUpdate_Param_t
 
struct  _IARM_Bus_DeviceUpdate_Announce_t
 
struct  _IARM_Bus_DeviceUpdate_ReadyToDownload_t
 
struct  _IARM_Bus_DeviceUpdate_DownloadInitiate_t
 
struct  _IARM_Bus_DeviceUpdate_DownloadStatus_t
 
struct  _IARM_Bus_DeviceUpdate_LoadInitiate_t
 
struct  _IARM_Bus_DeviceUpdate_LoadStatus_t
 
struct  _IARM_Bus_Device_Update_Error_t
 
class  JSONParser
 

Macros

#define IARM_BUS_DEVICE_UPDATE_NAME   "DeviceUpdateManager"
 
#define IARM_BUS_DEVICE_UPDATE_PATH_LENGTH   512
 
#define IARM_BUS_DEVICE_UPDATE_ERROR_LENGTH   256
 
#define IARM_BUS_DEVICE_UPDATE_VERSION_LENGTH   32
 
#define IARM_BUS_DEVICE_UPDATE_DEVICE_NAME_LENGTH   64
 
#define IARM_BUS_DEVICE_UPDATE_MASTER_DOWNLOAD_ENABLED   0
 
#define IARM_BUS_DEVICE_UPDATE_MASTER_LOAD_ENABLED   0
 
#define IARM_BUS_DEVICE_UPDATE_API_AcceptUpdate   "AcceptUpdate"
 
#define INT_LOG(...)   printf(__VA_ARGS__)
 
#define STATUS_LOG(...)   LOG("IARMSTATUS: " __VA_ARGS__)
 

Typedefs

typedef struct updateInProgress_t updateInProgress_t
 
typedef struct _IARM_Bus_DeviceUpdate_AcceptUpdate_Param_t IARM_Bus_DeviceUpdate_AcceptUpdate_Param_t
 
typedef enum _DEVICE_Update_EventId_t IARM_Bus_DEVICE_Update_EventId_t
 
typedef enum _IARM_Bus_Device_Update_LoadDelayType_t IARM_Bus_Device_Update_LoadDelayType_t
 
typedef enum _IARM_Bus_Device_Update_LoadStatusType_t IARM_Bus_Device_Update_LoadStatusType_t
 
typedef enum _IARM_Bus_Device_Update_ErrorType_t IARM_Bus_Device_Update_ErrorType_t
 
typedef struct _IARM_Bus_DeviceUpdate_Announce_t IARM_Bus_DeviceUpdate_Announce_t
 
typedef struct _IARM_Bus_DeviceUpdate_ReadyToDownload_t IARM_Bus_DeviceUpdate_ReadyToDownload_t
 
typedef struct _IARM_Bus_DeviceUpdate_DownloadInitiate_t IARM_Bus_DeviceUpdate_DownloadInitiate_t
 
typedef struct _IARM_Bus_DeviceUpdate_DownloadStatus_t IARM_Bus_DeviceUpdate_DownloadStatus_t
 
typedef struct _IARM_Bus_DeviceUpdate_LoadInitiate_t IARM_Bus_DeviceUpdate_LoadInitiate_t
 
typedef struct _IARM_Bus_DeviceUpdate_LoadStatus_t IARM_Bus_DeviceUpdate_LoadStatus_t
 
typedef struct _IARM_Bus_Device_Update_Error_t IARM_Bus_Device_Update_Error_t
 

Enumerations

enum  _DEVICE_Update_EventId_t
 
enum  _IARM_Bus_Device_Update_LoadDelayType_t
 
enum  _IARM_Bus_Device_Update_LoadStatusType_t
 
enum  _IARM_Bus_Device_Update_ErrorType_t
 

Functions

bool loadConfig ()
 
IARM_Result_t AcceptUpdate (void *arg)
 
void sendDownLoadInit (int id)
 
void sendLoadInit (int id)
 
bool getEventData (string filename, _IARM_Bus_DeviceUpdate_Announce_t *myData)
 
void processDeviceFile (string filePath, string)
 
void processDeviceFolder (string updatePath, string)
 
IARM_Result_t deviceUpdateStart (void)
 
void deviceUpdateRun (list< JSONParser::varVal * > *folders)
 
IARM_Result_t deviceUpdateStop (void)
 
void _deviceUpdateEventHandler (const char *owner, IARM_EventId_t eventId, void *data, size_t len)
 
int main (int argc, char *argv[])
 
string getXMLTagText (string xml, string tag)
 
updateInProgress_tgetUpdateInProgress (int id)
 
static int parse_null (void *ctx)
 
static int parse_boolean (void *ctx, int boolean)
 
static int parse_number (void *ctx, const char *s, size_t l)
 
static int parse_string (void *ctx, const unsigned char *stringVal, size_t stringLen)
 
static int parse_map_key (void *ctx, const unsigned char *stringVal, size_t stringLen)
 
static int parse_start_map (void *ctx)
 
static int parse_end_map (void *ctx)
 
static int parse_start_array (void *ctx)
 
static int parse_end_array (void *ctx)
 
bool _fileExists (string fileName)
 
bool _folderExists (string folderName)
 
vector< string > * getdir (string dir)
 
map< string, varVal * > JSONParser::parse (const unsigned char *)
 

Variables

pthread_mutex_t tMutexLock
 
bool initialized = false
 
int nextID = 1
 
map< string, JSONParser::varVal * > configuration
 
string serverUpdatePath = "/srv/device_update/"
 
string tempFilePath ="/tmp/devUpdate/"
 
bool interactiveDownload =false
 
bool interactiveLoad =false
 
int loadDelayType =0
 
int loadTimeAfterInactive =0
 
int timeToLoad =0
 
bool backgroundDownload =true
 
int requestedPercentIncrement =10
 
int recheckForUpdatesMin =0
 
bool loadImageImmediately =false
 
bool forceUpdate =false
 
int loadBeforeHour =4
 
int delayTillAnnounceTimeMin =10
 
int announceCounter =10
 
bool oneAnnouncePerRun =false
 
static pthread_mutex_t mapMutex
 
map< int, updateInProgress_t * > * updatesInProgress = new map<int, updateInProgress_t *>()
 
bool running = true
 
static yajl_callbacks callbacks
 

Data Structure Documentation

◆ updateInProgress_t

struct updateInProgress_t

Definition at line 107 of file deviceUpdateMgrMain.cpp.

Collaboration diagram for updateInProgress_t:
Collaboration graph
Data Fields
_IARM_Bus_DeviceUpdate_AcceptUpdate_Param_t * acceptParams
int downloadPercent
bool loadComplete
int errorCode
string errorMsg

◆ AudioInfo

struct AudioInfo

Definition at line 849 of file deviceUpdateMgrMain.cpp.

Collaboration diagram for AudioInfo:
Collaboration graph
Data Fields
string mimeType
string subType
string language

◆ _IARM_Bus_DeviceUpdate_AcceptUpdate_Param_t

struct _IARM_Bus_DeviceUpdate_AcceptUpdate_Param_t

Definition at line 175 of file deviceUpdateMgr.h.

Collaboration diagram for _IARM_Bus_DeviceUpdate_AcceptUpdate_Param_t:
Collaboration graph
Data Fields
char deviceImageFilePath[512]
unsigned char deviceID
unsigned int updateSessionID
unsigned char interactiveDownload
unsigned char interactiveLoad

◆ _IARM_Bus_DeviceUpdate_Announce_t

struct _IARM_Bus_DeviceUpdate_Announce_t

Definition at line 279 of file deviceUpdateMgr.h.

Collaboration diagram for _IARM_Bus_DeviceUpdate_Announce_t:
Collaboration graph
Data Fields
char deviceName[64]
char deviceImageVersion[32]
unsigned int deviceImageType
char deviceImageFilePath[512]
unsigned char forceUpdate

◆ _IARM_Bus_DeviceUpdate_ReadyToDownload_t

struct _IARM_Bus_DeviceUpdate_ReadyToDownload_t

Definition at line 316 of file deviceUpdateMgr.h.

Collaboration diagram for _IARM_Bus_DeviceUpdate_ReadyToDownload_t:
Collaboration graph
Data Fields
unsigned int updateSessionID
unsigned char deviceCurrentSWVersion[32]
unsigned char deviceNewSoftwareVersion[32]
unsigned char deviceHWVersion[32]
unsigned char deviceBootloaderVersion[32]
char deviceName[64]
unsigned int totalSize
unsigned int deviceImageType

◆ _IARM_Bus_DeviceUpdate_DownloadInitiate_t

struct _IARM_Bus_DeviceUpdate_DownloadInitiate_t

Definition at line 350 of file deviceUpdateMgr.h.

Collaboration diagram for _IARM_Bus_DeviceUpdate_DownloadInitiate_t:
Collaboration graph
Data Fields
unsigned int updateSessionID
unsigned char backgroundDownload
unsigned char requestedPercentIncrement
unsigned char loadImageImmediately

◆ _IARM_Bus_DeviceUpdate_DownloadStatus_t

struct _IARM_Bus_DeviceUpdate_DownloadStatus_t

Definition at line 375 of file deviceUpdateMgr.h.

Collaboration diagram for _IARM_Bus_DeviceUpdate_DownloadStatus_t:
Collaboration graph
Data Fields
unsigned int updateSessionID
unsigned int percentComplete

◆ _IARM_Bus_DeviceUpdate_LoadInitiate_t

struct _IARM_Bus_DeviceUpdate_LoadInitiate_t

Definition at line 402 of file deviceUpdateMgr.h.

Collaboration diagram for _IARM_Bus_DeviceUpdate_LoadInitiate_t:
Collaboration graph
Data Fields
unsigned int updateSessionID
IARM_Bus_Device_Update_LoadDelayType_t loadDelayType
unsigned int timeToLoad
unsigned int timeAfterInactive

◆ _IARM_Bus_DeviceUpdate_LoadStatus_t

struct _IARM_Bus_DeviceUpdate_LoadStatus_t

Definition at line 426 of file deviceUpdateMgr.h.

Collaboration diagram for _IARM_Bus_DeviceUpdate_LoadStatus_t:
Collaboration graph
Data Fields
unsigned int updateSessionID
IARM_Bus_Device_Update_LoadStatusType_t loadStatus

◆ _IARM_Bus_Device_Update_Error_t

struct _IARM_Bus_Device_Update_Error_t

Definition at line 450 of file deviceUpdateMgr.h.

Collaboration diagram for _IARM_Bus_Device_Update_Error_t:
Collaboration graph
Data Fields
unsigned int updateSessionID
unsigned char errorMessage[256]
IARM_Bus_Device_Update_ErrorType_t errorType

◆ JSONParser

class JSONParser

Definition at line 43 of file jsonParser.h.

Collaboration diagram for JSONParser:
Collaboration graph

Public Member Functions

map< string, varVal * > parse (const unsigned char *)
 
void newKey (string keyName)
 
void newString (string value)
 
void newNull ()
 
void newBool (bool value)
 
void newArray ()
 
void endArray ()
 
map< string, varVal * > parse (const unsigned char *)
 
void newKey (string keyName)
 
void newString (string value)
 
void newNull ()
 
void newBool (bool value)
 
void newArray ()
 
void endArray ()
 

Private Attributes

string m_curKey
 
map< string, varVal * > m_dict
 
stack< list< varVal * > * > m_arrays
 
list< varVal * > * m_array
 

Macro Definition Documentation

◆ IARM_BUS_DEVICE_UPDATE_NAME

#define IARM_BUS_DEVICE_UPDATE_NAME   "DeviceUpdateManager"

IARM BUS name for Device Update Manager

Definition at line 131 of file deviceUpdateMgr.h.

Variable Documentation

◆ callbacks

yajl_callbacks callbacks
static
Initial value:
= {
parse_null,
parse_boolean,
NULL,
NULL,
parse_number,
parse_string,
parse_start_map,
parse_map_key,
parse_end_map,
parse_start_array,
parse_end_array
}

Definition at line 140 of file jsonParser.cpp.