Add new udafs and RMR support to gsprintconsole_ves
[com/gs-lite.git] / include / clearinghouseregistries.h
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
6  
7  http://www.apache.org/licenses/LICENSE-2.0
8  
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
17
18 #include "fta.h"
19 #include "systat.h"
20 #include "fta_stat.h"
21
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.
26  */
27
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
36  */
37
38 /* Adds a FTA to the lookup table if FTAID schema */
39 gs_retval_t ftalookup_register_fta(FTAID subscriber,
40                                    FTAID ftaid,
41                                    FTAname name,
42                                    gs_uint32_t reusable,
43                                    gs_csp_t schema);
44
45 /* Removes the FTA from the lookup table */
46 gs_retval_t ftalookup_unregister_fta(FTAID subscriber,
47                                      FTAID ftaid);
48
49 /* Looks an FTA up by name */
50 gs_retval_t ftalookup_lookup_fta_index(FTAID caller,
51                                        FTAname name,
52                                        gs_uint32_t reuse,
53                                        FTAID * ftaid,
54                                        gs_csp_t * schema);
55
56 /* Gets called when a consumer stoped receiving data */
57
58 gs_retval_t ftalookup_producer_failure(FTAID caller,FTAID producer);
59
60 /* Gets called when a FTA sends a heart beat */
61
62 gs_retval_t ftalookup_heartbeat(FTAID caller, gs_uint64_t trace_id,
63                                 gs_uint32_t sz, fta_stat * trace );
64 #endif