1/*
2 * Copyright (c) 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 TEST_IFOO_H
17#define TEST_IFOO_H
18
19#include <cstdint>
20#include <iremote_broker.h>
21#include <string_ex.h>
22#include "myinterface.h"
23#include "myseq.h"
24
25using test::myseq;
26using test::myinterface;
27
28namespace test {
29class IFoo : public IRemoteBroker {
30public:
31    DECLARE_INTERFACE_DESCRIPTOR(u"test.IFoo");
32
33    virtual ErrCode void_test_func() = 0;
34
35    virtual ErrCode bool_test_func(
36        bool inParam,
37        bool& outParam,
38        bool inoutParam,
39        bool& result) = 0;
40
41    virtual ErrCode byte_test_func(
42        int8_t inParam,
43        int8_t& outParam,
44        int8_t inoutParam,
45        int8_t& result) = 0;
46
47    virtual ErrCode short_test_func(
48        short inParam,
49        short& outParam,
50        short inoutParam,
51        short& result) = 0;
52
53    virtual ErrCode int_test_func(
54        int32_t inParam,
55        int32_t& outParam,
56        int32_t inoutParam,
57        int32_t& result) = 0;
58
59    virtual ErrCode long_test_func(
60        long inParam,
61        long& outParam,
62        long inoutParam,
63        long& result) = 0;
64
65    virtual ErrCode string_test_func(
66        const std::string& inParam,
67        std::string& outParam,
68        const std::string& inoutParam,
69        std::string& result) = 0;
70
71    virtual ErrCode float_test_func(
72        float inParam,
73        float& outParam,
74        float inoutParam,
75        float& result) = 0;
76
77    virtual ErrCode double_test_func(
78        double inParam,
79        double& outParam,
80        double inoutParam,
81        double& result) = 0;
82
83    virtual ErrCode char_test_func(
84        zchar inParam,
85        zchar& outParam,
86        zchar inoutParam,
87        zchar& result) = 0;
88
89    virtual ErrCode seq_test_func(
90        const myseq& inParam,
91        myseq& outParam,
92        myseq* inoutParam,
93        myseq& result) = 0;
94
95    virtual ErrCode interface_test_func(
96        const sptr<myinterface>& inParam,
97        sptr<myinterface>& outParam,
98        const sptr<myinterface>& inoutParam,
99        sptr<myinterface>& result) = 0;
100protected:
101    const int VECTOR_MAX_SIZE = 102400;
102    const int LIST_MAX_SIZE = 102400;
103    const int MAP_MAX_SIZE = 102400;
104};
105} // namespace test
106#endif // TEST_IFOO_H
107
108