You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

173 lines
6.5 KiB

  1. /* /////////////////////////////////////////////////////////////////////////
  2. * File: pantheios/backends/be.lrsplit.h
  3. *
  4. * Purpose: Pantheios Local/Remote Split Back-end library API
  5. *
  6. * Created: 26th June 2005
  7. * Updated: 11th September 2009
  8. *
  9. * Home: http://www.pantheios.org/
  10. *
  11. * Copyright (c) 2005-2009, Matthew Wilson and Synesis Software
  12. * All rights reserved.
  13. *
  14. * Redistribution and use in source and binary forms, with or without
  15. * modification, are permitted provided that the following conditions are
  16. * met:
  17. *
  18. * - Redistributions of source code must retain the above copyright notice,
  19. * this list of conditions and the following disclaimer.
  20. * - Redistributions in binary form must reproduce the above copyright
  21. * notice, this list of conditions and the following disclaimer in the
  22. * documentation and/or other materials provided with the distribution.
  23. * - Neither the name(s) of Matthew Wilson and Synesis Software nor the
  24. * names of any contributors may be used to endorse or promote products
  25. * derived from this software without specific prior written permission.
  26. *
  27. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
  28. * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  29. * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  30. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  31. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  32. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  33. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  34. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  35. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  36. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  37. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  38. *
  39. * ////////////////////////////////////////////////////////////////////// */
  40. /** \file pantheios/backends/be.lrsplit.h
  41. *
  42. * [C, C++] Pantheios Local/Remote Split Back-end library API
  43. */
  44. #ifndef PANTHEIOS_INCL_PANTHEIOS_BACKENDS_H_BE_LRSPLIT
  45. #define PANTHEIOS_INCL_PANTHEIOS_BACKENDS_H_BE_LRSPLIT
  46. /* /////////////////////////////////////////////////////////////////////////
  47. * Version information
  48. */
  49. #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION
  50. # define PANTHEIOS_VER_PANTHEIOS_BACKENDS_H_BE_LRSPLIT_MAJOR 2
  51. # define PANTHEIOS_VER_PANTHEIOS_BACKENDS_H_BE_LRSPLIT_MINOR 1
  52. # define PANTHEIOS_VER_PANTHEIOS_BACKENDS_H_BE_LRSPLIT_REVISION 1
  53. # define PANTHEIOS_VER_PANTHEIOS_BACKENDS_H_BE_LRSPLIT_EDIT 11
  54. #endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */
  55. /* /////////////////////////////////////////////////////////////////////////
  56. * Includes
  57. */
  58. #ifndef PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS
  59. # include <pantheios/pantheios.h>
  60. #endif /* !PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS */
  61. #ifndef PANTHEIOS_INCL_PANTHEIOS_H_BACKEND
  62. # include <pantheios/backend.h>
  63. #endif /* !PANTHEIOS_INCL_PANTHEIOS_H_BACKEND */
  64. /* /////////////////////////////////////////////////////////////////////////
  65. * Documentation
  66. */
  67. /** \defgroup group__backend__stock_backends__lrsplit Pantheios Local/Remote Split Back-end
  68. * \ingroup group__backend__stock_backends
  69. * Back-end library that splits the emission of log statements,
  70. * writing to <b>local</b> and/or <b>remote</b> back-ends that are
  71. * independently filtered.
  72. */
  73. /* /////////////////////////////////////////////////////////////////////////
  74. * Pantheios Local/Remote Split backend library API
  75. */
  76. /** Initialises the local back-end API.
  77. *
  78. * \ingroup group__backend__stock_backends__lrsplit
  79. *
  80. * \note The semantics of this function, and the constraints on its behaviour,
  81. * are identical to those of the Pantheios backend library function
  82. * pantheios_be_init(), except it applies to the local backend only
  83. */
  84. PANTHEIOS_CALL(int) pantheios_be_local_init(
  85. PAN_CHAR_T const* processIdentity
  86. , void* reserved
  87. , void** ptoken
  88. );
  89. /** Initialises the remote back-end API.
  90. *
  91. * \ingroup group__backend__stock_backends__lrsplit
  92. *
  93. * \note The semantics of this function, and the constraints on its behaviour,
  94. * are identical to those of the Pantheios backend library function
  95. * pantheios_be_init(), except it applies to the remote backend only
  96. */
  97. PANTHEIOS_CALL(int) pantheios_be_remote_init(
  98. PAN_CHAR_T const* processIdentity
  99. , void* reserved
  100. , void** ptoken
  101. );
  102. /** Uninitialises the local back-end API.
  103. *
  104. * \ingroup group__backend__stock_backends__lrsplit
  105. *
  106. * \note The semantics of this function, and the constraints on its behaviour,
  107. * are identical to those of the Pantheios backend library function
  108. * pantheios_be_uninit(), except it applies to the local backend only
  109. */
  110. PANTHEIOS_CALL(void) pantheios_be_local_uninit(
  111. void* token
  112. );
  113. /** Uninitialises the remote back-end API.
  114. *
  115. * \ingroup group__backend__stock_backends__lrsplit
  116. *
  117. * \note The semantics of this function, and the constraints on its behaviour,
  118. * are identical to those of the Pantheios backend library function
  119. * pantheios_be_uninit(), except it applies to the remote backend only
  120. */
  121. PANTHEIOS_CALL(void) pantheios_be_remote_uninit(
  122. void* token
  123. );
  124. /** Passes a log-entry to the local back-end API.
  125. *
  126. * \ingroup group__backend__stock_backends__lrsplit
  127. *
  128. * \note The semantics of this function, and the constraints on its behaviour,
  129. * are identical to those of the Pantheios backend library function
  130. * pantheios_be_logEntry(), except it applies to the local backend only
  131. */
  132. PANTHEIOS_CALL(int) pantheios_be_local_logEntry(
  133. void* feToken
  134. , void* beToken
  135. , int severity
  136. , PAN_CHAR_T const* entry
  137. , size_t cchEntry
  138. );
  139. /** Passes a log-entry to the remote back-end API.
  140. *
  141. * \ingroup group__backend__stock_backends__lrsplit
  142. *
  143. * \note The semantics of this function, and the constraints on its behaviour,
  144. * are identical to those of the Pantheios backend library function
  145. * pantheios_be_logEntry(), except it applies to the remote backend only
  146. */
  147. PANTHEIOS_CALL(int) pantheios_be_remote_logEntry(
  148. void* feToken
  149. , void* beToken
  150. , int severity
  151. , PAN_CHAR_T const* entry
  152. , size_t cchEntry
  153. );
  154. /* ////////////////////////////////////////////////////////////////////// */
  155. #endif /* !PANTHEIOS_INCL_PANTHEIOS_BACKENDS_H_BE_LRSPLIT */
  156. /* ///////////////////////////// end of file //////////////////////////// */