[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r32312 - gnunet-gtk/src/conversation
From: |
gnunet |
Subject: |
[GNUnet-SVN] r32312 - gnunet-gtk/src/conversation |
Date: |
Tue, 11 Feb 2014 17:47:00 +0100 |
Author: yids
Date: 2014-02-11 17:47:00 +0100 (Tue, 11 Feb 2014)
New Revision: 32312
Modified:
gnunet-gtk/src/conversation/gnunet-conversation-gtk.c
gnunet-gtk/src/conversation/gnunet-conversation-gtk.h
Log:
- some experiments with the address book
Modified: gnunet-gtk/src/conversation/gnunet-conversation-gtk.c
===================================================================
--- gnunet-gtk/src/conversation/gnunet-conversation-gtk.c 2014-02-11
16:44:27 UTC (rev 32311)
+++ gnunet-gtk/src/conversation/gnunet-conversation-gtk.c 2014-02-11
16:47:00 UTC (rev 32312)
@@ -297,8 +297,9 @@
cl->caller_id = GNUNET_strdup (caller_id);
cl->caller_num = caller_num_gen++;
GNUNET_CONTAINER_DLL_insert (cl_head, cl_tail, cl);
- strncpy (&callerName, &caller_id, 50);
- callerName[52] = '\0';
+ callerName = caller_id;
+ //strncpy (&callerName, &caller_id, 50);
+ //callerName[52] = '\0';
quick_message ("der is een beller", caller_id);
break;
@@ -485,7 +486,7 @@
&call_event_handler, NULL);
UPDATE_STATUS (_("We are calling `%s', his phone should be ringing."),
peer_name);
- history_add (CH_ACCEPTED, peer_name);
+ history_add (CH_OUTGOING, peer_name);
}
@@ -849,14 +850,6 @@
//test_finished ();
return;
}
- if ((NULL != name) && (0 != strcmp (name, rname)))
- {
- GNUNET_NAMESTORE_zone_iterator_next (list_it);
- return;
- }
- //FPRINTF (stdout,
-// "%s:\n",
-// rname);
for (i = 0; i < rd_len; i++)
{
@@ -983,7 +976,7 @@
{
struct GNUNET_CRYPTO_EcdsaPublicKey pk;
char *s;
-// GtkTreeIter iter;
+ GtkTreeIter iter;
if (NULL != ego)
{
@@ -1453,10 +1446,9 @@
static size_t data_size;
struct GNUNET_CRYPTO_EcdsaPublicKey pkey;
-
GNUNET_CRYPTO_ecdsa_public_key_from_string (address, strlen (address),
&pkey);
rde = &rd;
- zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (caller_id);
+ zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (currentAddressBookEgo);
rd.data = &pkey;
rd.data_size = sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey);
rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY;
@@ -1480,7 +1472,6 @@
gtk_list_store_set (contacts_liststore, &iter, 1, "PKEY", 0, name, -1);
}
}
-
/*
* executed when clicked on add contact
* @param button
@@ -1498,6 +1489,7 @@
addressEntry = GTK_ENTRY (get_object ("GNUNET_GTK_conversation_addressAdd"));
FPRINTF(stderr,"name %s \n", gtk_entry_get_text (nameEntry));
FPRINTF(stderr,"addr %s \n", gtk_entry_get_text (addressEntry));
+
add_contact (gtk_entry_get_text
(nameEntry),gtk_entry_get_text(addressEntry));
}
@@ -1700,6 +1692,13 @@
// GNUNET_NAMESTORE_zone_iterator_next(list_it);
}
+
+GNUNET_IDENTITY_EgoCallback
+setCurrentAddressbookEgo(void *cls, struct GNUNET_IDENTITY_Ego *ego)
+{
+ currentAddressBookEgo = ego;
+}
+
/**
* A different zone was selected in the zone toggle bar. Load the
* appropriate zone.
@@ -1728,6 +1727,11 @@
temp_zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (tempEgo);
gtk_list_store_clear(contacts_liststore);
+ GNUNET_IDENTITY_ego_lookup (cfg,
+ tempName,
+ setCurrentAddressbookEgo,
+ NULL);
+
list_it =
GNUNET_NAMESTORE_zone_iteration_start (ns, &temp_zone_pkey,
&display_record,
NULL);
@@ -1736,4 +1740,3 @@
}
-
Modified: gnunet-gtk/src/conversation/gnunet-conversation-gtk.h
===================================================================
--- gnunet-gtk/src/conversation/gnunet-conversation-gtk.h 2014-02-11
16:44:27 UTC (rev 32311)
+++ gnunet-gtk/src/conversation/gnunet-conversation-gtk.h 2014-02-11
16:47:00 UTC (rev 32312)
@@ -508,8 +508,8 @@
};
+static struct GNUNET_IDENTITY_Ego *currentAddressBookEgo;
-
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r32312 - gnunet-gtk/src/conversation,
gnunet <=