~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to gnome/src/callable_obj.h

  • Committer: Package Import Robot
  • Author(s): Whoopie
  • Date: 2012-03-22 10:29:10 UTC
  • mfrom: (4.1.12 sid)
  • Revision ID: package-import@ubuntu.com-20120322102910-tb8hugi2su1tguwh
Tags: 1.0.2-1ubuntu1
* Apply some upstream patches to fix FTBFS (LP: #913018):
  - debian/patches/05_glib_includes.patch: fix glib includes.
  - debian/patches/06_use_XkbKeycodeToKeysym.patch: use 
    XkbKeycodeToKeysym instead of (deprecated) XKeycodeToKeysym.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
#include <gtk/gtk.h>
37
37
 
38
38
/**
39
 
 * @enum history_state
40
 
 * This enum have all the state a call can take in the history
41
 
 */
42
 
typedef enum {
43
 
    MISSED      = 0,
44
 
    INCOMING    = 1,
45
 
    OUTGOING    = 2,
46
 
    LAST        = 3,
47
 
} history_state_t;
48
 
 
49
 
/**
50
39
 * @enum contact_type
51
40
 * This enum have all types of contacts: HOME phone, cell phone, etc...
52
41
 */
83
72
    CALL_STATE_RECORD,
84
73
} call_state_t;
85
74
 
 
75
static const char * const TIMESTAMP_START_KEY =   "timestamp_start";
 
76
static const char * const MISSED_STRING =         "missed";
 
77
static const char * const INCOMING_STRING =       "incoming";
 
78
static const char * const OUTGOING_STRING =       "outgoing";
 
79
 
86
80
typedef enum {
87
81
    SRTP_STATE_UNLOCKED = 0,
88
82
    SRTP_STATE_SDES_SUCCESS,
103
97
    gchar* _state_code_description; // A textual description of _state_code
104
98
    gchar* _callID;                 // The call ID
105
99
    gchar* _confID;                 // The conference ID (NULL if don't participate to a conference)
106
 
    gchar* _historyConfID;          // Persistent conf id to be stored in history
 
100
    gchar* _historyConfID;              // Persistent conf id to be stored in history
107
101
    gchar* _accountID;              // The account the call is made with
108
102
    time_t _time_start;             // The timestamp the call was initiating
109
103
    time_t _time_stop;              // The timestamp the call was over
110
 
    history_state_t _history_state; // The history state if necessary
 
104
    gchar *_history_state;          // The history state if necessary
111
105
    srtp_state_t _srtp_state;       // The state of security on the call
112
106
    gchar* _srtp_cipher;            // Cipher used for the srtp session
113
107
    gchar* _sas;                    // The Short Authentication String that should be displayed
118
112
    /**
119
113
     * The information about the person we are talking
120
114
     */
121
 
    gchar *_peer_name;
 
115
    gchar *_display_name;
122
116
    gchar *_peer_number;
123
117
 
124
118
    /**
158
152
 
159
153
    /* Associated IM widget */
160
154
    GtkWidget *_im_widget;
161
 
 
162
 
    time_t _time_added;
163
155
} callable_obj_t;
164
156
 
165
 
callable_obj_t *create_new_call (callable_type_t, call_state_t, const gchar* const, const gchar* const, const gchar* const, const gchar* const);
166
 
 
167
 
callable_obj_t *create_new_call_from_details (const gchar *, GHashTable *);
168
 
 
169
 
callable_obj_t *create_history_entry_from_serialized_form (const gchar *);
170
 
 
171
 
void call_add_error (callable_obj_t * call, gpointer dialog);
172
 
 
173
 
void call_remove_error (callable_obj_t * call, gpointer dialog);
174
 
 
175
 
void call_remove_all_errors (callable_obj_t * call);
 
157
callable_obj_t *create_new_call(callable_type_t, call_state_t, const gchar* const, const gchar* const, const gchar* const, const gchar* const);
 
158
 
 
159
callable_obj_t *create_new_call_from_details(const gchar *, GHashTable *);
 
160
 
 
161
callable_obj_t *create_history_entry_from_hashtable(GHashTable *entry);
 
162
 
 
163
GHashTable* create_hashtable_from_history_entry(callable_obj_t *entry);
 
164
 
 
165
void call_add_error(callable_obj_t * call, gpointer dialog);
 
166
 
 
167
void call_remove_error(callable_obj_t * call, gpointer dialog);
 
168
 
 
169
void call_remove_all_errors(callable_obj_t * call);
176
170
 
177
171
/*
178
172
 * GCompareFunc to compare a callID (gchar* and a callable_obj_t)
182
176
/*
183
177
 * GCompareFunc to get current call (gchar* and a callable_obj_t)
184
178
 */
185
 
gint get_state_callstruct (gconstpointer, gconstpointer);
 
179
gint get_state_callstruct(gconstpointer, gconstpointer);
186
180
 
187
181
/**
188
182
  * This function parse the callable_obj_t.from field to return the name
189
183
  * @param c The call
190
184
  * @return The full name of the caller or an empty string
191
185
  */
192
 
gchar* call_get_peer_name (const gchar*);
 
186
gchar* call_get_display_name(const gchar*);
193
187
 
194
188
/**
195
189
 * This function parse the callable_obj_t.from field to return the number
196
190
 * @param c The call
197
191
 * @return The number of the caller
198
192
 */
199
 
gchar* call_get_peer_number (const gchar*);
200
 
 
201
 
void free_callable_obj_t (callable_obj_t *c);
202
 
 
203
 
gchar* get_peer_info (const gchar* const, const gchar* const);
204
 
 
205
 
gchar* get_call_duration (callable_obj_t *obj);
206
 
 
207
 
gchar* serialize_history_call_entry(callable_obj_t *entry);
208
 
 
209
 
gchar* get_formatted_start_timestamp (time_t);
210
 
 
211
 
gchar* call_get_audio_codec (callable_obj_t *obj);
 
193
gchar* call_get_peer_number(const gchar*);
 
194
 
 
195
void free_callable_obj_t(callable_obj_t *c);
 
196
 
 
197
gchar* get_peer_info(const gchar* const, const gchar* const);
 
198
 
 
199
gchar* get_call_duration(callable_obj_t *obj);
 
200
 
 
201
gchar* get_formatted_start_timestamp(time_t);
 
202
 
 
203
gchar* call_get_audio_codec(callable_obj_t *obj);
 
204
 
 
205
gboolean call_was_outgoing(callable_obj_t * obj);
212
206
 
213
207
#endif