1
0

jose_cfg.3 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. .TH "jose_cfg" 3 "Tue May 30 2017" "José" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. jose_cfg \- José Configuration\&.
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .SS "Typedefs"
  10. .in +1c
  11. .ti -1c
  12. .RI "typedef jose_cfg_t \fBjose_cfg_auto_t\fP"
  13. .br
  14. .RI "Defines a jose_cfg_t which calls \fBjose_cfg_decref()\fP at end of scope\&. "
  15. .in -1c
  16. .SS "Functions"
  17. .in +1c
  18. .ti -1c
  19. .RI "jose_cfg_t * \fBjose_cfg\fP (void)"
  20. .br
  21. .RI "Creates a new configuration instance\&. "
  22. .ti -1c
  23. .RI "jose_cfg_t * \fBjose_cfg_incref\fP (jose_cfg_t *cfg)"
  24. .br
  25. .RI "Increases the reference count of a configuration instance\&. "
  26. .ti -1c
  27. .RI "void \fBjose_cfg_decref\fP (jose_cfg_t *cfg)"
  28. .br
  29. .RI "Decreases the reference count of a configuration instance\&. "
  30. .ti -1c
  31. .RI "void \fBjose_cfg_set_err_func\fP (jose_cfg_t *cfg, jose_cfg_err_t *err, void *misc)"
  32. .br
  33. .RI "Sets the error handler function for this configuration instance\&. "
  34. .ti -1c
  35. .RI "void * \fBjose_cfg_get_err_misc\fP (jose_cfg_t *cfg)"
  36. .br
  37. .RI "Gets the miscelaneous data associated with the current error handler\&. "
  38. .ti -1c
  39. .RI "void \fBjose_cfg_err\fP (jose_cfg_t *cfg, uint64_t err, const char *fmt,\&.\&.\&.)"
  40. .br
  41. .RI "Submit an error\&. "
  42. .in -1c
  43. .SH "Detailed Description"
  44. .PP
  45. José Configuration\&.
  46. .SH "Typedef Documentation"
  47. .PP
  48. .SS "typedef jose_cfg_t \fBjose_cfg_auto_t\fP"
  49. .PP
  50. Defines a jose_cfg_t which calls \fBjose_cfg_decref()\fP at end of scope\&. For example:
  51. .PP
  52. .nf
  53. void foo() {
  54. jose_cfg_auto_t *cfg = jose_cfg();
  55. // jose_cfg_decref() implicitly called
  56. }
  57. .fi
  58. .PP
  59. .SH "Function Documentation"
  60. .PP
  61. .SS "jose_cfg_t* jose_cfg (void)"
  62. .PP
  63. Creates a new configuration instance\&.
  64. .PP
  65. \fBReturns:\fP
  66. .RS 4
  67. A newly-allocated configuration instance\&.
  68. .RE
  69. .PP
  70. .SS "jose_cfg_t* jose_cfg_incref (jose_cfg_t * cfg)"
  71. .PP
  72. Increases the reference count of a configuration instance\&. This function always succeeds\&.
  73. .PP
  74. \fBParameters:\fP
  75. .RS 4
  76. \fIcfg\fP The configuration context\&.
  77. .RE
  78. .PP
  79. \fBReturns:\fP
  80. .RS 4
  81. The value of \fCcfg\fP (for convenience)\&.
  82. .RE
  83. .PP
  84. .SS "void jose_cfg_decref (jose_cfg_t * cfg)"
  85. .PP
  86. Decreases the reference count of a configuration instance\&. When the reference count reaches zero, the configuration instance is freed\&.
  87. .PP
  88. \fBParameters:\fP
  89. .RS 4
  90. \fIcfg\fP The configuration context\&.
  91. .RE
  92. .PP
  93. .SS "void jose_cfg_set_err_func (jose_cfg_t * cfg, jose_cfg_err_t * err, void * misc)"
  94. .PP
  95. Sets the error handler function for this configuration instance\&. The value of \fCmisc\fP will be passed to the error handler function\&.
  96. .PP
  97. You may pass NULL to \fCerr\fP to return to the default error handler\&.
  98. .PP
  99. \fBParameters:\fP
  100. .RS 4
  101. \fIcfg\fP The configuration context\&.
  102. .br
  103. \fIerr\fP The error handler function you wish to enable\&.
  104. .br
  105. \fImisc\fP The miscelaneous data you wish to pass to the error handler\&.
  106. .RE
  107. .PP
  108. .SS "void* jose_cfg_get_err_misc (jose_cfg_t * cfg)"
  109. .PP
  110. Gets the miscelaneous data associated with the current error handler\&.
  111. .PP
  112. \fBParameters:\fP
  113. .RS 4
  114. \fIcfg\fP The configuration context\&.
  115. .RE
  116. .PP
  117. \fBReturns:\fP
  118. .RS 4
  119. The miscelaneous data associated with the error handler\&.
  120. .RE
  121. .PP
  122. .SS "void jose_cfg_err (jose_cfg_t * cfg, uint64_t err, const char * fmt, \&.\&.\&.)"
  123. .PP
  124. Submit an error\&. The error handler will be called with the error provided\&.
  125. .PP
  126. \fBParameters:\fP
  127. .RS 4
  128. \fIcfg\fP The configuration context (optional)\&.
  129. .br
  130. \fIerr\fP The number corresponding to this error type\&.
  131. .br
  132. \fIfmt\fP A printf()-style format string\&.
  133. .br
  134. \fI\&.\&.\&.\fP The printf()-style arguments\&.
  135. .RE
  136. .PP
  137. .SH "Author"
  138. .PP
  139. Generated automatically by Doxygen for José from the source code\&.