IxNpeMhSolicitedCbMgr_p.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. /**
  2. * @file IxNpeMhSolicitedCbMgr_p.h
  3. *
  4. * @author Intel Corporation
  5. * @date 18 Jan 2002
  6. *
  7. * @brief This file contains the private API for the Solicited Callback
  8. * Manager module.
  9. *
  10. *
  11. * @par
  12. * IXP400 SW Release version 2.0
  13. *
  14. * -- Copyright Notice --
  15. *
  16. * @par
  17. * Copyright 2001-2005, Intel Corporation.
  18. * All rights reserved.
  19. *
  20. * @par
  21. * Redistribution and use in source and binary forms, with or without
  22. * modification, are permitted provided that the following conditions
  23. * are met:
  24. * 1. Redistributions of source code must retain the above copyright
  25. * notice, this list of conditions and the following disclaimer.
  26. * 2. Redistributions in binary form must reproduce the above copyright
  27. * notice, this list of conditions and the following disclaimer in the
  28. * documentation and/or other materials provided with the distribution.
  29. * 3. Neither the name of the Intel Corporation nor the names of its contributors
  30. * may be used to endorse or promote products derived from this software
  31. * without specific prior written permission.
  32. *
  33. * @par
  34. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
  35. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  36. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  37. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
  38. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  39. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  40. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  41. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  42. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  43. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  44. * SUCH DAMAGE.
  45. *
  46. * @par
  47. * -- End of Copyright Notice --
  48. */
  49. /**
  50. * @defgroup IxNpeMhSolicitedCbMgr_p IxNpeMhSolicitedCbMgr_p
  51. *
  52. * @brief The private API for the Solicited Callback Manager module.
  53. *
  54. * @{
  55. */
  56. #ifndef IXNPEMHSOLICITEDCBMGR_P_H
  57. #define IXNPEMHSOLICITEDCBMGR_P_H
  58. #include "IxNpeMh.h"
  59. #include "IxOsalTypes.h"
  60. /*
  61. * #defines for function return types, etc.
  62. */
  63. /** Maximum number of solicited callbacks that can be stored in the list */
  64. #define IX_NPEMH_MAX_CALLBACKS (16)
  65. /*
  66. * Prototypes for interface functions.
  67. */
  68. /**
  69. * @fn void ixNpeMhSolicitedCbMgrInitialize (void)
  70. *
  71. * @brief This function initializes the Solicited Callback Manager module,
  72. * setting up a callback data structure for each NPE.
  73. *
  74. * @return No return value.
  75. */
  76. void ixNpeMhSolicitedCbMgrInitialize (void);
  77. /**
  78. * @fn IX_STATUS ixNpeMhSolicitedCbMgrCallbackSave (
  79. IxNpeMhNpeId npeId,
  80. IxNpeMhMessageId solicitedMessageId,
  81. IxNpeMhCallback solicitedCallback)
  82. *
  83. * @brief This function saves a callback in the specified NPE's callback
  84. * list. If the callback list is full the function will fail.
  85. *
  86. * @param IxNpeMhNpeId npeId (in) - The ID of the NPE in whose callback
  87. * list the callback will be saved.
  88. * @param IxNpeMhMessageId solicitedMessageId (in) - The ID of the message
  89. * that this callback is for.
  90. * @param IxNpeMhCallback solicitedCallback (in) - The callback function
  91. * pointer to save.
  92. *
  93. * @return The function returns a status indicating success or failure.
  94. */
  95. IX_STATUS ixNpeMhSolicitedCbMgrCallbackSave (
  96. IxNpeMhNpeId npeId,
  97. IxNpeMhMessageId solicitedMessageId,
  98. IxNpeMhCallback solicitedCallback);
  99. /**
  100. * @fn void ixNpeMhSolicitedCbMgrCallbackRetrieve (
  101. IxNpeMhNpeId npeId,
  102. IxNpeMhMessageId solicitedMessageId,
  103. IxNpeMhCallback *solicitedCallback)
  104. *
  105. * @brief This function retrieves the first ID-matching callback from the
  106. * specified NPE's callback list. If no matching callback can be found the
  107. * function will fail.
  108. *
  109. * @param IxNpeMhNpeId npeId (in) - The ID of the NPE from whose callback
  110. * list the callback will be retrieved.
  111. * @param IxNpeMhMessageId solicitedMessageId (in) - The ID of the message
  112. * that the callback is for.
  113. * @param IxNpeMhCallback solicitedCallback (out) - The callback function
  114. * pointer retrieved.
  115. *
  116. * @return No return value.
  117. */
  118. void ixNpeMhSolicitedCbMgrCallbackRetrieve (
  119. IxNpeMhNpeId npeId,
  120. IxNpeMhMessageId solicitedMessageId,
  121. IxNpeMhCallback *solicitedCallback);
  122. /**
  123. * @fn void ixNpeMhSolicitedCbMgrShow (
  124. IxNpeMhNpeId npeId)
  125. *
  126. * @brief This function will display the current state of the Solicited
  127. * Callback Manager module.
  128. *
  129. * @param IxNpeMhNpeId npeId (in) - The ID of the NPE to display state
  130. * information for.
  131. *
  132. * @return No return value.
  133. */
  134. void ixNpeMhSolicitedCbMgrShow (
  135. IxNpeMhNpeId npeId);
  136. /**
  137. * @fn void ixNpeMhSolicitedCbMgrShowReset (
  138. IxNpeMhNpeId npeId)
  139. *
  140. * @brief This function will reset the current state of the Solicited
  141. * Callback Manager module.
  142. *
  143. * @param IxNpeMhNpeId npeId (in) - The ID of the NPE to reset state
  144. * information for.
  145. *
  146. * @return No return value.
  147. */
  148. void ixNpeMhSolicitedCbMgrShowReset (
  149. IxNpeMhNpeId npeId);
  150. #endif /* IXNPEMHSOLICITEDCBMGR_P_H */
  151. /**
  152. * @} defgroup IxNpeMhSolicitedCbMgr_p
  153. */