1a34a8711Sopenharmony_ci/*
2a34a8711Sopenharmony_ci * Copyright (C) 2022 Huawei Device Co., Ltd.
3a34a8711Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4a34a8711Sopenharmony_ci * you may not use this file except in compliance with the License.
5a34a8711Sopenharmony_ci * You may obtain a copy of the License at
6a34a8711Sopenharmony_ci *
7a34a8711Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8a34a8711Sopenharmony_ci *
9a34a8711Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10a34a8711Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11a34a8711Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12a34a8711Sopenharmony_ci * See the License for the specific language governing permissions and
13a34a8711Sopenharmony_ci * limitations under the License.
14a34a8711Sopenharmony_ci */
15a34a8711Sopenharmony_ci
16a34a8711Sopenharmony_ci#ifndef OHOS_RPC_DBINDER_STUB_H
17a34a8711Sopenharmony_ci#define OHOS_RPC_DBINDER_STUB_H
18a34a8711Sopenharmony_ci
19a34a8711Sopenharmony_ci#include <stdint.h>
20a34a8711Sopenharmony_ci#include <stdlib.h>
21a34a8711Sopenharmony_ci
22a34a8711Sopenharmony_ci#include "dbinder_types.h"
23a34a8711Sopenharmony_ci#include "serializer.h"
24a34a8711Sopenharmony_ci
25a34a8711Sopenharmony_ci#ifdef __cplusplus
26a34a8711Sopenharmony_ciextern "C" {
27a34a8711Sopenharmony_ci#endif
28a34a8711Sopenharmony_ci
29a34a8711Sopenharmony_citypedef struct {
30a34a8711Sopenharmony_ci    UTILS_DL_LIST list;
31a34a8711Sopenharmony_ci    char serviceName[SERVICENAME_LENGTH + 1];
32a34a8711Sopenharmony_ci    char deviceID[DEVICEID_LENGTH + 1];
33a34a8711Sopenharmony_ci    uintptr_t binderObject;
34a34a8711Sopenharmony_ci    SvcIdentity svc;
35a34a8711Sopenharmony_ci} DBinderServiceStub;
36a34a8711Sopenharmony_ci
37a34a8711Sopenharmony_ciint32_t GetDBinderStub(const char *serviceName, const char *deviceID,
38a34a8711Sopenharmony_ci    uintptr_t binderObject, DBinderServiceStub *dBinderServiceStub);
39a34a8711Sopenharmony_ci
40a34a8711Sopenharmony_ci#ifdef __cplusplus
41a34a8711Sopenharmony_ci}
42a34a8711Sopenharmony_ci#endif
43a34a8711Sopenharmony_ci#endif // OHOS_RPC_DBINDER_STUB_H