Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

bb_store.c File Reference

#include "gw-config.h"
#include "gwlib/gwlib.h"
#include "msg.h"
#include "bb_store.h"

Include dependency graph for bb_store.c:

Include dependency graph

Go to the source code of this file.

Functions

int store_init (const Octstr *type, const Octstr *fname, long dump_freq, void *pack_func, void *unpack_func)

Variables

long(* store_messages )(void)
int(* store_save )(Msg *msg)
int(* store_save_ack )(Msg *msg, ack_status_t status)
int(* store_load )(void(*receive_msg)(Msg *))
int(* store_dump )(void)
void(* store_shutdown )(void)
Octstr *(* store_status )(int status_type)
Octstr *(* store_msg_pack )(Msg *msg)
Msg *(* store_msg_unpack )(Octstr *os)


Function Documentation

int store_init const Octstr type,
const Octstr fname,
long  dump_freq,
void *  pack_func,
void *  unpack_func
 

Definition at line 81 of file bb_store.c.

References error(), octstr_str_compare(), store_file_init(), store_msg_pack, store_msg_unpack, store_spool_init(), and type.

Referenced by init_bearerbox(), and main().

00083 {
00084     int ret;
00085     
00086     store_msg_pack = pack_func;
00087     store_msg_unpack = unpack_func;
00088 
00089     if (type == NULL || octstr_str_compare(type, "file") == 0) {
00090         ret = store_file_init(fname, dump_freq);
00091     } else if (octstr_str_compare(type, "spool") == 0) {
00092         ret = store_spool_init(fname);
00093     } else {
00094         error(0, "Unknown 'store-type' defined.");
00095         ret = -1;
00096     }
00097 
00098     return ret;
00099 }

Here is the call graph for this function:


Variable Documentation

int(* store_dump)(void)
 

Definition at line 74 of file bb_store.c.

Referenced by store_dumper(), store_file_init(), and store_spool_init().

int(* store_load)(void(*receive_msg)(Msg *))
 

Definition at line 73 of file bb_store.c.

Referenced by main(), store_file_init(), and store_spool_init().

long(* store_messages)(void)
 

Definition at line 70 of file bb_store.c.

Referenced by bb_print_status(), store_file_init(), and store_spool_init().

Octstr*(* store_msg_pack)(Msg *msg)
 

Definition at line 77 of file bb_store.c.

Referenced by store_init(), store_spool_save(), and write_msg().

Msg*(* store_msg_unpack)(Octstr *os)
 

Definition at line 78 of file bb_store.c.

Referenced by dispatch(), read_msg(), status_cb(), and store_init().

int(* store_save)(Msg *msg)
 

Definition at line 71 of file bb_store.c.

Referenced by bb_smscconn_receive(), boxc_receiver(), check_concatenation(), clear_old_concat_parts(), deliver_sms_to_queue(), route_incoming_to_smsc(), store_file_init(), store_file_save_ack(), and store_spool_init().

int(* store_save_ack)(Msg *msg, ack_status_t status)
 

Definition at line 72 of file bb_store.c.

Referenced by bb_smscconn_receive(), bb_smscconn_send_failed(), bb_smscconn_sent(), check_concatenation(), clear_old_concat_parts(), deliver_sms_to_queue(), destroy_concatMsg(), route_incoming_to_smsc(), store_file_init(), and store_spool_init().

void(* store_shutdown)(void)
 

Definition at line 75 of file bb_store.c.

Referenced by main(), store_file_init(), and store_spool_init().

Octstr*(* store_status)(int status_type)
 

Definition at line 76 of file bb_store.c.

Referenced by httpd_store_status(), store_file_init(), and store_spool_init().

See file LICENSE for details about the license agreement for using, modifying, copying or deriving work from this software.