This file is indexed.

/usr/include/mama/fielddesc.h is in libmama-dev 2.2.2.1-11.1ubuntu1.

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
/* $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 MamaFieldDescriptorH__
#define MamaFieldDescriptorH__

/**
 * The mamaFieldDescriptor class represents a field in a mamaMsg.
 */

#include <mama/status.h>
#include <mama/types.h>
#include <stdlib.h>

#include "wombat/port.h"

#if defined(__cplusplus)
extern "C" {
#endif

typedef enum mamaFieldType_
{
    /** Sub message*/
    MAMA_FIELD_TYPE_MSG           =    1, 

    /** Opaque binary */
    MAMA_FIELD_TYPE_OPAQUE        =    7,
    
    /** String */
    MAMA_FIELD_TYPE_STRING        =    8,
    
    /** Boolean */
    MAMA_FIELD_TYPE_BOOL          =    9, 

    /** Character */
    MAMA_FIELD_TYPE_CHAR          =   10, 

    /** Signed 8 bit integer */
    MAMA_FIELD_TYPE_I8            =   14, 

    /** Unsigned byte */
    MAMA_FIELD_TYPE_U8            =   15,
    
    /** Signed 16 bit integer */
    MAMA_FIELD_TYPE_I16           =   16,
   
    /** Unsigned 16 bit integer */
    MAMA_FIELD_TYPE_U16           =   17,
    
    /** Signed 32 bit integer */
    MAMA_FIELD_TYPE_I32           =   18,
    
    /** Unsigned 32 bit integer */
    MAMA_FIELD_TYPE_U32           =   19,

    /** Signed 64 bit integer */
    MAMA_FIELD_TYPE_I64           =   20,

    /** Unsigned 64 bit integer */
    MAMA_FIELD_TYPE_U64           =   21,
   
    /** 32 bit float */
    MAMA_FIELD_TYPE_F32           =   24, 

    /** 64 bit float */
    MAMA_FIELD_TYPE_F64           =   25,

    /** 64 bit MAMA time */
    MAMA_FIELD_TYPE_TIME          =   26,

    /** MAMA price */
    MAMA_FIELD_TYPE_PRICE         =   27,

    /** Array type support */
    MAMA_FIELD_TYPE_VECTOR_I8     =   34, 
    MAMA_FIELD_TYPE_VECTOR_U8     =   35, 
    MAMA_FIELD_TYPE_VECTOR_I16    =   36, 
    MAMA_FIELD_TYPE_VECTOR_U16    =   37, 
    MAMA_FIELD_TYPE_VECTOR_I32    =   38, 
    MAMA_FIELD_TYPE_VECTOR_U32    =   39,
    MAMA_FIELD_TYPE_VECTOR_I64    =   40, 
    MAMA_FIELD_TYPE_VECTOR_U64    =   41,
    MAMA_FIELD_TYPE_VECTOR_F32    =   44, 
    MAMA_FIELD_TYPE_VECTOR_F64    =   45,
    MAMA_FIELD_TYPE_VECTOR_STRING =   46,
    MAMA_FIELD_TYPE_VECTOR_MSG    =   47,
    MAMA_FIELD_TYPE_VECTOR_TIME   =   48,
    MAMA_FIELD_TYPE_VECTOR_PRICE  =   49,
    MAMA_FIELD_TYPE_QUANTITY      =   50,
    
    /** Collection */
    MAMA_FIELD_TYPE_COLLECTION    =   99,

    /** Unknown */
    MAMA_FIELD_TYPE_UNKNOWN       =  100

} mamaFieldType;

/**
 * Return the field type as a string.
 *
 * @param type The type.
 *
 * @return The type as a string.
 */
MAMAExpDLL
extern const char*
mamaFieldTypeToString (mamaFieldType type);

/**
 * Return the string as a field type.
 *
 * @param str The string to transform.
 *
 * @return The field type.
 */
MAMAExpDLL
extern mamaFieldType
stringToMamaFieldType (const char*  str);

/**
 * Create a mamaFieldDescriptor
 *
 * @param descriptor The descriptor.
 * @param fid  The field identifier.
 * @param type The type.
 * @param name The field name.
 *
 * @return mama_status code
 */
MAMAExpDLL
extern mama_status
mamaFieldDescriptor_create(
    mamaFieldDescriptor*  descriptor, 
    mama_fid_t            fid, 
    mamaFieldType         type, 
    const char*           name);

/**
 * Destroy a mamaFieldDescriptor
 *
 * @param descriptor The descriptor.
 * @return mama_status code
 */
MAMAExpDLL
extern mama_status
mamaFieldDescriptor_destroy(
    mamaFieldDescriptor  descriptor);

/**
 * Return the field identifier. 0 indicates no fid.
 *
 * @param descriptor The descriptor.
 * @return The fid.
 */
MAMAExpDLL
mama_fid_t
mamaFieldDescriptor_getFid(
    const mamaFieldDescriptor  descriptor);

/**
 * Return the data type.
 *
 * @return The type.
 */
MAMAExpDLL
mamaFieldType
mamaFieldDescriptor_getType(
    const mamaFieldDescriptor  descriptor);

/**
 * Return the human readable name of the field.
 *
 * @param descriptor The descriptor.
 * @return The name.
 */
MAMAExpDLL
const char*
mamaFieldDescriptor_getName(
    const mamaFieldDescriptor  descriptor);

/**
 * return a human readable representation of the type name. 
 *
 * @param descriptor The descriptor.
 */
MAMAExpDLL
const char*
mamaFieldDescriptor_getTypeName(
    const mamaFieldDescriptor  descriptor);

/**
 * Associate some user supplied data with this field descriptor.
 *
 * @param descriptor The field descriptor on which the closure is being
 * set.
 * @param closure The arbitrary user supplied data.
 *
 * @return mama_status MAMA_STATUS_OK if the call was successful.
 */
MAMAExpDLL
mama_status
mamaFieldDescriptor_setClosure(
            mamaFieldDescriptor  descriptor,
            void*                closure);

/**
 * Return the user supplied data with this field descriptor. Returns NULL
 * if no data was associated with this field descriptor.
 *
 * @param descriptor The field descriptor from which the closure is being
 * obtained.
 * @param closure The location to where the user supplied data will be written.
 *
 * @return mama_status MAMA_STATUS_OK if the call was successful.
 */
MAMAExpDLL
mama_status
mamaFieldDescriptor_getClosure(
        mamaFieldDescriptor  descriptor,
        void**               closure);

#if defined(__cplusplus)
}
#endif

#endif /* MamaFieldDescriptorH__ */