LunaSysMgr
|
#include <ApplicationInstaller.h>
Public Member Functions | |
bool | install (const std::string &targetPackageName, unsigned int uncompressedAppSizeInKB, const unsigned long ticket) |
void | notifyAppInstalled (const std::string &appId, const std::string &appVersion) |
bool | downloadAndInstall (LSHandle *handle, const std::string &targetPackageFile, struct json_object *authToken, struct json_object *deviceId, unsigned long ticket, bool subscribe) |
void | oneCommandProcessed () |
void | notifyAppRemoved (const std::string &appId, const std::string &appVersion, int cause=APPREMOVED_CAUSE_UNKNOWN) |
bool | allowSuspend () |
json_object * | packageInfoFileToJson (const std::string &packageId) |
Static Public Member Functions | |
static ApplicationInstaller * | instance () |
static bool | cbInstallProgressQuery (LSHandle *lshandle, LSMessage *msg, void *user_data) |
static bool | cbInstall (LSHandle *lshandle, LSMessage *msg, void *user_data) |
static bool | cbInstallNoVerify (LSHandle *lshandle, LSMessage *msg, void *user_data) |
static bool | cbRemove (LSHandle *lshandle, LSMessage *msg, void *user_data) |
static gboolean | cbShallowRemove (gpointer param) |
static bool | cbIsInstalled (LSHandle *lshandle, LSMessage *msg, void *user_data) |
static bool | cbNotifyOnChange (LSHandle *lshandle, LSMessage *msg, void *user_data) |
static bool | cbGetSizes (LSHandle *lshandle, LSMessage *msg, void *user_data) |
static bool | cbQueryInstallCapacity (LSHandle *lshandle, LSMessage *msg, void *user_data) |
static bool | cbDetermineInstallSpaceNeeded (LSHandle *lshandle, LSMessage *msg, void *user_data) |
static bool | cbRevoke (LSHandle *lshandle, LSMessage *msg, void *user_data) |
static bool | cbPubSubRegister (LSHandle *handle, LSMessage *message, void *ctxt) |
static bool | cbPubSubStatus (LSHandle *handle, LSMessage *msg, void *ctxt) |
static bool | cbDbgGetPkgInfoFromStatusFile (LSHandle *lshandle, LSMessage *msg, void *user_data) |
static bool | cbDbgCopyDir (LSHandle *lshandle, LSMessage *msg, void *user_data) |
static bool | cbDbgFakeFsSize (LSHandle *lshandle, LSMessage *msg, void *user_data) |
static bool | cbDbgUnFakeFsSizes (LSHandle *lshandle, LSMessage *msg, void *user_data) |
static bool | cbGetFsSize (LSHandle *lshandle, LSMessage *msg, void *user_data) |
static bool | cbDbgFillSize (LSHandle *lshandle, LSMessage *msg, void *user_data) |
static bool | cbDbgGetAppSizeOnFs (LSHandle *lshandle, LSMessage *msg, void *user_data) |
static uint64_t | getSizeOfAppDir (const std::string &dirName) |
static int | _getSizeCbFn (const char *fpath, const struct stat *sb, int typeflag, struct FTW *ftwbuf) |
static int | _getSizeOfAppCbFn (const char *fpath, const struct stat *sb, int typeflag, struct FTW *ftwbuf) |
static uint64_t | getSizeOfAppOnFs (const std::string &destFsPath, const std::string &dirName, uint32_t *r_pBsize=NULL) |
static uint64_t | getSizeOfPackageOnFsGenerateManifest (const std::string &destFsPath, PackageDescription *packageDesc, uint32_t *r_pBsize) |
static uint64_t | getSizeOfPackageById (const std::string &packageId) |
static uint64_t | getFsFreeSpaceInMB (const std::string &pathOnFs) |
static uint64_t | getFsFreeSpaceInBlocks (const std::string &pathOnFs, uint64_t *pBlockSize=0) |
static bool | extractVersionFromAppInfo (const std::string &appBaseDir, std::string &r_versionString) |
static bool | getDownloadPathBasedOnSpaceRemaining (std::string &packageDownloadPath) |
static bool | isValidInstallURI (const std::string &url) |
Static Public Attributes | |
static std::string | s_installer_version = "1.0.0" |
static Mutex | s_sizeFnMutex |
static uint64_t | s_sizeFnAccumulator = 0 |
static uint64_t | s_auxSizeFnAccumulator = 0 |
static uint64_t | s_targetFsBlockSize = 0 |
static std::string | s_sizeFnBaseDir |
static json_object * | s_manifestJobj = 0 |
|
static |
|
static |
bool ApplicationInstaller::allowSuspend | ( | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Nearly identical to cbInstall, but will pass in a parameter to cbInstall_detached that will disable package verification.
The reason why this is a completely separate function is that it seems the current lunabus security mechanism cannot disallow only parameters to functions, but whole functions only. Therefore a separate function for "no verify" exists so it can be locked down
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
bool ApplicationInstaller::downloadAndInstall | ( | LSHandle * | handle, |
const std::string & | targetPackageFile, | ||
struct json_object * | authToken, | ||
struct json_object * | deviceId, | ||
unsigned long | ticket, | ||
bool | subscribe | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
bool ApplicationInstaller::install | ( | const std::string & | targetPackageName, |
unsigned int | uncompressedAppSizeInKB, | ||
const unsigned long | ticket | ||
) |
|
static |
|
static |
Check for valid URI and ipk
void ApplicationInstaller::notifyAppInstalled | ( | const std::string & | appId, |
const std::string & | appVersion | ||
) |
void ApplicationInstaller::notifyAppRemoved | ( | const std::string & | appId, |
const std::string & | appVersion, | ||
int | cause = APPREMOVED_CAUSE_UNKNOWN |
||
) |
void ApplicationInstaller::oneCommandProcessed | ( | ) |
json_object * ApplicationInstaller::packageInfoFileToJson | ( | const std::string & | packageId | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |