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 REMOTE_MSG_COMMON_H
17 #define REMOTE_MSG_COMMON_H
18 
19 namespace OHOS {
20 namespace UserIam {
21 namespace UserAuth {
22 enum MessageType {
23     // collector remoteAuthService -> verifier remoteAuthService
24     START_REMOTE_AUTH = 1,
25 
26     // verifier remoteAuthService callback -> collector remoteAuthInvokerContext
27     SEND_REMOTE_AUTH_TIP = 2,
28     SEND_REMOTE_AUTH_RESULT = 3,
29 
30     // verifier remoteAuthInvokerContext -> collector remoteAuthService
31     QUERY_EXECUTOR_INFO = 4,
32 
33     // verifier executor proxy -> collector remoteAuthService
34     BEGIN_EXECUTE = 5,
35     END_EXECUTE = 6,
36 
37     // verifier executor proxy -> executor stub
38     SEND_DATA_TO_EXECUTOR = 7,
39 
40     // collector executor stub -> verifier executor proxy
41     EXECUTOR_FINISH = 8,
42     EXECUTOR_SEND_DATA = 9,
43 
44     // keep alive
45     KEEP_ALIVE = 10,
46 };
47 
48 const inline char *EXECUTOR_PROXY_ENDPOINT_NAME = "RemoteExecutorProxy";
49 const inline char *EXECUTOR_STUB_ENDPOINT_NAME = "RemoteExecutorStub";
50 const inline char *REMOTE_SERVICE_ENDPOINT_NAME = "RemoteService";
51 const inline char *REMOTE_CALLBACK_ENDPOINT_NAME = "RemoteCallback";
52 const inline char *REMOTE_AUTH_CONTEXT_ENDPOINT_NAME = "RemoteAuthContext";
53 const inline char *REMOTE_AUTH_INVOKER_CONTEXT_ENDPOINT_NAME = "RemoteAuthInvokerContext";
54 const inline char *CLIENT_SOCKET_ENDPOINT_NAME = "ClientSocket";
55 } // namespace UserAuth
56 } // namespace UserIam
57 } // namespace OHOS
58 #endif // REMOTE_MSG_COMMON_H