1/*
2 * Copyright (c) 2022 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 "device_auth.h"
17#include "dm_constants.h"
18
19namespace {
20int32_t (*deleteGroup)(int64_t requestId, const char *appId, const char *disbandParams)
21{
22    if (disbandParams == 0) {
23        return ERR_DM_FAILED;
24    }
25
26    return DM_OK;
27}
28
29int32_t (*getRelatedGroups)(const char *appId, const char *peerDeviceId, char **returnGroupVec, uint32_t *groupNum)
30{
31    (void)appId;
32    (void)peerDeviceId;
33    (void)returnGroupVec;
34    (void)groupNum;
35    return 0;
36}
37
38int32_t (*createGroup)(int64_t requestId, const char *appId, const char *createParams)
39{
40    if (requestId == 0) {
41        return ERR_DM_FAILED;
42    }
43    (void)appId;
44    (void)createParams;
45    return 0;
46}
47
48int32_t (*getRelatedGroups)(const char *appId, const char *peerDeviceId, char **returnGroupVec, uint32_t *groupNum)
49{
50    if (peerDeviceId == "123") {
51        returnGroupVec = nullptr;
52    }
53
54    if (peerDeviceId == "12345") {
55        groupNum = 0;
56    }
57
58    if (peerDeviceId == "34567") {
59        groupNum = 1;
60        returnGroupVec = "123";
61    }
62}
63}