1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- #ifndef SP_DIR_H
- #define SP_DIR_H
- #pragma once
- #ifdef __cplusplus
- extern "C" {
- #endif
- #define ADAPTER_VERSION_FILE_NAME "depver.txt"
- #ifndef SP_MAX_VER_LEN
- #define SP_MAX_VER_LEN 128
- #endif
- /*this path created rely on program executing path*/
- typedef struct sp_dir_t {
- char *root_path; // c:\run
- char *rvc_path; //c:\rvc
- char *root_ver_path; // c:\run\ver
- char *root_hardwarecfg_path; // c:\run\hardwarecfg
- char *root_runinfo_path; // c:\run\runinfo
- char *base_path; // current version path, c:\run\ver\0.1
- char *bin_path; // $(base_path)\bin
- char *cfg_path; // $(base_path)\cfg
- char *mod_path; // $(base_path)\mod
- char *dep_path; // $(base_path)\dep
- char *obj_path; // $(base_path)\obj, for persist objects
- char *dbg_path; // $(rvc_path)\dbg
- char *slv_path; // $(rvc_path)\slv, for silverlight debug
- char *dmp_path; // $(rvc_path)\dmp, for dump
- char *ad0_path; // $(rvc_path)\ad0, for AD screen silverlight
- char *dep_ver_path; // Run\dep\0.0.0.1
- char* dep_base_path; // Run\dep
- }sp_dir_t;
- /* always return zero.*/
- int sp_dir_create(sp_dir_t **p_dir);
- void sp_dir_destroy(sp_dir_t*);
- #define SP_DIR_ROOT_INI 0
- #define SP_DIR_SHELL_INI 1
- #define SP_DIR_ENTITY_INI 2
- #define SP_DIR_MODULE_BIN 3
- #define SP_DIR_DEVICE_ENTITY_INI 4
- #define SP_DIR_RUNINFO 5
- #define SP_DIR_RUNINFO_BOOT_LOG 6 // runinfo\bootrec\boot201202.log
- #define SP_DIR_RUNINFO_INI 7
- #define SP_DIR_INSTALL_INI 8
- #define SP_DIR_EXPLORER_INI 9
- #define SP_DIR_CENTER_SETTING_INI 10
- #define SP_DIR_SHELLVAR_INI 11
- #define SP_DIR_ENTITY_DBG_LOG 12
- #define SP_DIR_RUNINFO_GLOBAL_INI 13
- #define SP_DIR_ENV_INI 14
- #define SP_DIR_DEPVER_TXT 15
- SPBASE_API int sp_dir_get_path_new(sp_dir_t*, int flag, const char* cat_name, char* buf, int len, int mode);
- int sp_dir_get_path_version(sp_dir_t*, int major, int minor, int revision, int build, int flag, const char *mod_name, char *buf, int len, int mode);
- SPBASE_API int sp_dir_get_path(sp_dir_t*, int flag, const char* cat_name, char* buf, int len);
- SPBASE_API void sp_dir_get_cur_drive(char* path);
- int sp_dir_inner_get_content(const char* file, char* ver); //SP_MAX_VER_LEN
- SPBASE_API int sp_dir_refresh_dep_path(sp_dir_t* dir);
- #ifdef __cplusplus
- } // extern "C" {
- #endif
- #endif // SP_DIR_H
|