1 /* ------------------------------------------------
2 Copyright 2014 AT&T Intellectual Property
3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
7 http://www.apache.org/licenses/LICENSE-2.0
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14 ------------------------------------------- */
15 #ifndef CLEARINGHOUSEREGISTRIES_H
16 #define CLEARINGHOUSEREGISTRIES_H
22 /* The table is used to maintain the location information
23 * of FTAs within the clearinghouse it is not used outherwise
24 * Behaviour is undefined if the same name
25 * is registered more then once.
28 /* These functions are used for both FTAs and instances of FTAs
29 * if ftaid.streamid == 0 then the function is called for a FTA
30 * if not it is called for an FTA instance.
31 * if an FTA is registered reusable must be set to 1
32 * if an FTA instance is registered reusable is either set to
33 * 0 or 1 depending if the fta can be reused
34 * if reuse is set to 1 an existing instance is returned
35 * if reuse is set to 0 the FTA and not an instance is returned
38 /* Adds a FTA to the lookup table if FTAID schema */
39 gs_retval_t ftalookup_register_fta(FTAID subscriber,
45 /* Removes the FTA from the lookup table */
46 gs_retval_t ftalookup_unregister_fta(FTAID subscriber,
49 /* Looks an FTA up by name */
50 gs_retval_t ftalookup_lookup_fta_index(FTAID caller,
56 /* Gets called when a consumer stoped receiving data */
58 gs_retval_t ftalookup_producer_failure(FTAID caller,FTAID producer);
60 /* Gets called when a FTA sends a heart beat */
62 gs_retval_t ftalookup_heartbeat(FTAID caller, gs_uint64_t trace_id,
63 gs_uint32_t sz, fta_stat * trace );