uuu
uuu (Universal Update Utility), mfgtools 3.0
|
#include <regex>
#include <iterator>
#include <memory>
#include <string.h>
#include "cmd.h"
#include "libcomm.h"
#include "liberror.h"
#include "libuuu.h"
#include "config.h"
#include "trans.h"
#include "sdps.h"
#include <atomic>
#include "buffer.h"
#include "sdp.h"
#include "fastboot.h"
#include <sys/stat.h>
#include <thread>
#include <stdio.h>
#include <stdlib.h>
Macros | |
#define | _popen popen |
#define | _pclose pclose |
Typedefs | |
typedef void *(* | FN) () |
Functions | |
int | insert_env_variable (string key, string value) |
string | get_env_variable (string key) |
int | clear_env () |
bool | is_env_exist (string key) |
int | get_string_in_square_brackets (const std::string &cmd, std::string &context) |
int | parser_cmd_list_file (shared_ptr< DataBuffer > pbuff, CmdMap *pCmdMap=nullptr) |
std::string | remove_square_brackets (const std::string &cmd) |
template<class T> | |
void * | create_object () |
string | get_next_param (const string &cmd, size_t &pos, char separate) |
string | remove_square_brackets (const string &cmd) |
int | get_string_in_square_brackets (const string &cmd, string &context) |
template<typename T, uint64_t MAX_VAL> | |
T | str_to_uint (const std::string &str, bool *conversion_succeeded) |
uint16_t | str_to_uint16 (const string &str, bool *conversion_succeeded) |
uint32_t | str_to_uint32 (const string &str, bool *conversion_succeeded) |
uint64_t | str_to_uint64 (const string &str, bool *conversion_succeeded) |
template<class T> | |
shared_ptr< CmdBase > | new_cmd_obj (char *p) |
shared_ptr< CmdBase > | create_cmd_obj (string cmd) |
int | uuu_run_cmd (const char *cmd, int dry) |
int | run_cmd (CmdCtx *pCtx, const char *cmd, int dry) |
int | run_cmds (const char *protocol, CmdCtx *p) |
static int | insert_one_cmd (const char *cmd, CmdMap *pCmdMap) |
static int | added_default_boot_cmd (const char *filename) |
int | check_version (string str) |
int | uuu_run_cmd_script (const char *buff, int) |
int | uuu_auto_detect_file (const char *filename) |
int | notify_done (uuu_notify nt, void *p) |
int | uuu_wait_uuu_finish (int deamon, int dry) |
Variables | |
static CmdMap | g_cmd_map |
static CmdObjCreateMap | g_cmd_create_map |
static string | g_cmd_list_file |
static map< thread::id, map< string, string > > | g_environment |
FN | g_fn = create_object<int> |
#define _pclose pclose |
#define _popen popen |
typedef void *(* FN) () |
|
static |
int check_version | ( | string | str | ) |
int clear_env | ( | ) |
shared_ptr< CmdBase > create_cmd_obj | ( | string | cmd | ) |
void * create_object | ( | ) |
string get_env_variable | ( | string | key | ) |
string get_next_param | ( | const string & | cmd, |
size_t & | pos, | ||
char | separate ) |
int get_string_in_square_brackets | ( | const std::string & | cmd, |
std::string & | context ) |
int get_string_in_square_brackets | ( | const string & | cmd, |
string & | context ) |
int insert_env_variable | ( | string | key, |
string | value ) |
|
static |
bool is_env_exist | ( | string | key | ) |
shared_ptr< CmdBase > new_cmd_obj | ( | char * | p | ) |
int notify_done | ( | uuu_notify | nt, |
void * | p ) |
int parser_cmd_list_file | ( | shared_ptr< DataBuffer > | pbuff, |
CmdMap * | pCmdMap = nullptr ) |
std::string remove_square_brackets | ( | const std::string & | cmd | ) |
string remove_square_brackets | ( | const string & | cmd | ) |
int run_cmd | ( | CmdCtx * | pCtx, |
const char * | cmd, | ||
int | dry ) |
int run_cmds | ( | const char * | protocol, |
CmdCtx * | p ) |
T str_to_uint | ( | const std::string & | str, |
bool * | conversion_succeeded ) |
uint16_t str_to_uint16 | ( | const string & | str, |
bool * | conversion_succeeded ) |
uint32_t str_to_uint32 | ( | const string & | str, |
bool * | conversion_succeeded ) |
uint64_t str_to_uint64 | ( | const string & | str, |
bool * | conversion_succeeded ) |
int uuu_auto_detect_file | ( | const char * | filename | ) |
int uuu_run_cmd | ( | const char * | cmd, |
int | dry ) |
int uuu_run_cmd_script | ( | const char * | buff, |
int | dry ) |
int uuu_wait_uuu_finish | ( | int | deamon, |
int | dry ) |
|
static |
|
static |
|
static |
|
static |
FN g_fn = create_object<int> |