/usr/include/mama/symbollist.h is in libmama-dev 2.2.2.1-11ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 | /* $Id$
*
* OpenMAMA: The open middleware agnostic messaging API
* Copyright (C) 2011 NYSE Technologies, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef MamaSymbolListH__
#define MamaSymbolListH__
/* *************************************************** */
/* Includes. */
/* *************************************************** */
#include "mama/mama.h"
#include <mama/config.h>
#include "mama/symbollisttypes.h"
#if defined(__cplusplus)
extern "C" {
#endif
/* *************************************************** */
/* Type Defines. */
/* *************************************************** */
/**
* Prototype for add symbol callback.
* The registered add symbol callback is executed for each
* symbol added to the symbol list.
*
* @param symbol The symbol to be added to the list
* @param userData User-data to be associated with symbol
*/
typedef mama_status (MAMACALLTYPE *addSymbolCbType) (
mamaSymbolListMember symbol,
void* closure);
/**
* Function invoked when completing the iteration over the symbol list
* using mamaSymbolList_iterate().
*/
typedef void (MAMACALLTYPE *mamaSymbolListIterateCompleteFunc) (
mamaSymbolList symbolList,
void* closure);
/**
* Function invoked for each member of the symbol list when iterating
* using mamaSymbolList_iterate().
*/
typedef void (MAMACALLTYPE *mamaSymbolListIterateMemberFunc) (
mamaSymbolList symbolList,
mamaSymbolListMember member,
void* closure);
/**
* Prototype for remove symbol callback.
* The registered remove symbol callback is executed just prior
* to a symbol being removed from the symbol list.
*
* @param symbol The symbol to be removed from the list
* @param userData User-data previously associated with symbol
*/
typedef mama_status (MAMACALLTYPE *removeSymbolCbType) (
mamaSymbolListMember symbol,
void* closure);
/* *************************************************** */
/* Public Function Prototypes. */
/* *************************************************** */
/**
* Add a symbol member to the symbol list, this will cause the add callback to be invoked if it
* has been installed.
*
* @param[in] symbolList The symbolList.
* @param[in] member The symbol member.
*
* @return mama_status return code can be one of
* MAMA_STATUS_NULL_ARG
* MAMA_STATUS_OK
*/
MAMAExpDLL
extern mama_status
mamaSymbolList_addMember(
mamaSymbolList symbolList,
mamaSymbolListMember member);
/**
* Allocate and initialize memory for a new symbolList, mamaSymbolList_deallocate should
* be called on the returned symbol list.
*
* @param[out] symbolList The address of the allocated symbolList.
*
* @return mama_status return code can be one of
* MAMA_STATUS_NOMEM
* MAMA_STATUS_NULL_ARG
* MAMA_STATUS_OK
*/
MAMAExpDLL
extern mama_status
mamaSymbolList_allocate(
mamaSymbolList *symbolList);
/**
* Allocate a symbolListMember.
*
* @param[in] symbolList The symbolList the member to be allocated in.
*
* @return Pointer to the new member.
*/
MAMAExpDLL
extern mamaSymbolListMember
mamaSymbolList_allocateMember(
mamaSymbolList symbolList);
/**
* Clear the symbol list.
*
* @param[in] symbolList The symbolList.
* @param[in] membersToo Whether to also clear all members of the list.
*
* @return mama_status return code can be one of
* MAMA_STATUS_NULL_ARG
* MAMA_STATUS_OK
*/
MAMAExpDLL
extern mama_status
mamaSymbolList_clear(
mamaSymbolList symbolList,
int membersToo);
/**
* Free a symbol list created by mamaSymbolList_allocate.
*
* @param[in] symbolList The symbolList to be deallocated.
*
* @return mama_status return code can be one of
* MAMA_STATUS_NULL_ARG
* MAMA_STATUS_OK
*/
MAMAExpDLL
extern mama_status
mamaSymbolList_deallocate(
mamaSymbolList symbolList);
/**
* Deallocate a symbolListMember.
*
* @param[in] symbolList The symbolList the member belongs to.
* @param[in] member The member of the list to deallocate.
*
* @return mama_status return code can be one of
* MAMA_STATUS_NULL_ARG
* MAMA_STATUS_OK
*/
MAMAExpDLL
extern mama_status
mamaSymbolList_deallocateMember (
mamaSymbolList symbolList,
mamaSymbolListMember member);
/**
* Free the memory for the symbolList and
* all members.
*
* @param symbolList The symbolList to be deallocated.
*
* @return mama_status return code can be one of
* MAMA_STATUS_NULL_ARG
* MAMA_STATUS_OK
*/
MAMAExpDLL
extern mama_status
mamaSymbolList_deallocateWithMembers(
mamaSymbolList symbolList);
/**
* Find a symbol member in the symbol list.
*
* @param[in] symbolList The symbolList.
* @param[in] symbol The name of the symbol to find.
* @param[in] source The source of the symbol to find.
* @param[in] transport The tport of the symbol to find.
* @param[out] member The return symbol member (set to NULL if not found).
*
* @return mama_status return code can be one of
* MAMA_STATUS_INVALID_ARG - the member can't be found.
* MAMA_STATUS_NULL_ARG
* MAMA_STATUS_OK
*/
MAMAExpDLL
extern mama_status
mamaSymbolList_findMember(
const mamaSymbolList symbolList,
const char* symbol,
const char * source,
mamaTransport transport,
mamaSymbolListMember* member);
/**
* Get the closure associated with the this symbolList
*
* @param[in] symbolList The symbolList.
* @param[out] closure The closure
*
* @return mama_status return code can be one of
* MAMA_STATUS_NULL_ARG
* MAMA_STATUS_OK
*/
MAMAExpDLL
extern mama_status
mamaSymbolList_getClosure(
const mamaSymbolList symbolList,
void** closure);
/**
* Get the size of the symbolList
*
* @param[in] symbolList The symbolList.
* @param[in] size The size
*
* @return mama_status value can be one of:
* MAMA_STATUS_NULL_ARG
* MAMA_STATUS_OK
*/
MAMAExpDLL
extern mama_status
mamaSymbolList_getSize(
const mamaSymbolList symbolList,
unsigned long *size);
/**
* Iterate over the symbol list. The "handler" function will be
* invoked for each
*
* @param[in] symbolList The symbolList.
* @param[in] memberFunc The function invoked for each symbol list member.
* @param[in] completeFunc The function invoked upon completion.
* @param[in] iterateClosure The closure passed to each callback
*
* @return mama_status return code can be one of
* MAMA_STATUS_NULL_ARG
* MAMA_STATUS_OK
*/
MAMAExpDLL
extern mama_status
mamaSymbolList_iterate(
mamaSymbolList symbolList,
mamaSymbolListIterateMemberFunc memberFunc,
mamaSymbolListIterateCompleteFunc completeFunc,
void* iterateClosure);
/**
* Remove a symbol member from the symbol list.
*
* @param[in] symbolList The symbolList.
* @param[in] symbol The name of the symbol to be removed.
* @param[in] source The source of the symbol to be removed.
* @param[in] transport The tport of the symbol to be removed.
* @param[out] member The return symbol member (set to NULL if not found).
* Note that this will be freed by the symbol list and should
* be used for reference only.
*
* @return mama_status return code can be one of
* MAMA_STATUS_INVALID_ARG - the member can't be found.
* MAMA_STATUS_NULL_ARG
* MAMA_STATUS_OK
*/
MAMAExpDLL
extern mama_status
mamaSymbolList_removeMember (
mamaSymbolList symbolList,
const char* symbol,
const char * source,
mamaTransport transport,
mamaSymbolListMember* member);
/**
* Remove a symbol member from the symbol list.
*
* @param symbolList The symbolList.
* @param member The symbol to be removed.
*
* @return mama_status return code can be one of
* MAMA_STATUS_NULL_ARG
* MAMA_STATUS_OK
*/
MAMAExpDLL
extern mama_status mamaSymbolList_removeMemberByRef(
mamaSymbolList symbolList,
mamaSymbolListMember member);
/**
* Registers the user defined add symbol callback with the symbolList.
* The registered callback will get called each time a symbol is added to
* the symbol list.
*
* @param[in] symbolList The symbolList.
* @param[in] addCb Pointer to the user defined callback. Must conform to
* function prototype <code>addSymbolCbType</code>.
*
* @return mama_status return code can be one of
* MAMA_STATUS_NULL_ARG
* MAMA_STATUS_OK
*/
MAMAExpDLL
extern mama_status
mamaSymbolList_setAddSymbolHandler(
mamaSymbolList symbolList,
addSymbolCbType addCb);
/**
* Set the closure associated with the this symbolList
*
* @param[in] symbolList The symbolList.
* @param[in] closure The closure
*
* @return mama_status return code can be one of
* MAMA_STATUS_NULL_ARG
* MAMA_STATUS_OK
*/
MAMAExpDLL
extern mama_status
mamaSymbolList_setClosure(
mamaSymbolList symbolList,
void* closure);
/**
* Registers the user defined remove symbol callback with the symbolList.
* The registered callback will get called each time a symbol is deleted
* from the symbol list.
*
* @param[in] symbolList The symbolList.
* @param[in] removeCb Pointer to the user defined callback. Must conform to
* function prototype <code>removeSymbolCbType</code>.
*
* @return mama_status return code can be one of
* MAMA_STATUS_NULL_ARG
* MAMA_STATUS_OK
*/
MAMAExpDLL
extern mama_status
mamaSymbolList_setRemoveSymbolHandler(
mamaSymbolList symbolList,
removeSymbolCbType removeCb);
#if defined(__cplusplus)
}
#endif
#endif
|