]> sjero.net Git - linphone/blob - gtk/linphone.h
Fix upnp forgotten retain
[linphone] / gtk / linphone.h
1 /*
2 linphone, gtk-glade interface.
3 Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18 */
19
20 #ifdef HAVE_CONFIG_H
21 #include "config.h"
22 #endif
23
24 #include <gtk/gtk.h>
25 #ifdef WIN32
26 // alloca is already defined by gtk
27 #undef alloca
28 #endif
29 #include "linphonecore.h"
30
31 #ifdef ENABLE_NLS
32 # include <libintl.h>
33 # undef _
34 # define _(String) gettext (String)
35 #else
36 # define _(String) (String)
37 # define ngettext(singular,plural,number) ((number>1) ? (plural) : (singular) )
38 #endif
39
40 #undef N_
41 #define N_(str) (str)
42
43 #ifdef USE_BUILDDATE_VERSION
44 #include "version_date.h"
45 #undef LINPHONE_VERSION
46 #define LINPHONE_VERSION LINPHONE_VERSION_DATE
47 #endif
48
49 GdkPixbuf * create_pixbuf(const gchar *filename);
50 GdkPixbufAnimation *create_pixbuf_animation(const gchar *filename);
51 void add_pixmap_directory(const gchar *directory);
52 GtkWidget*create_pixmap(const gchar     *filename);
53 GtkWidget *_gtk_image_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio);
54 GdkPixbuf *_gdk_pixbuf_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio);
55
56 void linphone_gtk_destroy_window(GtkWidget *window);
57 GtkWidget *linphone_gtk_create_window(const char *window_name);
58 GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name);
59 GtkWidget *linphone_gtk_create_widget(const char *filename, const char *widget_name);
60
61
62 const char *linphone_gtk_message_storage_get_db_file(const char *filename);
63 void linphone_gtk_show_assistant(void);
64 void linphone_gtk_close_assistant(void);
65
66 LinphoneCore *linphone_gtk_get_core(void);
67 GtkWidget *linphone_gtk_get_main_window();
68 void linphone_gtk_display_something(GtkMessageType type,const gchar *message);
69 void linphone_gtk_start_call(GtkWidget *button);
70 void linphone_gtk_call_terminated();
71 void linphone_gtk_show_friends(void);
72 void linphone_gtk_show_contact(LinphoneFriend *lf);
73 void linphone_gtk_set_my_presence(LinphoneOnlineStatus ss);
74 void linphone_gtk_show_parameters(void);
75 void linphone_gtk_fill_soundcards(GtkWidget *pb);
76 void linphone_gtk_fill_webcams(GtkWidget *pb);
77 void linphone_gtk_load_identities(void);
78 LinphoneChatRoom * linphone_gtk_create_chatroom(const LinphoneAddress *with);
79 void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage *msg);
80 void linphone_gtk_call_log_update(GtkWidget *w);
81 void linphone_gtk_create_log_window(void);
82 void linphone_gtk_log_show(void);
83 void linphone_gtk_show_main_window(void);
84 void linphone_gtk_log_push(OrtpLogLevel lev, const char *fmt, va_list args);
85 void linphone_gtk_destroy_log_window(void);
86 void linphone_gtk_refer_received(LinphoneCore *lc, const char *refer_to);
87 gboolean linphone_gtk_check_logs();
88 void linphone_gtk_buddy_info_updated(LinphoneCore *lc, LinphoneFriend *lf);
89 const gchar *linphone_gtk_get_ui_config(const char *key, const char *def);
90 int linphone_gtk_get_ui_config_int(const char *key, int def);
91 void linphone_gtk_set_ui_config_int(const char *key , int val);
92 void linphone_gtk_visibility_set(const char *hiddens, const char *window_name, GtkWidget *w, gboolean show);
93
94 void linphone_gtk_open_browser(const char *url);
95 void linphone_gtk_check_for_new_version(void);
96 const char *linphone_gtk_get_lang(const char *config_file);
97 void linphone_gtk_set_lang(const char *code);
98 SipSetupContext* linphone_gtk_get_default_sip_setup_context(void);
99 GtkWidget * linphone_gtk_show_buddy_lookup_window(SipSetupContext *ctx);
100 void linphone_gtk_buddy_lookup_set_keyword(GtkWidget *w, const char *kw);
101 void * linphone_gtk_wait(LinphoneCore *lc, void *ctx, LinphoneWaitingState ws, const char *purpose, float progress);
102
103 void linphone_gtk_terminate_call(GtkWidget *button);
104 void update_tab_header(LinphoneCall *call,gboolean pause);
105
106 void linphone_gtk_show_directory_search(void);
107 void linphone_gtk_status_icon_set_blinking(gboolean val);
108 void linphone_gtk_notify(LinphoneCall *call, const char *msg);
109 LinphoneChatRoom *linphone_gtk_start_chat(GtkTreeView* t);
110 void linphone_gtk_load_chatroom(LinphoneChatRoom *cr,const LinphoneAddress *uri,GtkWidget *chat_view);
111 void linphone_gtk_send_text();
112 GtkWidget * linphone_gtk_init_chatroom(LinphoneChatRoom *cr, const LinphoneAddress *with);
113 void linphone_gtk_create_chat_picture(gboolean active);
114 void linphone_gtk_update_chat_picture();
115 void linphone_gtk_chat_set_conversation(const LinphoneAddress *uri,gchar *conversation);
116 gchar * linphone_gtk_chat_get_conversation(const LinphoneAddress *uri);
117
118 /*functions controlling the different views*/
119 gboolean linphone_gtk_use_in_call_view();
120 LinphoneCall *linphone_gtk_get_currently_displayed_call(gboolean *is_conf);
121 void linphone_gtk_create_in_call_view(LinphoneCall *call);
122 void linphone_gtk_in_call_view_set_calling(LinphoneCall *call);
123 void linphone_gtk_in_call_view_set_in_call(LinphoneCall *call);
124 void linphone_gtk_in_call_view_update_duration(LinphoneCall *call);
125 void linphone_gtk_in_call_view_terminate(LinphoneCall *call, const char *error_msg);
126 void linphone_gtk_in_call_view_set_incoming(LinphoneCall *call);
127 void linphone_gtk_in_call_view_set_paused(LinphoneCall *call);
128 void linphone_gtk_in_call_view_set_transfer_status(LinphoneCall *call,LinphoneCallState cstate);
129 void linphone_gtk_mute_clicked(GtkButton *button);
130 void transfer_button_clicked(GtkWidget *button, gpointer call_ref);
131 void linphone_gtk_enable_mute_button(GtkButton *button, gboolean sensitive);
132 void linphone_gtk_enable_hold_button(LinphoneCall *call, gboolean sensitive, gboolean holdon);
133 void linphone_gtk_enable_transfer_button(LinphoneCore *lc, gboolean value);
134 void linphone_gtk_enable_conference_button(LinphoneCore *lc, gboolean value);
135 void linphone_gtk_set_in_conference(LinphoneCall *call);
136 void linphone_gtk_unset_from_conference(LinphoneCall *call);
137 void linphone_gtk_terminate_conference_participant(LinphoneCall *call);
138 void linphone_gtk_in_call_view_show_encryption(LinphoneCall *call);
139 void linphone_gtk_update_video_button(LinphoneCall *call);
140 typedef float (*get_volume_t)(void *data);
141 void linphone_gtk_init_audio_meter(GtkWidget *w, get_volume_t get_volume, void *data);
142
143 void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg);
144 void linphone_gtk_exit_login_frame(void);
145 void linphone_gtk_set_ui_config(const char *key, const char *value);
146
147 void linphone_gtk_log_uninit();
148
149 bool_t linphone_gtk_init_instance(const char *app_name, const char *addr_to_call);
150 void linphone_gtk_uninit_instance(void);
151 void linphone_gtk_monitor_usb(void);
152 void linphone_gtk_unmonitor_usb(void);
153
154 gchar *linphone_gtk_get_record_path(const LinphoneAddress *address, gboolean is_conference);
155 void linphone_gtk_tree_view_set_chat_conversation(const LinphoneAddress *la);
156 gboolean linphone_gtk_friend_list_is_contact(const LinphoneAddress *addr);