Go to the documentation of this file.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
00027
00028
00037 #include <stdio.h>
00038 #include <stdlib.h>
00039 #include "../../dprint.h"
00040 #include "../../sr_module.h"
00041 #include "presence.h"
00042 #include "bind_presence.h"
00043 #include "notify.h"
00044 #include "publish.h"
00045 #include "subscribe.h"
00046
00047 int bind_presence(presence_api_t* api)
00048 {
00049 if (!api) {
00050 LM_ERR("Invalid parameter value\n");
00051 return -1;
00052 }
00053
00054 api->add_event = add_event;
00055 api->contains_event= contains_event;
00056 api->search_event= search_event;
00057 api->get_event_list= get_event_list;
00058 api->update_watchers_status= update_watchers_status;
00059 api->new_shtable= new_shtable;
00060 api->destroy_shtable= destroy_shtable;
00061 api->insert_shtable= insert_shtable;
00062 api->search_shtable= search_shtable;
00063 api->delete_shtable= delete_shtable;
00064 api->update_shtable= update_shtable;
00065 api->mem_copy_subs= mem_copy_subs;
00066 api->update_db_subs_timer= update_db_subs_timer;
00067 api->extract_sdialog_info= extract_sdialog_info;
00068 api->get_sphere= get_sphere;
00069 api->get_presentity= get_p_notify_body;
00070 api->free_presentity= free_notify_body;
00071 api->pres_auth_status= pres_auth_status;
00072 api->handle_publish= handle_publish;
00073 api->handle_subscribe0= handle_subscribe0;
00074 api->handle_subscribe= handle_subscribe;
00075 return 0;
00076 }
00077
00078