aboutsummaryrefslogtreecommitdiff
path: root/src/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/file.c')
-rw-r--r--src/file.c36
1 files changed, 35 insertions, 1 deletions
diff --git a/src/file.c b/src/file.c
index 4b36f91..a9c64d7 100644
--- a/src/file.c
+++ b/src/file.c
@@ -70,5 +70,39 @@ file_update_upload_info(const struct GNUNET_CHAT_File *file,
70 uint64_t completed, 70 uint64_t completed,
71 uint64_t size) 71 uint64_t size)
72{ 72{
73 // 73 MESSENGER_FileInfo* info = GNUNET_CHAT_file_get_user_pointer(file);
74
75 if (!info)
76 return;
77
78 // TODO
79}
80
81void
82file_update_download_info(const struct GNUNET_CHAT_File *file,
83 MESSENGER_Application *app,
84 uint64_t completed,
85 uint64_t size)
86{
87 MESSENGER_FileInfo* info = GNUNET_CHAT_file_get_user_pointer(file);
88
89 if (!info)
90 return;
91
92 GList *list = info->file_messages;
93
94 while (list)
95 {
96 UI_MESSAGE_Handle *message = (UI_MESSAGE_Handle*) list->data;
97
98 gtk_progress_bar_set_fraction(
99 message->file_progress_bar,
100 1.0 * completed / size
101 );
102
103 if (completed >= size)
104 ui_message_update(message, app, NULL);
105
106 list = list->next;
107 }
74} 108}