This file is indexed.

/usr/include/mama/ft.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
/* $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 MamaFtH__
#define MamaFtH__

#include <mama/mama.h>

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

typedef enum mamaFtState_
{
    MAMA_FT_STATE_STANDBY  = 0,
    MAMA_FT_STATE_ACTIVE   = 1,
    MAMA_FT_STATE_UNKNOWN  = 99
} mamaFtState;

typedef enum mamaFtType_
{
    MAMA_FT_TYPE_MULTICAST = 1,
    MAMA_FT_TYPE_BRIDGE	   = 2,
    MAMA_FT_TYPE_MAX	   = 3
} mamaFtType;

typedef void* mamaFtMember;


/**
 * Callback function type for MAMA fault tolerance events.
 */
typedef void (
MAMACALLTYPE
*mamaFtMemberOnFtStateChangeCb) (mamaFtMember  ftMember,
                                               const char*   groupName,
                                               mamaFtState   state,
                                               void*         closure);

/**
 * Allocate a MAMA fault tolerance group member.  This function is
 * typically followed by mamaFtMember_setup() and
 * mamaFtMember_activate().
 */
MAMAExpDLL
extern mama_status
mamaFtMember_create (
    mamaFtMember*  member);

/**
 * Set up a MAMA fault tolerance group member.  This is only an
 * initialization function.  In order to actually start the fault
 * tolerance monitoring, use mamaFtMember_activate().
 */
MAMAExpDLL
extern mama_status
mamaFtMember_setup (
    mamaFtMember                   member,
    mamaFtType                     fttype,
    mamaQueue                      eventQueue,
    mamaFtMemberOnFtStateChangeCb  callback,
    mamaTransport                  transport,
    const char*                    groupName,
    mama_u32_t                     weight,
    mama_f64_t                     heartbeatInterval,
    mama_f64_t                     timeoutInterval,
    void*                          closure);

/**
 * Create a MAMA fault tolerance group member.
 */
MAMAExpDLL
extern mama_status
mamaFtMember_destroy (
    mamaFtMember    member);

/**
 * Activate the MAMA fault tolerance group member.
 */
MAMAExpDLL
extern mama_status
mamaFtMember_activate (
    mamaFtMember    member);

/**
 * Deactivate the MAMA fault tolerance group member.
 */
MAMAExpDLL
extern mama_status
mamaFtMember_deactivate (
    mamaFtMember    member);

/**
 * Get whether the MAMA fault tolerance member is actively running
 * (not related to its state).  Use mamaFtMember_getState() to
 * determine the actual state of the member.
 */
MAMAExpDLL
extern mama_status
mamaFtMember_isActive (
    const mamaFtMember  member,
    int*                result);

/**
 * Get the group name to which this MAMA FT member belongs.
 */
MAMAExpDLL
extern mama_status
mamaFtMember_getGroupName (
    const mamaFtMember  member,
    const char**        result);

/**
 * Get the fault tolerance weight of the MAMA FT member.
 */
MAMAExpDLL
extern mama_status
mamaFtMember_getWeight (
    const mamaFtMember  member,
    mama_u32_t*         result);

/**
 * Get the fault tolerance heartbeat interval of the MAMA FT member.
 */
MAMAExpDLL
extern mama_status
mamaFtMember_getHeartbeatInterval (
    const mamaFtMember  member,
    mama_f64_t*         result);

/**
 * Get the fault tolerance timeout interval of the MAMA FT member.
 */
MAMAExpDLL
extern mama_status
mamaFtMember_getTimeoutInterval (
    const mamaFtMember  member,
    mama_f64_t*         result);

/**
 * Get the current heartbeat tick of the MAMA FT member.
 */
MAMAExpDLL
extern mama_status
mamaFtMember_getHeartbeatTick (
    const mamaFtMember  member,
    mama_u32_t*         result);

/**
 * Get the closure argument (provided in the mamaFtMember_create()
 * function) of the MAMA FT member.
 */
MAMAExpDLL
extern mama_status
mamaFtMember_getClosure (
    const mamaFtMember  member,
    void**              result);

/**
 * Set the fault tolerance weight of the MAMA FT member.  The FT
 * weight can be changed dynamically, if desired.  The member with the
 * highest weight will become the active member.
 */
MAMAExpDLL
extern mama_status
mamaFtMember_setWeight (
    mamaFtMember  member,
    mama_u32_t    value);

/**
 * Set the instance ID of the MAMA FT member.  The instance ID is used
 * to uniquely identify members of a fault tolerant group.  Most
 * applications should allow the MAMA API to automatically set the
 * instance ID and this function would not be called.  If not set
 * explicitly before activation, then the instance ID is automatically
 * set according to the following format:
 *    {group-name}.{hex-ip-addr}.{hex-pid}.
 * For example, if the group name is "FOO", the IP address is
 * 192.168.187.9, and the PId is 10777, the default instance ID would be:
 *    FOO.c0a8bb9.2a19
 */
MAMAExpDLL
extern mama_status
mamaFtMember_setInstanceId (
    mamaFtMember  member,
    const char*   id);

/**
 * Convert a fault tolerant state to a string.
 *
 * @param state The state to convert.
 */
MAMAExpDLL
extern const char*
mamaFtStateToString (mamaFtState state);


#if defined(__cplusplus)
}
#endif

#endif /* MamaFtH  __ */