Wolfgang Denk | 4646d2a | 2006-05-30 15:56:48 +0200 | [diff] [blame] | 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 | /** |
| 51 | * @defgroup IxNpeMhSolicitedCbMgr_p IxNpeMhSolicitedCbMgr_p |
| 52 | * |
| 53 | * @brief The private API for the Solicited Callback Manager module. |
| 54 | * |
| 55 | * @{ |
| 56 | */ |
| 57 | |
| 58 | #ifndef IXNPEMHSOLICITEDCBMGR_P_H |
| 59 | #define IXNPEMHSOLICITEDCBMGR_P_H |
| 60 | |
| 61 | #include "IxNpeMh.h" |
| 62 | #include "IxOsalTypes.h" |
| 63 | |
| 64 | /* |
| 65 | * #defines for function return types, etc. |
| 66 | */ |
| 67 | |
| 68 | /** Maximum number of solicited callbacks that can be stored in the list */ |
| 69 | #define IX_NPEMH_MAX_CALLBACKS (16) |
| 70 | |
| 71 | /* |
| 72 | * Prototypes for interface functions. |
| 73 | */ |
| 74 | |
| 75 | /** |
| 76 | * @fn void ixNpeMhSolicitedCbMgrInitialize (void) |
| 77 | * |
| 78 | * @brief This function initializes the Solicited Callback Manager module, |
| 79 | * setting up a callback data structure for each NPE. |
| 80 | * |
| 81 | * @return No return value. |
| 82 | */ |
| 83 | |
| 84 | void ixNpeMhSolicitedCbMgrInitialize (void); |
| 85 | |
| 86 | /** |
| 87 | * @fn IX_STATUS ixNpeMhSolicitedCbMgrCallbackSave ( |
| 88 | IxNpeMhNpeId npeId, |
| 89 | IxNpeMhMessageId solicitedMessageId, |
| 90 | IxNpeMhCallback solicitedCallback) |
| 91 | * |
| 92 | * @brief This function saves a callback in the specified NPE's callback |
| 93 | * list. If the callback list is full the function will fail. |
| 94 | * |
| 95 | * @param IxNpeMhNpeId npeId (in) - The ID of the NPE in whose callback |
| 96 | * list the callback will be saved. |
| 97 | * @param IxNpeMhMessageId solicitedMessageId (in) - The ID of the message |
| 98 | * that this callback is for. |
| 99 | * @param IxNpeMhCallback solicitedCallback (in) - The callback function |
| 100 | * pointer to save. |
| 101 | * |
| 102 | * @return The function returns a status indicating success or failure. |
| 103 | */ |
| 104 | |
| 105 | IX_STATUS ixNpeMhSolicitedCbMgrCallbackSave ( |
| 106 | IxNpeMhNpeId npeId, |
| 107 | IxNpeMhMessageId solicitedMessageId, |
| 108 | IxNpeMhCallback solicitedCallback); |
| 109 | |
| 110 | /** |
| 111 | * @fn void ixNpeMhSolicitedCbMgrCallbackRetrieve ( |
| 112 | IxNpeMhNpeId npeId, |
| 113 | IxNpeMhMessageId solicitedMessageId, |
| 114 | IxNpeMhCallback *solicitedCallback) |
| 115 | * |
| 116 | * @brief This function retrieves the first ID-matching callback from the |
| 117 | * specified NPE's callback list. If no matching callback can be found the |
| 118 | * function will fail. |
| 119 | * |
| 120 | * @param IxNpeMhNpeId npeId (in) - The ID of the NPE from whose callback |
| 121 | * list the callback will be retrieved. |
| 122 | * @param IxNpeMhMessageId solicitedMessageId (in) - The ID of the message |
| 123 | * that the callback is for. |
| 124 | * @param IxNpeMhCallback solicitedCallback (out) - The callback function |
| 125 | * pointer retrieved. |
| 126 | * |
| 127 | * @return No return value. |
| 128 | */ |
| 129 | |
| 130 | void ixNpeMhSolicitedCbMgrCallbackRetrieve ( |
| 131 | IxNpeMhNpeId npeId, |
| 132 | IxNpeMhMessageId solicitedMessageId, |
| 133 | IxNpeMhCallback *solicitedCallback); |
| 134 | |
| 135 | /** |
| 136 | * @fn void ixNpeMhSolicitedCbMgrShow ( |
| 137 | IxNpeMhNpeId npeId) |
| 138 | * |
| 139 | * @brief This function will display the current state of the Solicited |
| 140 | * Callback Manager module. |
| 141 | * |
| 142 | * @param IxNpeMhNpeId npeId (in) - The ID of the NPE to display state |
| 143 | * information for. |
| 144 | * |
| 145 | * @return No return value. |
| 146 | */ |
| 147 | |
| 148 | void ixNpeMhSolicitedCbMgrShow ( |
| 149 | IxNpeMhNpeId npeId); |
| 150 | |
| 151 | /** |
| 152 | * @fn void ixNpeMhSolicitedCbMgrShowReset ( |
| 153 | IxNpeMhNpeId npeId) |
| 154 | * |
| 155 | * @brief This function will reset the current state of the Solicited |
| 156 | * Callback Manager module. |
| 157 | * |
| 158 | * @param IxNpeMhNpeId npeId (in) - The ID of the NPE to reset state |
| 159 | * information for. |
| 160 | * |
| 161 | * @return No return value. |
| 162 | */ |
| 163 | |
| 164 | void ixNpeMhSolicitedCbMgrShowReset ( |
| 165 | IxNpeMhNpeId npeId); |
| 166 | |
| 167 | #endif /* IXNPEMHSOLICITEDCBMGR_P_H */ |
| 168 | |
| 169 | /** |
| 170 | * @} defgroup IxNpeMhSolicitedCbMgr_p |
| 171 | */ |