00001 /** 00002 * @file GateMonitor.h 00003 * 00004 * @brief Header file for Gate based on Monitor. 00005 * 00006 * 00007 * @ver 02.00.00.68_beta1 00008 * 00009 * ============================================================================ 00010 * 00011 * Copyright (c) 2008-2009, Texas Instruments Incorporated 00012 * 00013 * Redistribution and use in source and binary forms, with or without 00014 * modification, are permitted provided that the following conditions 00015 * are met: 00016 * 00017 * * Redistributions of source code must retain the above copyright 00018 * notice, this list of conditions and the following disclaimer. 00019 * 00020 * * Redistributions in binary form must reproduce the above copyright 00021 * notice, this list of conditions and the following disclaimer in the 00022 * documentation and/or other materials provided with the distribution. 00023 * 00024 * * Neither the name of Texas Instruments Incorporated nor the names of 00025 * its contributors may be used to endorse or promote products derived 00026 * from this software without specific prior written permission. 00027 * 00028 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00029 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 00030 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00031 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 00032 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00033 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00034 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 00035 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 00036 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 00037 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 00038 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00039 * Contact information for paper mail: 00040 * Texas Instruments 00041 * Post Office Box 655303 00042 * Dallas, Texas 75265 00043 * Contact information: 00044 * http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm? 00045 * DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact 00046 * ============================================================================ 00047 * 00048 */ 00049 00050 #ifndef GATEMONITOR_H_0x189E 00051 #define GATEMONITOR_H_0x189E 00052 00053 00054 #if defined (__cplusplus) 00055 extern "C" { 00056 #endif 00057 00058 00059 /* ============================================================================= 00060 * Status codes 00061 * ============================================================================= 00062 */ 00063 /*! 00064 * @def GateMonitor_E_INVALIDARG 00065 * @brief Argument passed to a function is invalid. 00066 */ 00067 #define GateMonitor_E_INVALIDARG -1 00068 00069 /*! 00070 * @def GateMonitor_E_MEMORY 00071 * @brief Memory allocation failed. 00072 */ 00073 #define GateMonitor_E_MEMORY -2 00074 00075 /*! 00076 * @def GateMonitor_E_BUSY 00077 * @brief The name is already registered or not. 00078 */ 00079 #define GateMonitor_E_BUSY -3 00080 00081 /*! 00082 * @def GateMonitor_E_FAIL 00083 * @brief Generic failure. 00084 */ 00085 #define GateMonitor_E_FAIL -4 00086 00087 /*! 00088 * @def GateMonitor_E_NOTFOUND 00089 * @brief Name not found in the nameserver. 00090 */ 00091 #define GateMonitor_E_NOTFOUND -5 00092 00093 /*! 00094 * @def GateMonitor_E_INVALIDSTATE 00095 * @brief Module is not initialized. 00096 */ 00097 #define GateMonitor_E_INVALIDSTATE -6 00098 00099 /*! 00100 * @def GateMonitor_E_INUSE 00101 * @brief Indicates that the instance is in use. 00102 */ 00103 #define GateMonitor_E_INUSE -7 00104 00105 /*! 00106 * @def GateMonitor_E_HANDLE 00107 * @brief An invalid handle was provided. 00108 */ 00109 #define GateMonitor_E_HANDLE -8 00110 00111 /*! 00112 * @def GateMonitor_S_SUCCESS 00113 * @brief Operation successful. 00114 */ 00115 #define GateMonitor_S_SUCCESS 0 00116 00117 00118 /* ============================================================================= 00119 * Macros and types 00120 * ============================================================================= 00121 */ 00122 /*! @brief Object for Gate Mutex */ 00123 typedef struct GateMonitor_Object GateMonitor_Object; 00124 00125 /*! @brief Handle for Gate Mutex */ 00126 typedef struct GateMonitor_Object * GateMonitor_Handle; 00127 00128 /*! No parameters for GateMutex creation */ 00129 typedef Void GateMonitor_Params; 00130 00131 00132 /* ============================================================================= 00133 * APIs 00134 * ============================================================================= 00135 */ 00136 /* Function to create a Gate Mutex */ 00137 GateMonitor_Handle GateMonitor_create (const GateMonitor_Params * params); 00138 00139 /* Function to delete a Gate Mutex */ 00140 Int GateMonitor_delete (GateMonitor_Handle * handle); 00141 00142 00143 #if defined (__cplusplus) 00144 } 00145 #endif /* defined (__cplusplus) */ 00146 00147 00148 #endif /* GATEMONITOR_H_0x188E */
1.4.4