Lines Matching refs:std

131 std::mutex WallpaperService::instanceLock_;
135 std::shared_ptr<AppExecFwk::EventHandler> WallpaperService::serviceHandler_;
180 auto cmd = std::make_shared<Command>(std::vector<std::string>({ "-all" }), "Show all",
181 [this](const std::vector<std::string> &input, std::string &output) -> bool {
183 "WallpaperExtensionAbility\t: ExtensionInfo{" + std::string(OHOS_WALLPAPER_BUNDLE_NAME) + "}\n");
195 void WallpaperService::OnAddSystemAbility(int32_t systemAbilityId, const std::string &deviceId)
211 subscriber_ = std::make_shared<WallpaperCommonEventSubscriber>(*this);
227 std::shared_ptr<AppExecFwk::EventRunner> runner =
229 serviceHandler_ = std::make_shared<AppExecFwk::EventHandler>(runner);
261 wallpaperTmpFullPath_ = std::string(WALLPAPER_USERID_PATH) + std::string(WALLPAPER_TMP_DIRNAME);
262 wallpaperCropPath_ = std::string(WALLPAPER_USERID_PATH) + std::string(WALLPAPER_CROP_PICTURE);
264 std::lock_guard<std::mutex> lock(wallpaperColorMtx_);
283 std::lock_guard<std::mutex> lock(remoteObjectMutex_);
301 std::lock_guard<std::mutex> lock(remoteObjectMutex_);
336 std::vector<AccountSA::OsAccountInfo> osAccountInfos;
354 void WallpaperService::ClearRedundantFile(int32_t userId, WallpaperType wallpaperType, std::string fileName)
357 std::string wallpaperFilePath = GetWallpaperDir(userId, wallpaperType) + "/" + fileName;
367 std::string userDir = WALLPAPER_USERID_PATH + std::to_string(userId);
369 std::lock_guard<std::mutex> lock(mtx_);
385 std::string userDir = WALLPAPER_USERID_PATH + std::to_string(userId);
390 std::string wallpaperSystemFilePath = userDir + "/" + WALLPAPER_SYSTEM_DIRNAME;
396 std::string wallpaperLockScreenFilePath = userDir + "/" + WALLPAPER_LOCKSCREEN_DIRNAME;
412 std::string wallpaperDefaultPath = GetWallpaperDefaultPath(wallpaperType);
421 std::string WallpaperService::GetWallpaperDefaultPath(WallpaperType wallpaperType)
423 std::string wallpaperDefaultPath = (wallpaperType == WallpaperType::WALLPAPER_SYSTEM)
441 std::string userDir = WALLPAPER_USERID_PATH + std::to_string(userId);
442 std::lock_guard<std::mutex> lock(mtx_);
464 std::string userDir = WALLPAPER_USERID_PATH + std::to_string(userId);
479 std::string WallpaperService::GetWallpaperDir(int32_t userId, WallpaperType wallpaperType)
481 std::string userIdPath = WALLPAPER_USERID_PATH + std::to_string(userId);
482 std::string wallpaperFilePath;
491 bool WallpaperService::GetFileNameFromMap(int32_t userId, WallpaperType wallpaperType, std::string &filePathName)
520 bool WallpaperService::GetPictureFileName(int32_t userId, WallpaperType wallpaperType, std::string &filePathName)
548 std::string wallpaperPath = GetWallpaperDir(userId, wallpaperType);
554 std::string wallpaperFilePath =
556 std::string wallpaperDefaultFilePath = GetWallpaperDefaultPath(wallpaperType);
575 ErrorCode WallpaperService::GetColors(int32_t wallpaperType, std::vector<uint64_t> &colors)
578 std::lock_guard<std::mutex> lock(wallpaperColorMtx_);
581 std::lock_guard<std::mutex> lock(wallpaperColorMtx_);
588 ErrorCode WallpaperService::GetColorsV9(int32_t wallpaperType, std::vector<uint64_t> &colors)
625 std::string pathName;
629 std::unique_ptr<OHOS::Media::ImageSource> imageSource =
636 std::unique_ptr<PixelMap> wallpaperPixelMap = imageSource->CreatePixelMap(decodeOpts, errorCode);
641 auto colorPicker = Rosen::ColorPicker::CreateColorPicker(std::move(wallpaperPixelMap), errorCode);
665 std::shared_ptr<OHOS::Media::PixelMap> pixelMap, int32_t wallpaperType)
687 std::shared_ptr<OHOS::Media::PixelMap> pixelMap, int32_t wallpaperType)
701 int32_t userId, WallpaperResourceType resourceType, const std::string &uriOrPixelMap, WallpaperType wallpaperType)
719 std::string wallpaperFile;
722 std::lock_guard<std::mutex> lock(mtx_);
749 WallpaperResourceType resourceType, const WallpaperData &wallpaperData, std::string &wallpaperFile)
786 ErrorCode WallpaperService::SendEvent(const std::string &eventType)
810 std::string uri;
835 std::string uri;
1039 ErrorCode WallpaperService::On(const std::string &type, sptr<IWallpaperEventListener> listener)
1050 std::lock_guard<std::mutex> autoLock(listenerMapMutex_);
1055 ErrorCode WallpaperService::Off(const std::string &type, sptr<IWallpaperEventListener> listener)
1063 std::lock_guard<std::mutex> autoLock(listenerMapMutex_);
1119 bool WallpaperService::CheckCallingPermission(const std::string &permissionName)
1150 int32_t WallpaperService::Dump(int32_t fd, const std::vector<std::u16string> &args)
1152 std::vector<std::string> argsStr;
1195 std::string filePathName;
1204 std::lock_guard<std::mutex> lock(mtx_);
1219 std::string filePathName;
1229 std::lock_guard<std::mutex> lock(mtx_);
1249 std::vector<int32_t> ids;
1286 std::string uri = wallpaperTmpFullPath_;
1287 char *paperBuf = new (std::nothrow) char[length]();
1292 std::lock_guard<std::mutex> lock(mtx_);
1324 std::shared_ptr<OHOS::Media::PixelMap> pixelMap, int32_t wallpaperType, WallpaperResourceType resourceType)
1335 std::string uri = wallpaperTmpFullPath_;
1349 ErrorCode WallpaperService::WritePixelMapToFile(std::shared_ptr<OHOS::Media::PixelMap> pixelMap,
1350 std::string wallpaperTmpFullPath, int32_t wallpaperType, WallpaperResourceType resourceType)
1356 std::stringbuf stringBuf;
1357 std::ostream ostream(&stringBuf);
1368 char *buffer = new (std::nothrow) char[mapSize]();
1375 std::lock_guard<std::mutex> lock(mtx_);
1397 std::shared_ptr<OHOS::Media::PixelMap> pixelMap, std::ostream &outputStream)
1408 std::set<std::string> formats;
1424 std::vector<uint64_t> colors;
1427 std::lock_guard<std::mutex> lock(wallpaperColorMtx_);
1434 std::lock_guard<std::mutex> lock(wallpaperColorMtx_);
1461 WallpaperType wallpaperType, WallpaperResourceType resType, const std::string &uri)
1463 std::lock_guard<std::mutex> autoLock(listenerMapMutex_);
1477 void WallpaperService::NotifyColorChange(const std::vector<uint64_t> &colors, const WallpaperType &wallpaperType)
1479 std::lock_guard<std::mutex> autoLock(listenerMapMutex_);
1508 std::string json = root.dump();
1514 std::string userPath = WALLPAPER_USERID_PATH + std::to_string(userId) + "/wallpapercfg";
1534 std::string userPath = WALLPAPER_USERID_PATH + std::to_string(userId) + "/wallpapercfg";
1570 std::string WallpaperService::GetDefaultResDir()
1572 std::string resPath;
1578 resPath = cfgPath + std::string(DEFAULT_PATH);
1587 std::string WallpaperService::GetWallpaperPathInJson(const std::string filePath)
1589 std::string resPath = GetDefaultResDir();
1594 std::string manifestFile = resPath + filePath;
1595 std::ifstream file(manifestFile);
1601 std::string content((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>());
1609 std::string srcValue = root[IMAGE][SRC];
1610 std::string imageSrc;