Robust Distributed System Nucleus (rDSN)
ver 1.0.0
HOME
GET STARTED
TUTORIALS
HOW TO
API
ABOUT
File List
include
dsn
c
api_common.h
1
/*
2
* The MIT License (MIT)
3
*
4
* Copyright (c) 2015 Microsoft Corporation
5
*
6
* -=- Robust Distributed System Nucleus (rDSN) -=-
7
*
8
* Permission is hereby granted, free of charge, to any person obtaining a copy
9
* of this software and associated documentation files (the "Software"), to deal
10
* in the Software without restriction, including without limitation the rights
11
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
* copies of the Software, and to permit persons to whom the Software is
13
* furnished to do so, subject to the following conditions:
14
*
15
* The above copyright notice and this permission notice shall be included in
16
* all copies or substantial portions of the Software.
17
*
18
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
* THE SOFTWARE.
25
*/
26
27
/*
28
* Description:
29
* basic data structures and macros for rDSN service API
30
*
31
* Revision history:
32
* Feb., 2016, @imzhenyu (Zhenyu Guo), first version
33
* xxxx-xx-xx, author, fix bug about xxx
34
*/
35
36
# pragma once
37
38
# include <stdint.h>
39
# include <stddef.h>
40
# include <stdarg.h>
41
# include <dsn/utility/dlib.h>
42
43
# ifdef __cplusplus
44
# define DEFAULT(value) = value
45
# define NORETURN [[noreturn]]
46
# else
47
# define DEFAULT(value)
48
# define NORETURN
49
# include <stdbool.h>
50
# endif
51
52
53
# ifdef __cplusplus
54
extern
"C"
{
55
# endif
56
57
# define DSN_MAX_TASK_CODE_NAME_LENGTH 48
58
# define DSN_MAX_ERROR_CODE_NAME_LENGTH 48
59
# define DSN_MAX_ADDRESS_NAME_LENGTH 48
60
# define DSN_MAX_BUFFER_COUNT_IN_MESSAGE 64
61
# define DSN_MAX_APP_TYPE_NAME_LENGTH 32
62
# define DSN_MAX_CALLBAC_COUNT 32
63
# define DSN_MAX_APP_COUNT_IN_SAME_PROCESS 256
64
# define DSN_MAX_PATH 1024
65
# define TIME_MS_MAX 0xffffffff
66
# define CRC_INVALID 0x0
67
68
struct
dsn_app_info
;
69
typedef
struct
dsn_app_info
dsn_app_info
;
70
typedef
int
dsn_error_t;
71
typedef
int
dsn_task_code_t;
72
typedef
int
dsn_threadpool_code_t;
73
typedef
void
* dsn_handle_t;
74
typedef
void
* dsn_task_t;
75
typedef
void
* dsn_task_tracker_t;
76
typedef
void
* dsn_message_t;
77
typedef
void
* dsn_group_t;
78
typedef
void
* dsn_uri_t;
79
80
# ifdef __cplusplus
81
}
82
# endif
dsn_app_info
application information retrived at runtime
Definition:
app_model.h:362