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