XMLParserCommon.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  1. // Copyright 2017 Proyectos y Sistemas de Mantenimiento SL (eProsima).
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. //
  15. #ifndef XML_PARSER_COMMON_H_
  16. #define XML_PARSER_COMMON_H_
  17. namespace eprosima {
  18. namespace fastrtps {
  19. namespace xmlparser {
  20. #define draw(ident, text, ...) for (uint8_t i = ident + 1; i > 0; --i) (i == 1) ? printf(text, ## __VA_ARGS__) : printf( \
  21. "\t")
  22. /**
  23. * Enum class XMLP_ret, used to provide a strongly typed result from the operations within this module.
  24. * @ingroup XMLPARSER_MODULE
  25. */
  26. enum class XMLP_ret
  27. {
  28. XML_ERROR,
  29. XML_OK,
  30. XML_NOK
  31. };
  32. extern const char* DEFAULT_FASTRTPS_ENV_VARIABLE;
  33. extern const char* DEFAULT_FASTRTPS_PROFILES;
  34. extern const char* ROOT;
  35. extern const char* PROFILES;
  36. extern const char* LIBRARY_SETTINGS;
  37. extern const char* TRANSPORT_DESCRIPTORS;
  38. extern const char* PROFILE_NAME;
  39. extern const char* DEFAULT_PROF;
  40. extern const char* PARTICIPANT;
  41. extern const char* PUBLISHER;
  42. extern const char* SUBSCRIBER;
  43. extern const char* RTPS;
  44. extern const char* TYPES;
  45. extern const char* LOG;
  46. extern const char* REQUESTER;
  47. extern const char* REPLIER;
  48. extern const char* TRANSPORT_DESCRIPTOR;
  49. extern const char* TRANSPORT_ID;
  50. extern const char* UDP_OUTPUT_PORT;
  51. extern const char* TCP_WAN_ADDR;
  52. extern const char* RECEIVE_BUFFER_SIZE;
  53. extern const char* SEND_BUFFER_SIZE;
  54. extern const char* TTL;
  55. extern const char* NON_BLOCKING_SEND;
  56. extern const char* WHITE_LIST;
  57. extern const char* MAX_MESSAGE_SIZE;
  58. extern const char* MAX_INITIAL_PEERS_RANGE;
  59. extern const char* KEEP_ALIVE_FREQUENCY;
  60. extern const char* KEEP_ALIVE_TIMEOUT;
  61. extern const char* MAX_LOGICAL_PORT;
  62. extern const char* LOGICAL_PORT_RANGE;
  63. extern const char* LOGICAL_PORT_INCREMENT;
  64. extern const char* ENABLE_TCP_NODELAY;
  65. extern const char* METADATA_LOGICAL_PORT;
  66. extern const char* LISTENING_PORTS;
  67. extern const char* CALCULATE_CRC;
  68. extern const char* CHECK_CRC;
  69. extern const char* SEGMENT_SIZE;
  70. extern const char* PORT_QUEUE_CAPACITY;
  71. extern const char* PORT_OVERFLOW_POLICY;
  72. extern const char* SEGMENT_OVERFLOW_POLICY;
  73. extern const char* HEALTHY_CHECK_TIMEOUT_MS;
  74. extern const char* DISCARD;
  75. extern const char* FAIL;
  76. extern const char* RTPS_DUMP_FILE;
  77. // IntraprocessDeliveryType
  78. extern const char* OFF;
  79. extern const char* USER_DATA_ONLY;
  80. extern const char* FULL;
  81. extern const char* QOS_PROFILE;
  82. extern const char* APPLICATION;
  83. extern const char* TYPE;
  84. // extern const char* TOPIC;
  85. extern const char* DATA_WRITER;
  86. extern const char* DATA_READER;
  87. /// LibrarySettings attributes
  88. extern const char* INTRAPROCESS_DELIVERY;
  89. /// RTPS Participant attributes
  90. extern const char* ALLOCATION;
  91. extern const char* PREFIX;
  92. extern const char* DEF_UNI_LOC_LIST;
  93. extern const char* DEF_MULTI_LOC_LIST;
  94. extern const char* SEND_SOCK_BUF_SIZE;
  95. extern const char* LIST_SOCK_BUF_SIZE;
  96. extern const char* BUILTIN;
  97. extern const char* PORT;
  98. extern const char* PORTS;
  99. extern const char* LOGICAL_PORT;
  100. extern const char* PHYSICAL_PORT;
  101. extern const char* USER_DATA;
  102. extern const char* PART_ID;
  103. extern const char* IP4_TO_SEND;
  104. extern const char* IP6_TO_SEND;
  105. extern const char* THROUGHPUT_CONT;
  106. extern const char* USER_TRANS;
  107. extern const char* USE_BUILTIN_TRANS;
  108. extern const char* PROPERTIES_POLICY;
  109. extern const char* NAME;
  110. extern const char* REMOTE_LOCATORS;
  111. extern const char* MAX_UNICAST_LOCATORS;
  112. extern const char* MAX_MULTICAST_LOCATORS;
  113. extern const char* TOTAL_PARTICIPANTS;
  114. extern const char* TOTAL_READERS;
  115. extern const char* TOTAL_WRITERS;
  116. extern const char* SEND_BUFFERS;
  117. extern const char* PREALLOCATED_NUMBER;
  118. extern const char* DYNAMIC_LC;
  119. extern const char* MAX_PROPERTIES;
  120. extern const char* MAX_USER_DATA;
  121. extern const char* MAX_PARTITIONS;
  122. /// Publisher-subscriber attributes
  123. extern const char* TOPIC;
  124. extern const char* QOS;
  125. extern const char* TIMES;
  126. extern const char* UNI_LOC_LIST;
  127. extern const char* MULTI_LOC_LIST;
  128. extern const char* REM_LOC_LIST;
  129. //extern const char* THROUGHPUT_CONT;
  130. extern const char* EXP_INLINE_QOS;
  131. extern const char* HIST_MEM_POLICY;
  132. //extern const char* PROPERTIES_POLICY;
  133. extern const char* USER_DEF_ID;
  134. extern const char* ENTITY_ID;
  135. extern const char* MATCHED_SUBSCRIBERS_ALLOCATION;
  136. extern const char* MATCHED_PUBLISHERS_ALLOCATION;
  137. ///
  138. extern const char* PROPERTIES;
  139. extern const char* BIN_PROPERTIES;
  140. extern const char* PROPERTY;
  141. extern const char* VALUE;
  142. extern const char* PROPAGATE;
  143. extern const char* PREALLOCATED;
  144. extern const char* PREALLOCATED_WITH_REALLOC;
  145. extern const char* DYNAMIC;
  146. extern const char* DYNAMIC_REUSABLE;
  147. extern const char* LOCATOR;
  148. extern const char* UDPv4_LOCATOR;
  149. extern const char* UDPv6_LOCATOR;
  150. extern const char* TCPv4_LOCATOR;
  151. extern const char* TCPv6_LOCATOR;
  152. extern const char* KIND;
  153. extern const char* ADDRESS;
  154. extern const char* UNIQUE_LAN_ID;
  155. extern const char* WAN_ADDRESS;
  156. extern const char* RESERVED;
  157. extern const char* UDPv4;
  158. extern const char* UDPv6;
  159. extern const char* TCPv4;
  160. extern const char* TCPv6;
  161. extern const char* SHM;
  162. extern const char* INIT_ACKNACK_DELAY;
  163. extern const char* HEARTB_RESP_DELAY;
  164. extern const char* INIT_HEARTB_DELAY;
  165. extern const char* HEARTB_PERIOD;
  166. extern const char* NACK_RESP_DELAY;
  167. extern const char* NACK_SUPRESSION;
  168. extern const char* BY_NAME;
  169. extern const char* BY_VAL;
  170. extern const char* DURATION_INFINITY;
  171. extern const char* DURATION_INFINITE_SEC;
  172. extern const char* DURATION_INFINITE_NSEC;
  173. extern const char* SECONDS;
  174. extern const char* NANOSECONDS;
  175. extern const char* SHARED;
  176. extern const char* EXCLUSIVE;
  177. /// QOS
  178. extern const char* DURABILITY;
  179. extern const char* DURABILITY_SRV;
  180. extern const char* DEADLINE;
  181. extern const char* LATENCY_BUDGET;
  182. extern const char* LIVELINESS;
  183. extern const char* RELIABILITY;
  184. extern const char* LIFESPAN;
  185. extern const char* TIME_FILTER;
  186. extern const char* OWNERSHIP;
  187. extern const char* OWNERSHIP_STRENGTH;
  188. extern const char* DEST_ORDER;
  189. extern const char* PRESENTATION;
  190. extern const char* PARTITION;
  191. extern const char* TOPIC_DATA;
  192. extern const char* GROUP_DATA;
  193. extern const char* PUB_MODE;
  194. extern const char* DISABLE_POSITIVE_ACKS;
  195. extern const char* SYNCHRONOUS;
  196. extern const char* ASYNCHRONOUS;
  197. extern const char* NAMES;
  198. extern const char* INSTANCE;
  199. extern const char* GROUP;
  200. extern const char* COHERENT_ACCESS;
  201. extern const char* ORDERED_ACCESS;
  202. extern const char* BY_RECEPTION_TIMESTAMP;
  203. extern const char* BY_SOURCE_TIMESTAMP;
  204. extern const char* MIN_SEPARATION;
  205. extern const char* DURATION;
  206. extern const char* MAX_BLOCK_TIME;
  207. extern const char* _BEST_EFFORT;
  208. extern const char* _RELIABLE;
  209. extern const char* AUTOMATIC;
  210. extern const char* MANUAL_BY_PARTICIPANT;
  211. extern const char* MANUAL_BY_TOPIC;
  212. extern const char* LEASE_DURATION;
  213. extern const char* ANNOUNCE_PERIOD;
  214. extern const char* COUNT;
  215. extern const char* PERIOD;
  216. extern const char* SRV_CLEAN_DELAY;
  217. extern const char* HISTORY_KIND;
  218. extern const char* HISTORY_DEPTH;
  219. extern const char* MAX_SAMPLES;
  220. extern const char* MAX_INSTANCES;
  221. extern const char* MAX_SAMPLES_INSTANCE;
  222. extern const char* _VOLATILE;
  223. extern const char* _TRANSIENT_LOCAL;
  224. extern const char* _TRANSIENT;
  225. extern const char* _PERSISTENT;
  226. extern const char* KEEP_LAST;
  227. extern const char* KEEP_ALL;
  228. extern const char* _NO_KEY;
  229. extern const char* _WITH_KEY;
  230. extern const char* DATA_TYPE;
  231. extern const char* HISTORY_QOS;
  232. extern const char* RES_LIMITS_QOS;
  233. extern const char* DEPTH;
  234. extern const char* ALLOCATED_SAMPLES;
  235. extern const char* BYTES_PER_SECOND;
  236. extern const char* PERIOD_MILLISECS;
  237. extern const char* PORT_BASE;
  238. extern const char* DOMAIN_ID_GAIN;
  239. extern const char* PARTICIPANT_ID_GAIN;
  240. extern const char* OFFSETD0;
  241. extern const char* OFFSETD1;
  242. extern const char* OFFSETD2;
  243. extern const char* OFFSETD3;
  244. extern const char* RTPS_PDP_TYPE;
  245. extern const char* NONE;
  246. extern const char* CLIENT;
  247. extern const char* SERVER;
  248. extern const char* BACKUP;
  249. extern const char* IGNORE_PARTICIPANT_FLAGS;
  250. extern const char* FILTER_DIFFERENT_HOST;
  251. extern const char* FILTER_DIFFERENT_PROCESS;
  252. extern const char* FILTER_SAME_PROCESS;
  253. extern const char* WRITER_LVESS_PROTOCOL;
  254. extern const char* DISCOVERY_SETTINGS;
  255. extern const char* _EDP;
  256. extern const char* DOMAIN_ID;
  257. extern const char* LEASEDURATION;
  258. extern const char* LEASE_ANNOUNCE;
  259. extern const char* INITIAL_ANNOUNCEMENTS;
  260. extern const char* AVOID_BUILTIN_MULTICAST;
  261. extern const char* SIMPLE_EDP;
  262. extern const char* META_UNI_LOC_LIST;
  263. extern const char* META_MULTI_LOC_LIST;
  264. extern const char* INIT_PEERS_LIST;
  265. extern const char* CLIENTANNOUNCEMENTPERIOD;
  266. extern const char* SERVER_LIST;
  267. extern const char* RSERVER;
  268. extern const char* SIMPLE;
  269. extern const char* STATIC;
  270. extern const char* PUBWRITER_SUBREADER;
  271. extern const char* PUBREADER_SUBWRITER;
  272. extern const char* STATIC_ENDPOINT_XML;
  273. extern const char* READER_HIST_MEM_POLICY;
  274. extern const char* WRITER_HIST_MEM_POLICY;
  275. extern const char* READER_PAYLOAD_SIZE;
  276. extern const char* WRITER_PAYLOAD_SIZE;
  277. extern const char* MUTATION_TRIES;
  278. extern const char* ACCESS_SCOPE;
  279. extern const char* ENABLED;
  280. // Endpoint parser
  281. extern const char* STATICDISCOVERY;
  282. extern const char* READER;
  283. extern const char* WRITER;
  284. extern const char* USER_ID;
  285. extern const char* EXPECT_INLINE_QOS;
  286. extern const char* TOPIC_NAME;
  287. extern const char* TOPIC_DATA_TYPE;
  288. extern const char* TOPIC_KIND;
  289. extern const char* RELIABILITY_QOS;
  290. extern const char* UNICAST_LOCATOR;
  291. extern const char* MULTICAST_LOCATOR;
  292. extern const char* _RELIABLE_RELIABILITY_QOS;
  293. extern const char* _BEST_EFFORT_RELIABILITY_QOS;
  294. extern const char* DURABILITY_QOS;
  295. extern const char* _TRANSIENT_LOCAL_DURABILITY_QOS;
  296. extern const char* _VOLATILE_DURABILITY_QOS;
  297. extern const char* OWNERSHIP_QOS;
  298. extern const char* OWNERSHIP_KIND_NOT_PRESENT;
  299. extern const char* _SHARED_OWNERSHIP_QOS;
  300. extern const char* _EXCLUSIVE_OWNERSHIP_QOS;
  301. extern const char* PARTITION_QOS;
  302. extern const char* LIVELINESS_QOS;
  303. extern const char* LIVELINESS_KIND_NOT_PRESENT;
  304. extern const char* _AUTOMATIC_LIVELINESS_QOS;
  305. extern const char* _MANUAL_BY_PARTICIPANT_LIVELINESS_QOS;
  306. extern const char* _MANUAL_BY_TOPIC_LIVELINESS_QOS;
  307. extern const char* LEASE_DURATION_MS;
  308. extern const char* _INF;
  309. extern const char* EPROSIMA_UNKNOWN_STRING;
  310. extern const char* _TRANSIENT_LOCAL_DURABILITY_QOS;
  311. extern const char* _VOLATILE_DURABILITY_QOS;
  312. extern const char* STRENGTH;
  313. // TYPES parser
  314. extern const char* BOOLEAN;
  315. extern const char* CHAR;
  316. extern const char* WCHAR;
  317. extern const char* TBYTE;
  318. extern const char* OCTET;
  319. extern const char* UINT8;
  320. extern const char* INT8;
  321. extern const char* SHORT;
  322. extern const char* LONG;
  323. extern const char* USHORT;
  324. extern const char* ULONG;
  325. extern const char* LONGLONG;
  326. extern const char* ULONGLONG;
  327. extern const char* FLOAT;
  328. extern const char* DOUBLE;
  329. extern const char* LONGDOUBLE;
  330. extern const char* STRING;
  331. extern const char* WSTRING;
  332. extern const char* LITERAL;
  333. extern const char* STRUCT;
  334. extern const char* UNION;
  335. extern const char* SEQUENCE;
  336. extern const char* MAP;
  337. extern const char* TYPEDEF;
  338. extern const char* BITSET;
  339. extern const char* BITMASK;
  340. extern const char* ENUM;
  341. extern const char* CASE;
  342. extern const char* DEFAULT;
  343. extern const char* DISCRIMINATOR;
  344. extern const char* CASE_DISCRIMINATOR;
  345. extern const char* ARRAY_DIMENSIONS;
  346. extern const char* STR_MAXLENGTH;
  347. extern const char* SEQ_MAXLENGTH;
  348. extern const char* MAP_MAXLENGTH;
  349. extern const char* MAP_KEY_TYPE;
  350. extern const char* ENUMERATOR;
  351. extern const char* NON_BASIC_TYPE;
  352. extern const char* NON_BASIC_TYPE_NAME;
  353. extern const char* KEY;
  354. extern const char* MEMBER;
  355. extern const char* BITFIELD;
  356. extern const char* BIT_VALUE;
  357. extern const char* POSITION;
  358. extern const char* BIT_BOUND;
  359. extern const char* BASE_TYPE;
  360. // LOG
  361. extern const char* USE_DEFAULT;
  362. extern const char* CONSUMER;
  363. extern const char* CLASS;
  364. // Allocation config
  365. extern const char* INITIAL;
  366. extern const char* MAXIMUM;
  367. extern const char* INCREMENT;
  368. // TLS Config
  369. extern const char* TLS;
  370. extern const char* TLS_PASSWORD;
  371. extern const char* TLS_OPTIONS;
  372. extern const char* TLS_CERT_CHAIN_FILE;
  373. extern const char* TLS_PRIVATE_KEY_FILE;
  374. extern const char* TLS_TMP_DH_FILE;
  375. extern const char* TLS_VERIFY_FILE;
  376. extern const char* TLS_VERIFY_MODE;
  377. extern const char* TLS_VERIFY_PATHS;
  378. extern const char* TLS_DEFAULT_VERIFY_PATH;
  379. extern const char* TLS_VERIFY_DEPTH;
  380. extern const char* TLS_RSA_PRIVATE_KEY_FILE;
  381. extern const char* TLS_HANDSHAKE_ROLE;
  382. // TLS HandShake Role
  383. extern const char* TLS_HANDSHAKE_ROLE_DEFAULT;
  384. extern const char* TLS_HANDSHAKE_ROLE_CLIENT;
  385. extern const char* TLS_HANDSHAKE_ROLE_SERVER;
  386. // TLS Verify Stuff
  387. extern const char* TLS_VERIFY_PATH;
  388. extern const char* TLS_VERIFY;
  389. // TLS Options
  390. extern const char* TLS_OPTION;
  391. extern const char* TLS_DEFAULT_WORKAROUNDS;
  392. extern const char* TLS_NO_COMPRESSION;
  393. extern const char* TLS_NO_SSLV2;
  394. extern const char* TLS_NO_SSLV3;
  395. extern const char* TLS_NO_TLSV1;
  396. extern const char* TLS_NO_TLSV1_1;
  397. extern const char* TLS_NO_TLSV1_2;
  398. extern const char* TLS_NO_TLSV1_3;
  399. extern const char* TLS_SINGLE_DH_USE;
  400. // TLS Verify Mode
  401. extern const char* TLS_VERIFY_NONE;
  402. extern const char* TLS_VERIFY_PEER;
  403. extern const char* TLS_VERIFY_FAIL_IF_NO_PEER_CERT;
  404. extern const char* TLS_VERIFY_CLIENT_ONCE;
  405. // Requester and Replier
  406. extern const char* SERVICE_NAME;
  407. extern const char* REQUEST_TYPE;
  408. extern const char* REPLY_TYPE;
  409. extern const char* REQUEST_TOPIC_NAME;
  410. extern const char* REPLY_TOPIC_NAME;
  411. } /* xmlparser */
  412. } /* namespace */
  413. } /* namespace eprosima */
  414. #endif