diff options
Diffstat (limited to 'src/gnunet_chat_context.h')
-rw-r--r-- | src/gnunet_chat_context.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/gnunet_chat_context.h b/src/gnunet_chat_context.h index 5bafe53..66e777a 100644 --- a/src/gnunet_chat_context.h +++ b/src/gnunet_chat_context.h | |||
@@ -61,31 +61,80 @@ struct GNUNET_CHAT_Context | |||
61 | struct GNUNET_NAMESTORE_QueueEntry *query; | 61 | struct GNUNET_NAMESTORE_QueueEntry *query; |
62 | }; | 62 | }; |
63 | 63 | ||
64 | /** | ||
65 | * Creates a chat context from a messenger <i>room</i> | ||
66 | * with a selected chat <i>handle</i>. | ||
67 | * | ||
68 | * @param[in,out] handle Chat handle | ||
69 | * @param[in,out] room Messenger room | ||
70 | * @return New chat context | ||
71 | */ | ||
64 | struct GNUNET_CHAT_Context* | 72 | struct GNUNET_CHAT_Context* |
65 | context_create_from_room (struct GNUNET_CHAT_Handle *handle, | 73 | context_create_from_room (struct GNUNET_CHAT_Handle *handle, |
66 | struct GNUNET_MESSENGER_Room *room); | 74 | struct GNUNET_MESSENGER_Room *room); |
67 | 75 | ||
76 | /** | ||
77 | * Creates a chat context from a messenger <i>contact</i> | ||
78 | * with a selected chat <i>handle</i>. | ||
79 | * | ||
80 | * @param[in,out] handle Chat handle | ||
81 | * @param[in] contact Messenger contact | ||
82 | * @return New chat context | ||
83 | */ | ||
68 | struct GNUNET_CHAT_Context* | 84 | struct GNUNET_CHAT_Context* |
69 | context_create_from_contact (struct GNUNET_CHAT_Handle *handle, | 85 | context_create_from_contact (struct GNUNET_CHAT_Handle *handle, |
70 | const struct GNUNET_MESSENGER_Contact *contact); | 86 | const struct GNUNET_MESSENGER_Contact *contact); |
71 | 87 | ||
88 | /** | ||
89 | * Destroys a chat <i>context</i> and frees its memory. | ||
90 | * | ||
91 | * @param[in,out] context Chat context | ||
92 | */ | ||
72 | void | 93 | void |
73 | context_destroy (struct GNUNET_CHAT_Context* context); | 94 | context_destroy (struct GNUNET_CHAT_Context* context); |
74 | 95 | ||
96 | /** | ||
97 | * Updates the connected messenger <i>room</i> of a | ||
98 | * selected chat <i>context</i>. | ||
99 | * | ||
100 | * @param[in,out] context Chat context | ||
101 | * @param[in,out] room Messenger room | ||
102 | */ | ||
75 | void | 103 | void |
76 | context_update_room (struct GNUNET_CHAT_Context *context, | 104 | context_update_room (struct GNUNET_CHAT_Context *context, |
77 | struct GNUNET_MESSENGER_Room *room); | 105 | struct GNUNET_MESSENGER_Room *room); |
78 | 106 | ||
107 | /** | ||
108 | * Updates the <i>nick</i> of a selected chat <i>context</i>. | ||
109 | * | ||
110 | * @param[in,out] context Chat context | ||
111 | * @param[in] nick Nick name | ||
112 | */ | ||
79 | void | 113 | void |
80 | context_update_nick (struct GNUNET_CHAT_Context *context, | 114 | context_update_nick (struct GNUNET_CHAT_Context *context, |
81 | const char *nick); | 115 | const char *nick); |
82 | 116 | ||
117 | /** | ||
118 | * Reads the <i>data</i> of records under a given <i>label</i> | ||
119 | * and updates the chat <i>context</i> with it. | ||
120 | * | ||
121 | * @param[in,out] context Chat context | ||
122 | * @param[in] label Label | ||
123 | * @param[in] count Count of data | ||
124 | * @param[in] data Records data | ||
125 | */ | ||
83 | void | 126 | void |
84 | context_read_records (struct GNUNET_CHAT_Context *context, | 127 | context_read_records (struct GNUNET_CHAT_Context *context, |
85 | const char *label, | 128 | const char *label, |
86 | unsigned int count, | 129 | unsigned int count, |
87 | const struct GNUNET_GNSRECORD_Data *data); | 130 | const struct GNUNET_GNSRECORD_Data *data); |
88 | 131 | ||
132 | /** | ||
133 | * Writes the data from a selected chat <i>context</i> into | ||
134 | * the namestore as private records. | ||
135 | * | ||
136 | * @param[in,out] context Chat context | ||
137 | */ | ||
89 | void | 138 | void |
90 | context_write_records (struct GNUNET_CHAT_Context *context); | 139 | context_write_records (struct GNUNET_CHAT_Context *context); |
91 | 140 | ||