aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLRN <lrn1986@gmail.com>2014-03-24 15:58:20 +0000
committerLRN <lrn1986@gmail.com>2014-03-24 15:58:20 +0000
commite76db2cfdd598c9f7a405e35a27abaf6b79b349c (patch)
tree91d623a07fce0f37fe4a59b92356c891c08873d2
parent6ca54eb4cc5ffa6305a6589a8d4eaece112a533e (diff)
downloadgnunet-gtk-e76db2cfdd598c9f7a405e35a27abaf6b79b349c.tar.gz
gnunet-gtk-e76db2cfdd598c9f7a405e35a27abaf6b79b349c.zip
Fix multiple warnings in conversation-gtk
-rw-r--r--src/conversation/gnunet-conversation-gtk.c43
-rw-r--r--src/conversation/gnunet-conversation-gtk.h4
-rw-r--r--src/conversation/gnunet-conversation-gtk_contacts.c28
-rw-r--r--src/conversation/gnunet-conversation-gtk_history.c1
4 files changed, 38 insertions, 38 deletions
diff --git a/src/conversation/gnunet-conversation-gtk.c b/src/conversation/gnunet-conversation-gtk.c
index 4ae137d5..d3e1954f 100644
--- a/src/conversation/gnunet-conversation-gtk.c
+++ b/src/conversation/gnunet-conversation-gtk.c
@@ -74,22 +74,6 @@ static int tray_only;
74 * phone * 74 * phone *
75 *************/ 75 *************/
76 76
77/**
78 * Current state of iterating elements for the client.
79 * NULL if we are not currently iterating.
80 */
81static struct GNUNET_CONTAINER_MultiHashMapIterator *iter;
82
83/**
84 *name of the incomming caller pkey or record name if known
85 */
86static char *callerName;
87
88/**
89 * peer id of a contact
90 */
91static char *peer_id;
92
93/** 77/**
94 * List of active calls 78 * List of active calls
95 */ 79 */
@@ -103,7 +87,7 @@ static GtkTreeView *active_treeview;
103/** 87/**
104 * List of incoming calls 88 * List of incoming calls
105 */ 89 */
106static struct CallList 90struct CallList
107{ 91{
108 92
109 /** 93 /**
@@ -242,6 +226,11 @@ static GtkListStore *zone_liststore;
242 */ 226 */
243static struct GNUNET_IDENTITY_Ego *caller_id; 227static struct GNUNET_IDENTITY_Ego *caller_id;
244 228
229
230void GNUNET_CONVERSATION_GTK_on_active_calls_selection_changed ();
231
232void set_status_icon (const char *icon_name);
233
245/************ 234/************
246 * extern's * 235 * extern's *
247 * **********/ 236 * **********/
@@ -713,6 +702,7 @@ enable_button (const char *button_name)
713/** 702/**
714 * set state of outgoing call 703 * set state of outgoing call
715 */ 704 */
705void
716set_outgoing_call_state(struct GNUNET_CONVERSATION_Call *call, int state) 706set_outgoing_call_state(struct GNUNET_CONVERSATION_Call *call, int state)
717{ 707{
718 LOG("set state to: %u", state); 708 LOG("set state to: %u", state);
@@ -1276,8 +1266,14 @@ do_accept (struct GNUNET_CONVERSATION_Caller *sel_caller)
1276 phone_state = PS_ACCEPTED; 1266 phone_state = PS_ACCEPTED;
1277 set_incoming_call_state(sel_caller,CT_active); 1267 set_incoming_call_state(sel_caller,CT_active);
1278 1268
1279 1269 for (cl = cl_head; cl; cl = cl->next)
1280 cl = sel_caller; 1270 {
1271 /* FIXME: this may not be unique enough to identify the right item!
1272 * Why not store CallList items in treeview instead of just callers?
1273 */
1274 if (cl->caller == sel_caller)
1275 break;
1276 }
1281 GNUNET_CONVERSATION_caller_pick_up (sel_caller, &caller_event_handler, cl, 1277 GNUNET_CONVERSATION_caller_pick_up (sel_caller, &caller_event_handler, cl,
1282 speaker, mic); 1278 speaker, mic);
1283 1279
@@ -1463,13 +1459,13 @@ identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego, void **ctx,
1463{ 1459{
1464 1460
1465 struct GNUNET_CRYPTO_EcdsaPublicKey pk; 1461 struct GNUNET_CRYPTO_EcdsaPublicKey pk;
1466 char *s; 1462
1467 GtkTreeIter iter; 1463 GtkTreeIter iter;
1468 1464
1469 if (NULL != ego) 1465 if (NULL != ego)
1470 { 1466 {
1471 GNUNET_IDENTITY_ego_get_public_key (ego, &pk); 1467 GNUNET_IDENTITY_ego_get_public_key (ego, &pk);
1472 s = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk); 1468
1473 fprintf (stderr, "main identity_cb: %s \n", name); 1469 fprintf (stderr, "main identity_cb: %s \n", name);
1474 1470
1475 1471
@@ -1519,6 +1515,7 @@ identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego, void **ctx,
1519const struct GNUNET_CONFIGURATION_Handle * 1515const struct GNUNET_CONFIGURATION_Handle *
1520GIG_get_configuration () 1516GIG_get_configuration ()
1521{ 1517{
1518 /* FIXME: Configuration handle returned is const, but we DO alter the config */
1522 return GNUNET_GTK_main_loop_get_configuration (ml); 1519 return GNUNET_GTK_main_loop_get_configuration (ml);
1523} 1520}
1524 1521
@@ -1674,8 +1671,8 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1674 1671
1675 cfg = GIG_get_configuration (); 1672 cfg = GIG_get_configuration ();
1676 1673
1677 speaker = GNUNET_SPEAKER_create_from_hardware (GIG_get_configuration ()); 1674 speaker = GNUNET_SPEAKER_create_from_hardware (cfg);
1678 mic = GNUNET_MICROPHONE_create_from_hardware (GIG_get_configuration ()); 1675 mic = GNUNET_MICROPHONE_create_from_hardware (cfg);
1679 1676
1680 b_contact = GTK_WIDGET (get_object ("GNUNET_GTK_conversation_use_current_button")); 1677 b_contact = GTK_WIDGET (get_object ("GNUNET_GTK_conversation_use_current_button"));
1681 b_accept = GTK_WIDGET (get_object ("GNUNET_GTK_conversation_accept_button")); 1678 b_accept = GTK_WIDGET (get_object ("GNUNET_GTK_conversation_accept_button"));
diff --git a/src/conversation/gnunet-conversation-gtk.h b/src/conversation/gnunet-conversation-gtk.h
index 01d5e999..b1ff1c55 100644
--- a/src/conversation/gnunet-conversation-gtk.h
+++ b/src/conversation/gnunet-conversation-gtk.h
@@ -30,8 +30,8 @@
30 * @return configuration handle 30 * @return configuration handle
31 **/ 31 **/
32 32
33//extern struct GNUNET_CONFIGURATION_Handle * 33extern struct GNUNET_CONFIGURATION_Handle *
34//GIG_get_configuration (); 34GIG_get_configuration ();
35 35
36 36
37extern GObject * 37extern GObject *
diff --git a/src/conversation/gnunet-conversation-gtk_contacts.c b/src/conversation/gnunet-conversation-gtk_contacts.c
index 821d5009..bcb6d7ca 100644
--- a/src/conversation/gnunet-conversation-gtk_contacts.c
+++ b/src/conversation/gnunet-conversation-gtk_contacts.c
@@ -47,10 +47,6 @@
47 * Our configurations. 47 * Our configurations.
48 */ 48 */
49static struct GNUNET_CONFIGURATION_Handle *cfg; 49static struct GNUNET_CONFIGURATION_Handle *cfg;
50/**
51 * Name of our ego.
52 */
53static char *contacts_ego_name;
54 50
55/** 51/**
56 * Our ego. 52 * Our ego.
@@ -61,10 +57,6 @@ static struct GNUNET_IDENTITY_Ego *contacts_ego;
61 57
62//static struct GNUNET_CONFIGURATION_Handle *cfg1; 58//static struct GNUNET_CONFIGURATION_Handle *cfg1;
63//static struct GNUNET_CONFIGURATION_Handle *cfg2; 59//static struct GNUNET_CONFIGURATION_Handle *cfg2;
64/**
65 * Be verbose.
66 */
67static int verbose = 1;
68 60
69 61
70 62
@@ -89,7 +81,9 @@ static GtkListStore *zone_liststore;
89/** 81/**
90 * zone treestore 82 * zone treestore
91 */ 83 */
84/*
92static GtkTreeStore *zone_treestore; 85static GtkTreeStore *zone_treestore;
86*/
93 87
94/** 88/**
95 * zone treeview 89 * zone treeview
@@ -145,7 +139,9 @@ static struct GNUNET_CRYPTO_EcdsaPrivateKey zone_pkey;
145/** 139/**
146 * Public key of the zone we are currently editing. 140 * Public key of the zone we are currently editing.
147 */ 141 */
142/*
148static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; 143static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey;
144*/
149 145
150 146
151 147
@@ -173,10 +169,10 @@ display_record (void *cls, const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
173 const char *rname, unsigned int rd_len, 169 const char *rname, unsigned int rd_len,
174 const struct GNUNET_GNSRECORD_Data *rd) 170 const struct GNUNET_GNSRECORD_Data *rd)
175{ 171{
176 const char *typestring; 172/* const char *typestring;*/
177 char *s, *type; 173 char *s, *type;
178 unsigned int i; 174 unsigned int i;
179 const char *ets; 175/* const char *ets;*/
180 struct GNUNET_TIME_Absolute at; 176 struct GNUNET_TIME_Absolute at;
181 struct GNUNET_TIME_Relative rt; 177 struct GNUNET_TIME_Relative rt;
182 GtkTreeIter display_iter; 178 GtkTreeIter display_iter;
@@ -196,7 +192,7 @@ display_record (void *cls, const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
196 if ((GNUNET_GNSRECORD_TYPE_NICK == rd[i].record_type) && 192 if ((GNUNET_GNSRECORD_TYPE_NICK == rd[i].record_type) &&
197 (0 != strcmp (rname, "+"))) 193 (0 != strcmp (rname, "+")))
198 continue; 194 continue;
199 typestring = GNUNET_GNSRECORD_number_to_typename (rd[i].record_type); 195/* typestring = GNUNET_GNSRECORD_number_to_typename (rd[i].record_type);*/
200 s = GNUNET_GNSRECORD_value_to_string (rd[i].record_type, rd[i].data, 196 s = GNUNET_GNSRECORD_value_to_string (rd[i].record_type, rd[i].data,
201 rd[i].data_size); 197 rd[i].data_size);
202 if (NULL == s) 198 if (NULL == s)
@@ -208,12 +204,12 @@ display_record (void *cls, const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
208 if (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION)) 204 if (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION))
209 { 205 {
210 rt.rel_value_us = rd[i].expiration_time; 206 rt.rel_value_us = rd[i].expiration_time;
211 ets = GNUNET_STRINGS_relative_time_to_string (rt, GNUNET_YES); 207/* ets = GNUNET_STRINGS_relative_time_to_string (rt, GNUNET_YES);*/
212 } 208 }
213 else 209 else
214 { 210 {
215 at.abs_value_us = rd[i].expiration_time; 211 at.abs_value_us = rd[i].expiration_time;
216 ets = GNUNET_STRINGS_absolute_time_to_string (at); 212/* ets = GNUNET_STRINGS_absolute_time_to_string (at);*/
217 } 213 }
218 if (rd[i].record_type == 65536) 214 if (rd[i].record_type == 65536)
219 { 215 {
@@ -263,14 +259,18 @@ static void
263identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego, void **ctx, 259identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego, void **ctx,
264 const char *name) 260 const char *name)
265{ 261{
262/*
266 struct GNUNET_CRYPTO_EcdsaPublicKey pk; 263 struct GNUNET_CRYPTO_EcdsaPublicKey pk;
267 char *s; 264 char *s;
265*/
268 GtkTreeIter iter; 266 GtkTreeIter iter;
269 267
270 if (NULL != ego) 268 if (NULL != ego)
271 { 269 {
270/*
272 GNUNET_IDENTITY_ego_get_public_key (ego, &pk); 271 GNUNET_IDENTITY_ego_get_public_key (ego, &pk);
273 s = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk); 272 s = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk);
273*/
274 fprintf (stderr, "contacts idenity_cb: %s \n", name); 274 fprintf (stderr, "contacts idenity_cb: %s \n", name);
275 275
276 276
@@ -546,11 +546,13 @@ print_ego (void *cls,
546// GNUNET_free (s); 546// GNUNET_free (s);
547} 547}
548*/ 548*/
549/*
549static void 550static void
550setCurrentAddressbookEgo(void *cls, struct GNUNET_IDENTITY_Ego *ego) 551setCurrentAddressbookEgo(void *cls, struct GNUNET_IDENTITY_Ego *ego)
551{ 552{
552 currentAddressBookEgo = ego; 553 currentAddressBookEgo = ego;
553} 554}
555*/
554 556
555/** 557/**
556 * A different zone was selected in the zone toggle bar. Load the 558 * A different zone was selected in the zone toggle bar. Load the
diff --git a/src/conversation/gnunet-conversation-gtk_history.c b/src/conversation/gnunet-conversation-gtk_history.c
index 239f2b94..3d1de32c 100644
--- a/src/conversation/gnunet-conversation-gtk_history.c
+++ b/src/conversation/gnunet-conversation-gtk_history.c
@@ -28,6 +28,7 @@
28 */ 28 */
29 29
30#include "gnunet-conversation-gtk_common.h" 30#include "gnunet-conversation-gtk_common.h"
31#include "gnunet-conversation-gtk.h"
31 32
32 33
33/******* 34/*******