1cc290419Sopenharmony_ci/*
2cc290419Sopenharmony_ci * Copyright (C) 2024 Huawei Device Co., Ltd.
3cc290419Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4cc290419Sopenharmony_ci * you may not use this file except in compliance with the License.
5cc290419Sopenharmony_ci * You may obtain a copy of the License at
6cc290419Sopenharmony_ci *
7cc290419Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8cc290419Sopenharmony_ci *
9cc290419Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10cc290419Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11cc290419Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12cc290419Sopenharmony_ci * See the License for the specific language governing permissions and
13cc290419Sopenharmony_ci * limitations under the License.
14cc290419Sopenharmony_ci */
15cc290419Sopenharmony_ci
16cc290419Sopenharmony_ci#ifndef HDC_UTILS_H
17cc290419Sopenharmony_ci#define HDC_UTILS_H
18cc290419Sopenharmony_ci
19cc290419Sopenharmony_ciextern "C" {
20cc290419Sopenharmony_ci#ifdef _WIN32
21cc290419Sopenharmony_ci    // return value: <0 error; 0 can start new server instance; >0 server already exists
22cc290419Sopenharmony_ci    __declspec(dllexport) int ProgramMutex(const char* procname, bool checkOrNew, const char* tmpDir);
23cc290419Sopenharmony_ci    __declspec(dllexport) bool PullupServerWin32(const char *runPath, const char *listenString, int logLevel);
24cc290419Sopenharmony_ci#else
25cc290419Sopenharmony_ci    // return value: <0 error; 0 can start new server instance; >0 server already exists
26cc290419Sopenharmony_ci    int ProgramMutex(const char* procname, bool checkOrNew, const char* tmpDir);
27cc290419Sopenharmony_ci#endif
28cc290419Sopenharmony_ci}
29cc290419Sopenharmony_ci
30cc290419Sopenharmony_ci#endif
31