summaryrefslogtreecommitdiff
path: root/plugins/Dropbox/src/file_transfer.h
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-04-20 18:52:22 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-04-20 18:52:22 +0000
commit7478b207dea289dcddb5e1bce5b5191ac92605b1 (patch)
tree4321befdd2aedb9b1aa0cddcbc35842882b573c1 /plugins/Dropbox/src/file_transfer.h
parentf7e95fa1db54ad43dc041b812bf7fd7cfa3c4ec7 (diff)
Dropbox: service and events reworked
git-svn-id: http://svn.miranda-ng.org/main/trunk@9005 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dropbox/src/file_transfer.h')
-rw-r--r--plugins/Dropbox/src/file_transfer.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/plugins/Dropbox/src/file_transfer.h b/plugins/Dropbox/src/file_transfer.h
index 35d18bbf08..7558b83eba 100644
--- a/plugins/Dropbox/src/file_transfer.h
+++ b/plugins/Dropbox/src/file_transfer.h
@@ -13,7 +13,7 @@ struct FileTransferParam
wchar_t **pwszFolders;
int relativePathStart;
- bool withVisualisation;
+ wchar_t **pwszUrls;
FileTransferParam()
{
@@ -32,6 +32,8 @@ struct FileTransferParam
pfts.pszFiles = NULL;
pfts.tszWorkingDir = NULL;
pfts.wszCurrentFile = NULL;
+
+ pwszUrls = NULL;
}
~FileTransferParam()
@@ -56,6 +58,32 @@ struct FileTransferParam
}
mir_free(pwszFolders);
}
+
+ if (pwszUrls)
+ {
+ for (int i = 0; pwszUrls[i]; i++)
+ {
+ if (pwszUrls[i]) mir_free(pwszUrls[i]);
+ }
+ mir_free(pwszUrls);
+ }
+ }
+
+ void AddUrl(const wchar_t *url)
+ {
+ int count = 0;
+ if (pwszUrls == NULL)
+ pwszUrls = (wchar_t**)mir_alloc(sizeof(wchar_t*) * 2);
+ else
+ {
+ for (; pwszUrls[count]; count++);
+ pwszUrls = (wchar_t**)mir_realloc(pwszUrls, sizeof(wchar_t*) * (count + 2));
+ }
+ int length = wcslen(url);
+ pwszUrls[count] = (wchar_t*)mir_alloc(sizeof(wchar_t) * (length + 1));
+ wcscpy(pwszUrls[count], url);
+ pwszUrls[count][length] = '\0';
+ pwszUrls[count + 1] = NULL;
}
};