]> git.ipfire.org Git - thirdparty/freeswitch.git/blame - src/mod/event_handlers/mod_kazoo/kazoo_message.h
[mod_event_socket] Check if listener is running before pushing more logs or events...
[thirdparty/freeswitch.git] / src / mod / event_handlers / mod_kazoo / kazoo_message.h
CommitLineData
df1ac5db 1/*
2* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
3* Copyright (C) 2005-2012, Anthony Minessale II <anthm@freeswitch.org>
4*
5* Version: MPL 1.1
6*
7* The contents of this file are subject to the Mozilla Public License Version
8* 1.1 (the "License"); you may not use this file except in compliance with
9* the License. You may obtain a copy of the License at
10* http://www.mozilla.org/MPL/
11*
12* Software distributed under the License is distributed on an "AS IS" basis,
13* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14* for the specific language governing rights and limitations under the
15* License.
16*
17* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
18*
19* The Initial Developer of the Original Code is
20* Anthony Minessale II <anthm@freeswitch.org>
21* Portions created by the Initial Developer are Copyright (C)
22* the Initial Developer. All Rights Reserved.
23*
24* Based on mod_skel by
25* Anthony Minessale II <anthm@freeswitch.org>
26*
27* Contributor(s):
28*
29* Daniel Bryars <danb@aeriandi.com>
30* Tim Brown <tim.brown@aeriandi.com>
31* Anthony Minessale II <anthm@freeswitch.org>
32* William King <william.king@quentustech.com>
33* Mike Jerris <mike@jerris.com>
34*
35* kazoo.c -- Sends FreeSWITCH events to an AMQP broker
36*
37*/
38
39#ifndef KAZOO_MESSAGE_H
40#define KAZOO_MESSAGE_H
41
42#include <switch.h>
43
44typedef struct {
45 uint64_t timestamp;
46 uint64_t start;
47 uint64_t filter;
48 uint64_t serialize;
49 uint64_t print;
50 uint64_t rk;
51} kazoo_message_times_t, *kazoo_message_times_ptr;
52
53typedef struct {
54 cJSON *JObj;
55} kazoo_message_t, *kazoo_message_ptr;
56
57void kazoo_cJSON_AddItemToObject(cJSON *object, const char *string, cJSON *item);
58cJSON * kazoo_event_add_field_to_json(cJSON *dst, switch_event_t *src, kazoo_field_ptr field);
59kazoo_message_ptr kazoo_message_create_event(switch_event_t* evt, kazoo_event_ptr event, kazoo_event_profile_ptr profile);
60kazoo_message_ptr kazoo_message_create_fetch(switch_event_t* evt, kazoo_fetch_profile_ptr profile);
61
62void kazoo_message_destroy(kazoo_message_ptr *msg);
63
64
65#endif /* KAZOO_MESSAGE_H */
66