MATLAB Production Server C Client  R2020b
component: mds_c_client, module directory: deployment_server/client/c/mps, copyright: MathWorks
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
client.h
Go to the documentation of this file.
1 
4 #ifndef MATHWORKS_MPS_CLIENT
5 #define MATHWORKS_MPS_CLIENT
6 
7 #define MPS_CLIENT_1_0 0x00010000
8 #define MPS_CLIENT_1_1 0x00010001
9 
10 #ifndef MPS_MAX_VER
11 #define MPS_MAX_VER MPS_CLIENT_1_1
12 #endif
13 
14 #ifdef _MSC_VER
15  #define MPS_DLL_EXPORT_SYM __declspec(dllexport)
16  #define MPS_DLL_IMPORT_SYM __declspec(dllimport)
17 #elif __GNUC__ >= 4
18  #define MPS_DLL_EXPORT_SYM __attribute__ ((visibility("default")))
19  #define MPS_DLL_IMPORT_SYM __attribute__ ((visibility("default")))
20 #else
21  #define MPS_DLL_EXPORT_SYM
22  #define MPS_DLL_IMPORT_SYM
23 #endif
24 
25 #if defined(BUILDING_MPSCLIENT)
26 #define MPSCLIENT_PUBLISHED_API MPS_DLL_EXPORT_SYM
27 #else
28 #define MPSCLIENT_PUBLISHED_API MPS_DLL_IMPORT_SYM
29 #endif
30 
31 #ifdef __cplusplus
32 #define MPSCLIENT_PUBLISHED_API_EXTERN_C extern "C" MPSCLIENT_PUBLISHED_API
33 #else
34 #define MPSCLIENT_PUBLISHED_API_EXTERN_C extern MPSCLIENT_PUBLISHED_API
35 #endif
36 
37 #include <limits.h>
38 
39 #ifdef _MSC_VER
40 typedef unsigned __int64 uint64;
41 #else
42 #include <stddef.h>
43 #include <stdint.h>
44 typedef uint64_t uint64;
45 #endif
46 
48 typedef uint64 mpsSize;
49 
51 typedef uint64 mpsIndex;
52 
55 typedef struct mpsArray mpsArray;
56 
62 
70 
71 #ifndef TMW_BITS_PER_INT
72 # if INT_MAX == 0x7FL
73 # define TMW_BITS_PER_INT 8
74 # elif INT_MAX == 0x7FFFL
75 # define TMW_BITS_PER_INT 16
76 # elif INT_MAX == 0x7FFFFFFFL
77 # define TMW_BITS_PER_INT 32
78 # else
79 # define TMW_BITS_PER_INT -1
80 # endif
81 #endif
82 
83 #ifndef TMW_BITS_PER_LONG
84 # if LONG_MAX == 0x7FL
85 # define TMW_BITS_PER_LONG 8
86 # elif LONG_MAX == 0x7FFFL
87 # define TMW_BITS_PER_LONG 16
88 # elif LONG_MAX == 0x7FFFFFFFL
89 # define TMW_BITS_PER_LONG 32
90 # else
91 # define TMW_BITS_PER_LONG -1
92 # endif
93 #endif
94 
95 #ifndef TMW_BITS_PER_SCHAR
96 # if SCHAR_MAX == 0x7FL
97 # define TMW_BITS_PER_SCHAR 8
98 # elif SCHAR_MAX == 0x7FFFL
99 # define TMW_BITS_PER_SCHAR 16
100 # elif SCHAR_MAX == 0x7FFFFFFFL
101 # define TMW_BITS_PER_SCHAR 32
102 # else
103 # define TMW_BITS_PER_SCHAR -1
104 # endif
105 #endif
106 
107 #ifndef TMW_BITS_PER_SHRT
108 # if SHRT_MAX == 0x7FL
109 # define TMW_BITS_PER_SHRT 8
110 # elif SHRT_MAX == 0x7FFFL
111 # define TMW_BITS_PER_SHRT 16
112 # elif SHRT_MAX == 0x7FFFFFFFL
113 # define TMW_BITS_PER_SHRT 32
114 # else
115 # define TMW_BITS_PER_SHRT -1
116 # endif
117 #endif
118 
119 #ifndef UINT16_T
120 # if TMW_BITS_PER_INT == 16
121 # define UINT16_T unsigned int
122 # elif TMW_BITS_PER_LONG == 16
123 # define UINT16_T unsigned long
124 # elif TMW_BITS_PER_SCHAR == 16
125 # define UINT16_T unsigned char
126 # elif TMW_BITS_PER_SHRT == 16
127 # define UINT16_T unsigned short
128 # endif
129 #endif
130 
131 #if (defined(__cplusplus) && (__cplusplus >= 201103L)) || (defined(_HAS_CHAR16_T_LANGUAGE_SUPPORT) && _HAS_CHAR16_T_LANGUAGE_SUPPORT)
132 typedef char16_t CHAR16_T;
133 #elif defined(_MSC_VER)
134 typedef wchar_t CHAR16_T;
135 #else
136 typedef UINT16_T CHAR16_T;
137 #endif
138 
140 
141 #if !defined(__cplusplus)
142 
143 typedef unsigned char bool;
144 
145 #ifndef false
146 #define false (0)
147 #endif
148 #ifndef true
149 #define true (1)
150 #endif
151 
152 #endif
153 
156 typedef bool mpsLogical;
157 
159 typedef enum mpsErrorInfoType {
160 
163 
166 
169 
171 
172 
174 typedef struct mpsErrorInfoHTTP {
175 
177  unsigned int responseCode;
178 
180  const char* responseMessage;
181 
183 
184 
186 typedef struct matlabStackFrame {
187 
189  const char* file;
190 
192  const char* function;
193 
195  int line;
196 
198 
199 
201 typedef struct mpsErrorInfoMATLAB {
202 
204  const char* message;
205 
207  const char* identifier;
208 
211 
214 
216 
218 typedef struct mpsErrorInfoGeneric {
219 
221  const char* genericErrorMsg;
222 
224 
225 
227 typedef struct mpsErrorInfo {
228 
231 
233  char const* message;
234 
236  union {
239 
242 
245  } details;
246 
247 } mpsErrorInfo;
248 
250 typedef enum mpsStatus {
251 
254 
257 
258 } mpsStatus;
259 
261 typedef enum mpsComplexity {
266 } mpsComplexity;
267 
269 typedef enum mpsClassID {
298 } mpsClassID;
299 
305 typedef struct mpsClientRuntime {
306 
318 
322  void (*destroyConfig) (mpsClientConfig* config);
323 
325  void (*setResponseTimeOutSec) (mpsClientConfig* config, unsigned long value);
326 
328  unsigned long (*getResponseTimeOutSec)(const mpsClientConfig* config);
329 
331  void (*setResponseSizeLimit) (mpsClientConfig* config, unsigned int value);
332 
334  unsigned int (*getResponseSizeLimit)(const mpsClientConfig* config);
335 
349 
357  void (*destroyContext) (mpsClientContext* context);
358 
371  void (*getLastErrorInfo) (mpsClientContext const* context, mpsErrorInfo* errorInfo);
372 
375  void (*destroyLastErrorInfo) (mpsErrorInfo* errorInfo);
376 
399  mpsStatus (*feval)( mpsClientContext* context, const char* url, int nlhs, mpsArray *plhs[], int nrhs, const mpsArray *prhs[] );
400 
404 #if MPS_MAX_VER >= MPS_CLIENT_1_1
405 
407  void (*setClientCertFile) (mpsClientConfig* config, const char* certFile);
408 
410  const char* (*getClientCertFile) (const mpsClientConfig* config);
411 
413  void (*setPrivateKeyFile) (mpsClientConfig* config, const char* pkFile);
414 
416  const char* (*getPrivateKeyFile) (const mpsClientConfig* config);
417 
419  void (*setPrivateKeyPasswd) (mpsClientConfig* config, const char* passwd);
420 
422  const char* (*getPrivateKeyPasswd) (const mpsClientConfig* config);
423 
425  void (*setCAFile) (mpsClientConfig* config, const char* caFile);
426 
428  const char* (*getCAFile) (const mpsClientConfig* config);
429 
431  void (*setRevocationListFile) (mpsClientConfig* config, const char* crlFile);
432 
434  const char* (*getRevocationListFile) (const mpsClientConfig* config);
435 
437  void (*setVerifyHost) (mpsClientConfig* config, mpsLogical verifyHost);
438 
441 
445  void (*setVerifyPeer) (mpsClientConfig* config, mpsLogical verifyPeer);
446 
449 
450 #endif
451 
453 
461 
472 
478 
483 
489 
495 
501 
507 
513 
519 
525 
531 
537 
543 
549 
555 
561 
567 
573 
579 
585 
591 
616 MPSCLIENT_PUBLISHED_API_EXTERN_C bool mpsIsClass(const mpsArray* mlArr, const char* classname);
617 
623 
629 
638 
644 
654 
665  mpsClassID classid, mpsComplexity complexFlag);
666 
672 
679 
687 
693 
700 
708 
716 MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray* mpsCreateStructMatrix(mpsSize m, mpsSize n, int nfields, const char **fieldnames);
717 
726 MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray* mpsCreateStructArray(mpsSize ndim, const mpsSize *dims, int nfields, const char **fieldnames);
727 
734 
742 
755 
765 
775 
781 
786 
792 
798 
806 
814 
820 
833 
839 
845 
851 
857 
863 
869 
875 
881 
887 
893 
901 MPSCLIENT_PUBLISHED_API_EXTERN_C int mpsGetString(const mpsArray* mlArr, char* str, mpsSize len);
902 
908 
914 
920 
926 
933 MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray *mpsGetField(const mpsArray *mlArr, mpsIndex index, const char *fieldname);
934 
941 MPSCLIENT_PUBLISHED_API_EXTERN_C void mpsSetField(mpsArray *mlArr, mpsIndex index, const char *fieldname, mpsArray *pvalue);
942 
948 
954 MPSCLIENT_PUBLISHED_API_EXTERN_C int mpsGetFieldNumber(const mpsArray *mlArr, const char *fieldname);
955 
961 MPSCLIENT_PUBLISHED_API_EXTERN_C const char *mpsGetFieldNameByNumber(const mpsArray *mlArr, int fieldnumber);
962 
969 MPSCLIENT_PUBLISHED_API_EXTERN_C mpsArray *mpsGetFieldByNumber(const mpsArray *mlArr, mpsIndex index, int fieldnumber);
970 
977 MPSCLIENT_PUBLISHED_API_EXTERN_C void mpsSetFieldByNumber(mpsArray *mlArr, mpsIndex index, int fieldnumber, mpsArray *pvalue);
978 
984 MPSCLIENT_PUBLISHED_API_EXTERN_C int mpsAddField(mpsArray *mlArr, const char *fieldname);
985 
990 MPSCLIENT_PUBLISHED_API_EXTERN_C void mpsRemoveField(mpsArray *mlArr, int fieldnumber);
991 
998 
1006 
1012 
1021 
1027 
1033 
1034 #endif