diff options
Diffstat (limited to 'src/gnunet_chat_handle.h')
-rw-r--r-- | src/gnunet_chat_handle.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/gnunet_chat_handle.h b/src/gnunet_chat_handle.h index 047afab..569a62f 100644 --- a/src/gnunet_chat_handle.h +++ b/src/gnunet_chat_handle.h | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <gnunet/gnunet_util_lib.h> | 37 | #include <gnunet/gnunet_util_lib.h> |
38 | 38 | ||
39 | #include "gnunet_chat_lib.h" | 39 | #include "gnunet_chat_lib.h" |
40 | #include "gnunet_chat_account.h" | ||
40 | #include "gnunet_chat_message.h" | 41 | #include "gnunet_chat_message.h" |
41 | 42 | ||
42 | struct GNUNET_CHAT_InternalMessages | 43 | struct GNUNET_CHAT_InternalMessages |
@@ -46,12 +47,11 @@ struct GNUNET_CHAT_InternalMessages | |||
46 | struct GNUNET_CHAT_InternalMessages *prev; | 47 | struct GNUNET_CHAT_InternalMessages *prev; |
47 | }; | 48 | }; |
48 | 49 | ||
49 | struct GNUNET_CHAT_InternalIdentities | 50 | struct GNUNET_CHAT_InternalAccounts |
50 | { | 51 | { |
51 | char *name; | 52 | struct GNUNET_CHAT_Account *account; |
52 | struct GNUNET_IDENTITY_Ego *ego; | 53 | struct GNUNET_CHAT_InternalAccounts *next; |
53 | struct GNUNET_CHAT_InternalIdentities *next; | 54 | struct GNUNET_CHAT_InternalAccounts *prev; |
54 | struct GNUNET_CHAT_InternalIdentities *prev; | ||
55 | }; | 55 | }; |
56 | 56 | ||
57 | struct GNUNET_CHAT_Handle | 57 | struct GNUNET_CHAT_Handle |
@@ -67,8 +67,10 @@ struct GNUNET_CHAT_Handle | |||
67 | GNUNET_CHAT_ContextMessageCallback msg_cb; | 67 | GNUNET_CHAT_ContextMessageCallback msg_cb; |
68 | void *msg_cls; | 68 | void *msg_cls; |
69 | 69 | ||
70 | struct GNUNET_CHAT_InternalIdentities *identities_head; | 70 | struct GNUNET_CHAT_InternalAccounts *accounts_head; |
71 | struct GNUNET_CHAT_InternalIdentities *identities_tail; | 71 | struct GNUNET_CHAT_InternalAccounts *accounts_tail; |
72 | |||
73 | const struct GNUNET_CHAT_Account *current; | ||
72 | 74 | ||
73 | struct GNUNET_CONTAINER_MultiHashMap *files; | 75 | struct GNUNET_CONTAINER_MultiHashMap *files; |
74 | struct GNUNET_CONTAINER_MultiHashMap *contexts; | 76 | struct GNUNET_CONTAINER_MultiHashMap *contexts; |
@@ -87,7 +89,6 @@ struct GNUNET_CHAT_Handle | |||
87 | struct GNUNET_CHAT_Handle* | 89 | struct GNUNET_CHAT_Handle* |
88 | handle_create_from_config (const struct GNUNET_CONFIGURATION_Handle* cfg, | 90 | handle_create_from_config (const struct GNUNET_CONFIGURATION_Handle* cfg, |
89 | const char *directory, | 91 | const char *directory, |
90 | const char *name, | ||
91 | GNUNET_CHAT_ContextMessageCallback msg_cb, | 92 | GNUNET_CHAT_ContextMessageCallback msg_cb, |
92 | void *msg_cls); | 93 | void *msg_cls); |
93 | 94 | ||
@@ -98,6 +99,13 @@ void | |||
98 | handle_destroy (struct GNUNET_CHAT_Handle *handle); | 99 | handle_destroy (struct GNUNET_CHAT_Handle *handle); |
99 | 100 | ||
100 | void | 101 | void |
102 | handle_connect (struct GNUNET_CHAT_Handle *handle, | ||
103 | const struct GNUNET_CHAT_Account *account); | ||
104 | |||
105 | void | ||
106 | handle_disconnect (struct GNUNET_CHAT_Handle *handle); | ||
107 | |||
108 | void | ||
101 | handle_send_internal_message (struct GNUNET_CHAT_Handle *handle, | 109 | handle_send_internal_message (struct GNUNET_CHAT_Handle *handle, |
102 | struct GNUNET_CHAT_Context *context, | 110 | struct GNUNET_CHAT_Context *context, |
103 | enum GNUNET_CHAT_MessageFlag flag, | 111 | enum GNUNET_CHAT_MessageFlag flag, |