• 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 OHOS_RPC_TEST_TESTHELP_H
17 #define OHOS_RPC_TEST_TESTHELP_H
18 
19 #include <jni.h>
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 /*
25  * Class:     ohos_rpc_test_TestHelper
26  * Method:    nativeNewInstance
27  * Signature: ()J
28  */
29 JNIEXPORT jlong JNICALL Java_ohos_rpc_test_TestHelper_nativeNewInstance(
30     JNIEnv *env, jclass clazz);
31 
32 /*
33  * Class:     ohos_rpc_test_TestHelper
34  * Method:    nativeFreeInstance
35  * Signature: (J)V
36  */
37 JNIEXPORT void JNICALL Java_ohos_rpc_test_TestHelper_nativeFreeInstance(
38     JNIEnv *env, jobject object, jlong);
39 
40 /*
41  * Class:     ohos_rpc_test_TestHelper
42  * Method:    nativePrepareTestSuite
43  * Signature: ()Z
44  */
45 JNIEXPORT jboolean JNICALL Java_ohos_rpc_test_TestHelper_nativePrepareTestSuite(
46     JNIEnv *env, jobject object);
47 
48 /*
49  * Class:     ohos_rpc_test_TestHelper
50  * Method:    nativeTearDownTestSuite
51  * Signature: ()Z
52  */
53 JNIEXPORT jboolean JNICALL Java_ohos_rpc_test_TestHelper_nativeTearDownTestSuite(
54     JNIEnv *env, jobject object);
55 
56 /*
57  * Class:     ohos_rpc_test_TestHelper
58  * Method:    nativeStartTestServer
59  * Signature: (I)Z
60  */
61 JNIEXPORT jboolean JNICALL Java_ohos_rpc_test_TestHelper_nativeStartTestApp(
62     JNIEnv *env, jobject object, jint appId, jint commandId);
63 
64 /*
65  * Class:     ohos_rpc_test_TestHelper
66  * Method:    StopTestApp
67  * Signature: (I)Z
68  */
69 JNIEXPORT jboolean JNICALL Java_ohos_rpc_test_TestHelper_nativeStopTestApp(
70     JNIEnv *env, jobject object, jlong appId);
71 
72 /*
73  * Class:     ohos_rpc_test_TestHelper
74  * Method:    nativeGetTestServerPid
75  * Signature: (I)I
76  */
77 JNIEXPORT jint JNICALL Java_ohos_rpc_test_TestHelper_nativeGetTestAppPid(
78     JNIEnv *env, jobject object, jint appId);
79 
80 /*
81  * Class:     ohos_rpc_test_TestHelper
82  * Method:    nativeGetUid
83  * Signature: ()I
84  */
85 JNIEXPORT jint JNICALL Java_ohos_rpc_test_TestHelper_nativeGetUid(
86     JNIEnv *env, jobject object);
87 /*
88  * Class:     ohos_rpc_test_TestHelper
89  * Method:    nativeGetPid
90  * Signature: ()I
91  */
92 JNIEXPORT jint JNICALL Java_ohos_rpc_test_TestHelper_nativeGetPid(
93     JNIEnv *env, jobject object);
94 
95 /*
96  * Class:     ohos_rpc_test_TestHelper
97  * Method:    nativeStartExecutable
98  * Signature: (Ljava/lang/String;I)Z
99  */
100 JNIEXPORT jboolean JNICALL Java_ohos_rpc_test_TestHelper_nativeStartExecutable(
101     JNIEnv *env, jobject object, jstring, jint);
102 
103 /*
104  * Class:     ohos_rpc_test_TestHelper
105  * Method:    nativeStopExecutable
106  * Signature: (Ljava/lang/String;I)Z
107  */
108 JNIEXPORT jboolean JNICALL Java_ohos_rpc_test_TestHelper_nativeStopExecutable(
109     JNIEnv *env, jobject object, jstring string, jint length);
110 
111 /*
112  * Class:     ohos_rpc_test_TestHelper
113  * Method:    nativeRunCommand
114  * Signature: (Ljava/lang/String;I)Z
115  */
116 JNIEXPORT jboolean JNICALL Java_ohos_rpc_test_TestHelper_nativeRunCommand(
117     JNIEnv *env, jobject object, jstring string, jint length);
118 
119 #ifdef __cplusplus
120 }
121 #endif
122 #endif // OHOS_RPC_TEST_TESTHELP_H
123