• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 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 #ifndef HDI_SAMPLE_CLIENT_PROXY_CPP_INF_H
16 #define HDI_SAMPLE_CLIENT_PROXY_CPP_INF_H
17 
18 #include <iremote_proxy.h>
19 #include "isample.h"
20 
21 namespace OHOS {
22 namespace HDI {
23 namespace Sample {
24 namespace V1_0 {
25 class SampleProxy : public IRemoteProxy<ISample> {
26 public:
SampleProxy(const sptr<IRemoteObject> & impl)27     explicit SampleProxy(const sptr<IRemoteObject>& impl) : IRemoteProxy<ISample>(impl) {}
~SampleProxy()28     virtual ~SampleProxy() override {}
29 
30     virtual int32_t BooleanTypeTest(const bool input, bool& output) override;
31 
32     virtual int32_t ByteTypeTest(const int8_t input, int8_t& output) override;
33 
34     virtual int32_t ShortTypeTest(const int16_t input, int16_t& output) override;
35 
36     virtual int32_t IntTypeTest(const int32_t input, int32_t& output) override;
37 
38     virtual int32_t LongTypeTest(const int64_t input, int64_t& output) override;
39 
40     virtual int32_t FloatTypeTest(const float input, float& output) override;
41 
42     virtual int32_t DoubleTypeTest(const double input, double& output) override;
43 
44     virtual int32_t StringTypeTest(const std::string& input, std::string& output) override;
45 
46     virtual int32_t UcharTypeTest(const uint8_t input, uint8_t& output) override;
47 
48     virtual int32_t UshortTypeTest(const uint16_t input, uint16_t& output) override;
49 
50     virtual int32_t UintTypeTest(const uint32_t input, uint32_t& output) override;
51 
52     virtual int32_t UlongTypeTest(const uint64_t input, uint64_t& output) override;
53 
54     virtual int32_t ListTypeTest(const std::list<int8_t>& input, std::list<int8_t>& output) override;
55 
56     virtual int32_t MapTypeTest(const std::map<int8_t, int8_t>& input, std::map<int8_t, int8_t>& output) override;
57 
58     virtual int32_t ArrayTypeTest(const std::vector<int8_t>& input, std::vector<int8_t>& output) override;
59 
60     virtual int32_t StructTypeTest(const StructSample& input, StructSample& output) override;
61 
62     virtual int32_t EnumTypeTest(const EnumSample& input, EnumSample& output) override;
63 
64 private:
65     static inline BrokerDelegator<SampleProxy> delegator_;
66 };
67 }  // namespace V1_0
68 }  // namespace Sample
69 }  // namespace HDI
70 }  // namespace OHOS
71 
72 #endif // HDI_SAMPLE_CLIENT_PROXY_CPP_INF_H