• Home
  • Raw
  • Download

Lines Matching refs:context

29 bool HdcHostApp::BeginInstall(CtxFile *context, const char *command)  in BeginInstall()  argument
42 context->transferConfig.clientCwd = argv[i + 1]; in BeginInstall()
52 ExtractRelativePath(context->transferConfig.clientCwd, path); in BeginInstall()
54 context->taskQueue.push_back(path); in BeginInstall()
56 GetSubFiles(argv[i], ".hap", &context->taskQueue); in BeginInstall()
57 GetSubFiles(argv[i], ".hsp", &context->taskQueue); in BeginInstall()
61 if (!context->taskQueue.size()) { in BeginInstall()
66 sort(context->taskQueue.begin(), context->taskQueue.end()); in BeginInstall()
67context->taskQueue.erase(unique(context->taskQueue.begin(), context->taskQueue.end()), context->ta… in BeginInstall()
69 context->transferConfig.options = options; in BeginInstall()
70 context->transferConfig.functionName = CMDSTR_APP_INSTALL; in BeginInstall()
71 RunQueue(context); in BeginInstall()
80 bool HdcHostApp::BeginSideload(CtxFile *context, const char *localPath) in BeginSideload() argument
83 context->transferConfig.functionName = CMDSTR_APP_SIDELOAD; in BeginSideload()
84 context->taskQueue.push_back(localPath); in BeginSideload()
85 RunQueue(context); in BeginSideload()
90 void HdcHostApp::RunQueue(CtxFile *context) in RunQueue() argument
93 context->localPath = context->taskQueue.back(); in RunQueue()
94 uv_fs_open(loopTask, &context->fsOpenReq, context->localPath.c_str(), O_RDONLY, 0, OnFileOpen); in RunQueue()
95 context->master = true; in RunQueue()
98 void HdcHostApp::CheckMaster(CtxFile *context) in CheckMaster() argument
101 uv_fs_fstat(nullptr, &fs, context->fsOpenReq.result, nullptr); in CheckMaster()
102 context->transferConfig.fileSize = fs.statbuf.st_size; in CheckMaster()
105 context->transferConfig.optionalName in CheckMaster()
107 if (context->localPath.find(".hap") != static_cast<size_t>(-1)) { in CheckMaster()
108 context->transferConfig.optionalName += ".hap"; in CheckMaster()
109 } else if (context->localPath.find(".hsp") != static_cast<size_t>(-1)) { in CheckMaster()
110 context->transferConfig.optionalName += ".hsp"; in CheckMaster()
112 context->transferConfig.optionalName += ".bundle"; in CheckMaster()
114 string bufString = SerialStruct::SerializeToString(context->transferConfig); in CheckMaster()