2
ITmages upload client for Windows
3
Copyright (C) 2011 Dmitriy Simbiriatin <slpiv@itmages.ru>
5
This program is free software; you can redistribute it and/or
6
modify it under the terms of the GNU General Public License
7
as published by the Free Software Foundation; either version 2
8
of the License, or (at your option) any later version.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
15
You should have received a copy of the GNU General Public License
16
along with this program; if not, write to the Free Software
17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
#define ITMAGES_LOGIN_URL "http://www.itmages.ru/api/login"
24
#define ITMAGES_LOGOUT_URL "http://www.itmages.ru/api/logout"
25
#define ITMAGES_ADD_URL "http://www.itmages.ru/api/add"
26
#define ITMAGES_CHECK_URL "http://www.itmages.ru"
27
#define ITMAGES_REFERER "http://www.itmages.ru"
28
#define ITMAGES_USER_AGENT "Itmages upload client"
38
/* Checks connection with the ITmages server.
39
Returns 0 if the ITmages server is available.
40
Returns 1 if the ITmages server is not available.
41
Returns -1 if there were some errors during the connection checking. */
42
int ItmagesCheckConnection(
43
char *cookies_path, // Path to the cookies' file
47
/* Logins to the ITmages account.
48
Returns 0 if the login was successfull.
49
Returns 1 if the login was failed.
50
Returns -1 if there were some errors during the login. */
54
char *cookies_path, // Path to the cookies' file
58
/* Logouts from the ITmages account.
59
Returns 0 if the logout was successfull.
60
Returns 1 if the logout was failed.
61
Returns -1 if there were some errors during the logout.*/
67
/* Uploads selected image to the ITmages server.
68
Returns 0 if the image was uploaded successfully.
69
Returns -1 if there were some error during the uplaod. */
71
HWND upload_progress, // Handle of the upload progressbar
72
wchar_t *image_path, // Path to the upload image
73
char *name, // fullname of the image (e.g. "image.png")
74
char *mime, // mime-type of the image(e.g "image/png")
75
char *cookies_path, // Path to the cookies' file
79
ItmagesImageLinks *imageLinks);
81
// Frees the memory used by the ItmagesImageLinks structure.
82
void FreeImageLinks(ItmagesImageLinks *imageLinks);