• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-2024 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 #ifndef OHOS_DSCREEN_COMMON_H
17 #define OHOS_DSCREEN_COMMON_H
18 
19 #include <string>
20 
21 #include "dscreen_source_callback.h"
22 #include "dscreen_source_callback_stub.h"
23 #include "dscreen_source_handler.h"
24 #include "dscreen_source_proxy.h"
25 #include "idscreen_source_callback.h"
26 
27 namespace OHOS {
28 namespace DistributedHardware {
29 class DScreenSourceCallbackStubVTest : public DScreenSourceCallbackStub {
30 public:
~DScreenSourceCallbackStubVTest()31     ~DScreenSourceCallbackStubVTest() {}
OnNotifyRegResultInner(MessageParcel & data,MessageParcel & reply,MessageOption & option)32     int32_t OnNotifyRegResultInner(MessageParcel &data, MessageParcel &reply,
33         MessageOption &option)
34     {
35         return 0;
36     }
OnNotifyUnregResultInner(MessageParcel & data,MessageParcel & reply,MessageOption & option)37     int32_t OnNotifyUnregResultInner(MessageParcel &data, MessageParcel &reply,
38         MessageOption &option)
39     {
40         return 0;
41     }
42 };
43 
44 class IDScreenSourceCallbackTest : public IDScreenSourceCallback {
45 public:
~IDScreenSourceCallbackTest()46     ~IDScreenSourceCallbackTest() {}
AsObject()47     sptr<IRemoteObject> AsObject()
48     {
49         return nullptr;
50     }
51 
OnNotifyRegResult(const std::string & devId,const std::string & dhId,const std::string & reqId,int32_t status,const std::string & data)52     int32_t OnNotifyRegResult(const std::string &devId, const std::string &dhId,
53         const std::string &reqId, int32_t status, const std::string &data)
54     {
55         return 0;
56     }
57 
OnNotifyUnregResult(const std::string & devId,const std::string & dhId,const std::string & reqId,int32_t status,const std::string & data)58     int32_t OnNotifyUnregResult(const std::string &devId, const std::string &dhId,
59         const std::string &reqId, int32_t status, const std::string &data)
60     {
61         return 0;
62     }
63 };
64 
65 class RegisterCallbackTest : public RegisterCallback {
66 public:
67     RegisterCallbackTest() = default;
68     virtual ~RegisterCallbackTest() = default;
69 
OnRegisterResult(const std::string & uuid,const std::string & dhId,int32_t status,const std::string & data)70     int32_t OnRegisterResult(const std::string &uuid, const std::string &dhId,
71         int32_t status, const std::string &data)
72     {
73         return 0;
74     }
75 };
76 
77 
78 class UnregisterCallbackTest : public UnregisterCallback {
79 public:
80     UnregisterCallbackTest() = default;
81     virtual ~UnregisterCallbackTest() = default;
82 
OnUnregisterResult(const std::string & uuid,const std::string & dhId,int32_t status,const std::string & data)83     int32_t OnUnregisterResult(const std::string &uuid, const std::string &dhId,
84         int32_t status, const std::string &data)
85     {
86         return 0;
87     }
88 };
89 }  // namespace DistributedHardware
90 }  // namespace OHOS
91 
92 #endif