Document of c-modernization-kit (porter)
1.0.0
Loading...
Searching...
No Matches
porter
libsrc
porter
api
potrGetServiceType.c
Go to the documentation of this file.
1
13
14
#include <
porter_const.h
>
15
#include <
porter.h
>
16
17
#include "
../protocol/config.h
"
18
19
/* doxygen コメントは、ヘッダに記載 */
20
POTR_EXPORT
int
POTR_API
potrGetServiceType
(
const
char
*config_path,
21
int64_t service_id,
22
PotrType
*type)
23
{
24
PotrServiceDef
def;
25
26
if
(config_path == NULL || type == NULL)
27
{
28
return
POTR_ERROR
;
29
}
30
31
if
(
config_load_service
(config_path, service_id, &def) !=
POTR_SUCCESS
)
32
{
33
return
POTR_ERROR
;
34
}
35
36
*type = def.
type
;
37
return
POTR_SUCCESS
;
38
}
config_load_service
int config_load_service(const char *config_path, int64_t service_id, PotrServiceDef *def)
設定ファイルから指定サービスの定義を読み込みます。
Definition
config.c:508
config.h
設定ファイル解析モジュールの内部ヘッダー。
POTR_SUCCESS
#define POTR_SUCCESS
成功の戻り値を表す定数。
Definition
porter_const.h:30
POTR_ERROR
#define POTR_ERROR
失敗の戻り値を表す定数。
Definition
porter_const.h:31
porter.h
通信ライブラリ (動的リンク用) のヘッダーファイル。
POTR_API
#define POTR_API
呼び出し規約マクロ。
Definition
porter.h:46
POTR_EXPORT
#define POTR_EXPORT
DLL エクスポート/インポート制御マクロ。
Definition
porter.h:37
porter_const.h
通信ライブラリの定数ファイル。
PotrType
PotrType
通信種別。
Definition
porter_type.h:85
potrGetServiceType
POTR_EXPORT int POTR_API potrGetServiceType(const char *config_path, int64_t service_id, PotrType *type)
設定ファイルから指定サービスの通信種別を取得します。
Definition
potrGetServiceType.c:20
PotrServiceDef
サービス定義。
Definition
porter_type.h:130
PotrServiceDef::type
PotrType type
通信種別。
Definition
porter_type.h:132
Generated by
1.14.0