mirror of
https://gitee.com/openharmony/filemanagement_dfs_service
synced 2024-11-23 08:00:07 +00:00
增加获取云盘空间的接口
Signed-off-by: 崔季风 <cuijifeng@huawei.com>
This commit is contained in:
parent
e800308253
commit
4151843bb3
@ -23,6 +23,7 @@ namespace OHOS::FileManagement::CloudFile {
|
||||
class CloudFileKitImpl final : public CloudFileKit {
|
||||
public:
|
||||
int32_t GetCloudUserInfo(const int32_t userId, CloudUserInfo &userInfo) override;
|
||||
uint64_t GetRemainSpace(const int32_t userId) override;
|
||||
int32_t GetAppSwitchStatus(const std::string &bundleName, const int32_t userId, bool &switchStatus) override;
|
||||
int32_t ResolveNotificationEvent(const int32_t userId,
|
||||
const std::string &extraData,
|
||||
|
@ -37,6 +37,11 @@ int32_t CloudFileKitImpl::GetCloudUserInfo(const int32_t userId, CloudUserInfo &
|
||||
return E_OK;
|
||||
}
|
||||
|
||||
uint64_t CloudFileKitImpl::GetRemainSpace(const int32_t userId)
|
||||
{
|
||||
return E_OK;
|
||||
}
|
||||
|
||||
int32_t CloudFileKitImpl::GetAppSwitchStatus(const std::string &bundleName,
|
||||
const int32_t userId,
|
||||
bool &switchStatus)
|
||||
|
@ -39,6 +39,11 @@ int32_t CloudFileKit::GetCloudUserInfo(const int32_t userId, CloudUserInfo &user
|
||||
return E_OK;
|
||||
}
|
||||
|
||||
uint64_t CloudFileKit::GetRemainSpace(const int32_t userId)
|
||||
{
|
||||
return E_OK;
|
||||
}
|
||||
|
||||
int32_t CloudFileKit::GetAppSwitchStatus(const std::string &bundleName, const int32_t userId, bool &switchStatus)
|
||||
{
|
||||
switchStatus = true;
|
||||
|
@ -44,6 +44,12 @@ int32_t CloudStatus::GetCurrentCloudInfo(const std::string &bundleName, const in
|
||||
return E_OK;
|
||||
}
|
||||
|
||||
uint64_t CloudStatus::GetCurrentRemainSpace(const int32_t userId)
|
||||
{
|
||||
auto instance = CloudFile::CloudFileKit::GetInstance();
|
||||
return instance->GetRemainSpace(userId);
|
||||
}
|
||||
|
||||
bool CloudStatus::IsCloudStatusOkay(const std::string &bundleName, const int32_t userId)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
|
@ -34,6 +34,7 @@ public:
|
||||
|
||||
virtual ~CloudFileKit() = default;
|
||||
virtual int32_t GetCloudUserInfo(const int32_t userId, CloudUserInfo &userInfo);
|
||||
virtual uint64_t GetRemainSpace(const int32_t userId);
|
||||
virtual int32_t GetAppSwitchStatus(const std::string &bundleName, const int32_t userId, bool &switchStatus);
|
||||
virtual int32_t ResolveNotificationEvent(const int32_t userId,
|
||||
const std::string &extraData,
|
||||
|
@ -26,6 +26,7 @@ namespace OHOS::FileManagement::CloudSync {
|
||||
class CloudStatus {
|
||||
public:
|
||||
static int32_t GetCurrentCloudInfo(const std::string &bundleName, const int32_t userId);
|
||||
static uint64_t GetCurrentRemainSpace(const int32_t userId);
|
||||
static bool IsCloudStatusOkay(const std::string &bundleName, const int32_t userId);
|
||||
static int32_t ChangeAppSwitch(const std::string &bundleName, const int32_t userId, bool appSwitchStatus);
|
||||
static bool IsAccountIdChanged(const std::string &accountId);
|
||||
|
Loading…
Reference in New Issue
Block a user