stubs.c 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. #include <stdlib.h>
  2. #include <string.h>
  3. #include "misc_mosq.h"
  4. #include "mosquitto_broker_internal.h"
  5. #include "mosquitto_internal.h"
  6. #include "util_mosq.h"
  7. #ifndef UNUSED
  8. # define UNUSED(A) (void)(A)
  9. #endif
  10. struct mosquitto *context__init(mosq_sock_t sock)
  11. {
  12. UNUSED(sock);
  13. return NULL;
  14. }
  15. void context__add_to_by_id(struct mosquitto *context)
  16. {
  17. UNUSED(context);
  18. }
  19. int db__message_store(const struct mosquitto *source, struct mosquitto_msg_store *stored, uint32_t message_expiry_interval, dbid_t store_id, enum mosquitto_msg_origin origin)
  20. {
  21. UNUSED(source);
  22. UNUSED(stored);
  23. UNUSED(message_expiry_interval);
  24. UNUSED(store_id);
  25. UNUSED(origin);
  26. return 0;
  27. }
  28. void db__msg_store_ref_inc(struct mosquitto_msg_store *store)
  29. {
  30. UNUSED(store);
  31. }
  32. int handle__packet(struct mosquitto *context)
  33. {
  34. UNUSED(context);
  35. return 0;
  36. }
  37. int log__printf(struct mosquitto *mosq, unsigned int level, const char *fmt, ...)
  38. {
  39. UNUSED(mosq);
  40. UNUSED(level);
  41. UNUSED(fmt);
  42. return 0;
  43. }
  44. FILE *mosquitto__fopen(const char *path, const char *mode, bool restrict_read)
  45. {
  46. UNUSED(path);
  47. UNUSED(mode);
  48. UNUSED(restrict_read);
  49. return NULL;
  50. }
  51. enum mosquitto_client_state mosquitto__get_state(struct mosquitto *mosq)
  52. {
  53. UNUSED(mosq);
  54. return mosq_cs_new;
  55. }
  56. int mux__add_out(struct mosquitto *mosq)
  57. {
  58. UNUSED(mosq);
  59. return 0;
  60. }
  61. int mux__remove_out(struct mosquitto *mosq)
  62. {
  63. UNUSED(mosq);
  64. return 0;
  65. }
  66. ssize_t net__read(struct mosquitto *mosq, void *buf, size_t count)
  67. {
  68. UNUSED(mosq);
  69. UNUSED(buf);
  70. UNUSED(count);
  71. return 0;
  72. }
  73. ssize_t net__write(struct mosquitto *mosq, const void *buf, size_t count)
  74. {
  75. UNUSED(mosq);
  76. UNUSED(buf);
  77. UNUSED(count);
  78. return 0;
  79. }
  80. int retain__store(const char *topic, struct mosquitto_msg_store *stored, char **split_topics)
  81. {
  82. UNUSED(topic);
  83. UNUSED(stored);
  84. UNUSED(split_topics);
  85. return 0;
  86. }
  87. int sub__add(struct mosquitto *context, const char *sub, uint8_t qos, uint32_t identifier, int options, struct mosquitto__subhier **root)
  88. {
  89. UNUSED(context);
  90. UNUSED(sub);
  91. UNUSED(qos);
  92. UNUSED(identifier);
  93. UNUSED(options);
  94. UNUSED(root);
  95. return 0;
  96. }
  97. int sub__messages_queue(const char *source_id, const char *topic, uint8_t qos, int retain, struct mosquitto_msg_store **stored)
  98. {
  99. UNUSED(source_id);
  100. UNUSED(topic);
  101. UNUSED(qos);
  102. UNUSED(retain);
  103. UNUSED(stored);
  104. return 0;
  105. }
  106. int keepalive__update(struct mosquitto *context)
  107. {
  108. UNUSED(context);
  109. return 0;
  110. }
  111. void db__msg_add_to_inflight_stats(struct mosquitto_msg_data *msg_data, struct mosquitto_client_msg *msg)
  112. {
  113. UNUSED(msg_data);
  114. UNUSED(msg);
  115. }
  116. void db__msg_add_to_queued_stats(struct mosquitto_msg_data *msg_data, struct mosquitto_client_msg *msg)
  117. {
  118. UNUSED(msg_data);
  119. UNUSED(msg);
  120. }