~noskcaj/ubuntu/saucy/sflphone/merge-1.2.3-2

« back to all changes in this revision

Viewing changes to gnome/src/contacts/conferencelist.c

  • Committer: Jackson Doak
  • Date: 2013-07-10 21:04:46 UTC
  • mfrom: (20.1.3 sid)
  • Revision ID: noskcaj@ubuntu.com-20130710210446-y8f587vza807icr9
Properly merged from upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 *  Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010, 2011 Savoir-Faire Linux Inc.
 
2
 *  Copyright (C) 2004-2012 Savoir-Faire Linux Inc.
3
3
 *  Author: Alexandre Savard <alexandre.savard@savoirfairelinux.com>
4
4
 *
5
5
 *  This program is free software; you can redistribute it and/or modify
14
14
 *
15
15
 *  You should have received a copy of the GNU General Public License
16
16
 *  along with this program; if not, write to the Free Software
17
 
 *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
17
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.
18
18
 *
19
19
 *  Additional permission under GNU GPL version 3 section 7:
20
20
 *
33
33
#include "callable_obj.h"
34
34
#include "calltree.h"
35
35
#include "conferencelist.h"
36
 
#include "logger.h"
37
36
 
38
37
static gint is_confID_confstruct(gconstpointer a, gconstpointer b)
39
38
{
44
43
void conferencelist_init(calltab_t *tab)
45
44
{
46
45
    if (tab == NULL) {
47
 
        ERROR("Call tab is NULL");
 
46
        g_warning("Call tab is NULL");
48
47
        return;
49
48
    }
50
49
 
55
54
void conferencelist_clean(calltab_t *tab)
56
55
{
57
56
    if (tab == NULL) {
58
 
        ERROR("Calltab tab is NULL");
 
57
        g_warning("Calltab tab is NULL");
59
58
        return;
60
59
    }
61
60
 
65
64
void conferencelist_reset(calltab_t *tab)
66
65
{
67
66
    if (tab == NULL) {
68
 
        ERROR("Calltab tab is NULL");
 
67
        g_warning("Calltab tab is NULL");
69
68
        return;
70
69
    }
71
70
 
77
76
void conferencelist_add(calltab_t *tab, const conference_obj_t* conf)
78
77
{
79
78
    if (conf == NULL) {
80
 
        ERROR("Conference is NULL");
 
79
        g_warning("Conference is NULL");
81
80
        return;
82
81
    }
83
82
 
84
83
    if (tab == NULL) {
85
 
        ERROR("Tab is NULL");
 
84
        g_warning("Tab is NULL");
86
85
        return;
87
86
    }
88
87
 
96
95
 
97
96
void conferencelist_remove(calltab_t *tab, const gchar* const conf_id)
98
97
{
99
 
    DEBUG("Remove conference %s", conf_id);
 
98
    g_debug("Remove conference %s", conf_id);
100
99
 
101
100
    if (conf_id == NULL) {
102
 
        ERROR("Conf id is NULL");
 
101
        g_warning("Conf id is NULL");
103
102
        return;
104
103
    }
105
104
 
106
105
    if (tab == NULL) {
107
 
        ERROR("Calltab is NULL");
 
106
        g_warning("Calltab is NULL");
108
107
        return;
109
108
    }
110
109
 
118
117
 
119
118
conference_obj_t* conferencelist_get(calltab_t *tab, const gchar* const conf_id)
120
119
{
121
 
    DEBUG("Conference list get %s", conf_id);
 
120
    g_debug("Conference list get %s", conf_id);
122
121
 
123
122
    if (tab == NULL) {
124
 
        ERROR("Calltab is NULL");
 
123
        g_warning("Calltab is NULL");
125
124
        return NULL;
126
125
    }
127
126
 
136
135
conference_obj_t* conferencelist_get_nth(calltab_t *tab, guint n)
137
136
{
138
137
    if (tab == NULL) {
139
 
        ERROR("Calltab is NULL");
 
138
        g_warning("Calltab is NULL");
140
139
        return NULL;
141
140
    }
142
141
 
143
142
    conference_obj_t *c = g_queue_peek_nth(tab->conferenceQueue, n);
144
143
 
145
144
    if (c == NULL) {
146
 
        ERROR("Could not fetch conference %d", n);
 
145
        g_warning("Could not fetch conference %d", n);
147
146
        return NULL;
148
147
    }
149
148
 
153
152
conference_obj_t *conferencelist_pop_head(calltab_t *tab)
154
153
{
155
154
    if (tab == NULL) {
156
 
        ERROR("Tab is NULL");
 
155
        g_warning("Tab is NULL");
157
156
        return NULL;
158
157
    }
159
158
 
163
162
guint conferencelist_get_size(calltab_t *tab)
164
163
{
165
164
    if (tab == NULL) {
166
 
        ERROR("Calltab is NULL");
 
165
        g_warning("Calltab is NULL");
167
166
        return 0;
168
167
    }
169
168