• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#ifndef HDI_BUFF_MAX_SIZE
2#define HDI_BUFF_MAX_SIZE (1024 * 200)
3#endif
4
5#ifndef HDI_CHECK_VALUE_RETURN
6#define HDI_CHECK_VALUE_RETURN(lv, compare, rv, ret) do { \
7    if ((lv) compare (rv)) { \
8        return ret; \
9    } \
10} while (false)
11#endif
12
13#ifndef HDI_CHECK_VALUE_RET_GOTO
14#define HDI_CHECK_VALUE_RET_GOTO(lv, compare, rv, ret, value, table) do { \
15    if ((lv) compare (rv)) { \
16        ret = value; \
17        goto table; \
18    } \
19} while (false)
20#endif
21
22namespace OHOS {
23namespace HDI {
24namespace Foo {
25namespace V1_0 {
26using namespace OHOS;
27using namespace OHOS::HDI;
28
29enum {
30    CMD_FOO_GET_VERSION = 0,
31    CMD_FOO_PING = 1,
32    CMD_FOO_GET_DATA = 2,
33    CMD_FOO_INFO_TEST = 3,
34};
35
36class IFoo : public HdiBase {
37    virtual int32_t Ping(const std::string& sendMsg, std::string& recvMsg) = 0;
38
39    virtual int32_t GetData(std::string& info) = 0;
40
41    virtual int32_t InfoTest(int32_t inParam, double& outParam) = 0;
42};
43} // V1_0
44} // Foo
45} // HDI
46} // OHOS