169570cc8Sopenharmony_ci/* 269570cc8Sopenharmony_ci * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 369570cc8Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 469570cc8Sopenharmony_ci * you may not use this file except in compliance with the License. 569570cc8Sopenharmony_ci * You may obtain a copy of the License at 669570cc8Sopenharmony_ci * 769570cc8Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 869570cc8Sopenharmony_ci * 969570cc8Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1069570cc8Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1169570cc8Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1269570cc8Sopenharmony_ci * See the License for the specific language governing permissions and 1369570cc8Sopenharmony_ci * limitations under the License. 1469570cc8Sopenharmony_ci */ 1569570cc8Sopenharmony_ci#ifndef BASE_STARTUP_APPSPAWN_MESSAGE_H 1669570cc8Sopenharmony_ci#define BASE_STARTUP_APPSPAWN_MESSAGE_H 1769570cc8Sopenharmony_ci#include <stdint.h> 1869570cc8Sopenharmony_ci#include <stdlib.h> 1969570cc8Sopenharmony_ci 2069570cc8Sopenharmony_ci#include "appspawn_server.h" 2169570cc8Sopenharmony_ci#include "appspawn_service.h" 2269570cc8Sopenharmony_ci 2369570cc8Sopenharmony_ci#ifdef __cplusplus 2469570cc8Sopenharmony_ci#if __cplusplus 2569570cc8Sopenharmony_ciextern "C" { 2669570cc8Sopenharmony_ci#endif /* __cplusplus */ 2769570cc8Sopenharmony_ci#endif /* __cplusplus */ 2869570cc8Sopenharmony_ci 2969570cc8Sopenharmony_citypedef struct { 3069570cc8Sopenharmony_ci char *bundleName; 3169570cc8Sopenharmony_ci char *identityID; 3269570cc8Sopenharmony_ci int uID; 3369570cc8Sopenharmony_ci int gID; 3469570cc8Sopenharmony_ci unsigned int *caps; 3569570cc8Sopenharmony_ci unsigned int capsCnt; 3669570cc8Sopenharmony_ci} MessageSt; 3769570cc8Sopenharmony_ci 3869570cc8Sopenharmony_citypedef struct { 3969570cc8Sopenharmony_ci AppSpawnClient client; 4069570cc8Sopenharmony_ci MessageSt message; 4169570cc8Sopenharmony_ci} AppSpawnClientLite; 4269570cc8Sopenharmony_ci 4369570cc8Sopenharmony_citypedef struct { 4469570cc8Sopenharmony_ci AppSpawnContent content; 4569570cc8Sopenharmony_ci} AppSpawnContentLite; 4669570cc8Sopenharmony_ci 4769570cc8Sopenharmony_civoid SetContentFunction(AppSpawnContent *content); 4869570cc8Sopenharmony_ciint SplitMessage(const char *msg, unsigned int msgLen, MessageSt *msgSt); 4969570cc8Sopenharmony_civoid FreeMessageSt(MessageSt *targetSt); 5069570cc8Sopenharmony_ci 5169570cc8Sopenharmony_ci#ifdef __cplusplus 5269570cc8Sopenharmony_ci#if __cplusplus 5369570cc8Sopenharmony_ci} 5469570cc8Sopenharmony_ci#endif 5569570cc8Sopenharmony_ci#endif 5669570cc8Sopenharmony_ci 5769570cc8Sopenharmony_ci#endif // BASE_STARTUP_APPSPAWN_MESSAGE_H 58