• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include "cloud/cloud_server.h"
17 namespace OHOS::DistributedData {
18 CloudServer *CloudServer::instance_ = nullptr;
GetInstance()19 CloudServer *CloudServer::GetInstance()
20 {
21     return instance_;
22 }
23 
RegisterCloudInstance(CloudServer * instance)24 bool CloudServer::RegisterCloudInstance(CloudServer *instance)
25 {
26     if (instance_ != nullptr) {
27         return false;
28     }
29     instance_ = instance;
30     return true;
31 }
32 
GetServerInfo(int32_t userId)33 CloudInfo CloudServer::GetServerInfo(int32_t userId)
34 {
35     return CloudInfo();
36 }
37 
GetAppSchema(int32_t userId,const std::string & bundleName)38 SchemaMeta CloudServer::GetAppSchema(int32_t userId, const std::string &bundleName)
39 {
40     return SchemaMeta();
41 }
42 
Subscribe(int32_t userId,const std::map<std::string,std::vector<Database>> & dbs)43 int32_t CloudServer::Subscribe(int32_t userId, const std::map<std::string, std::vector<Database>> &dbs)
44 {
45     return 0;
46 }
47 
Unsubscribe(int32_t userId,const std::map<std::string,std::vector<Database>> & dbs)48 int32_t CloudServer::Unsubscribe(int32_t userId, const std::map<std::string, std::vector<Database>> &dbs)
49 {
50     return 0;
51 }
52 
ConnectAssetLoader(uint32_t tokenId,const CloudServer::Database & dbMeta)53 std::shared_ptr<AssetLoader> CloudServer::ConnectAssetLoader(uint32_t tokenId, const CloudServer::Database &dbMeta)
54 {
55     return nullptr;
56 }
57 
ConnectCloudDB(uint32_t tokenId,const CloudServer::Database & dbMeta)58 std::shared_ptr<CloudDB> CloudServer::ConnectCloudDB(uint32_t tokenId, const CloudServer::Database &dbMeta)
59 {
60     return nullptr;
61 }
62 } // namespace OHOS::DistributedData