• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2022 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 #ifndef BASE_STARTUP_APPSPAWN_MESSAGE_H
16 #define BASE_STARTUP_APPSPAWN_MESSAGE_H
17 #include <stdint.h>
18 #include <stdlib.h>
19 
20 #include "appspawn_server.h"
21 #include "appspawn_service.h"
22 
23 #ifdef __cplusplus
24 #if __cplusplus
25 extern "C" {
26 #endif /* __cplusplus */
27 #endif /* __cplusplus */
28 
29 typedef struct {
30     char *bundleName;
31     char *identityID;
32     int uID;
33     int gID;
34     unsigned int *caps;
35     unsigned int capsCnt;
36 } MessageSt;
37 
38 typedef struct {
39     AppSpawnClient client;
40     MessageSt message;
41 } AppSpawnClientLite;
42 
43 typedef struct {
44     AppSpawnContent content;
45 } AppSpawnContentLite;
46 
47 void SetContentFunction(AppSpawnContent *content);
48 int SplitMessage(const char *msg, unsigned int msgLen, MessageSt *msgSt);
49 void FreeMessageSt(MessageSt *targetSt);
50 
51 #ifdef __cplusplus
52 #if __cplusplus
53 }
54 #endif
55 #endif
56 
57 #endif  // BASE_STARTUP_APPSPAWN_MESSAGE_H
58