00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _ASTERISK_PKTCCOPS_H
00027 #define _ASTERISK_PKTCCOPS_H
00028
00029 #include "asterisk/optional_api.h"
00030
00031 #if defined(__cplusplus) || defined(c_plusplus)
00032 extern "C" {
00033 #endif
00034
00035 enum {
00036 GATE_SET,
00037 GATE_INFO,
00038 GATE_SET_HAVE_GATEID,
00039 GATE_DEL
00040 };
00041
00042 enum {
00043 GATE_ALLOC_FAILED,
00044 GATE_ALLOC_PROGRESS,
00045 GATE_ALLOCATED,
00046 GATE_CLOSED,
00047 GATE_CLOSED_ERR,
00048 GATE_OPEN,
00049 GATE_DELETED,
00050 GATE_TIMEOUT
00051 };
00052
00053 struct cops_gate {
00054 AST_LIST_ENTRY(cops_gate) list;
00055 uint32_t gateid;
00056 uint16_t trid;
00057 time_t in_transaction;
00058 uint32_t mta;
00059 int state;
00060 time_t allocated;
00061 time_t checked;
00062 time_t deltimer;
00063 struct cops_cmts *cmts;
00064 int (* got_dq_gi) (struct cops_gate *gate);
00065 int (* gate_remove) (struct cops_gate *gate);
00066 int (* gate_open) (struct cops_gate *gate);
00067 void *tech_pvt;
00068 };
00069
00070
00071 AST_OPTIONAL_API(struct cops_gate *, ast_pktccops_gate_alloc,
00072 (int cmd, struct cops_gate *gate, uint32_t mta, uint32_t actcount,
00073 float bitrate, uint32_t psize, uint32_t ssip, uint16_t ssport,
00074 int (* const got_dq_gi) (struct cops_gate *gate),
00075 int (* const gate_remove) (struct cops_gate *gate)),
00076 { return NULL; });
00077
00078 #if defined(__cplusplus) || defined(c_plusplus)
00079 }
00080 #endif
00081
00082 #endif