| 1 |
/** |
| 2 |
* This file is a part of the Cairo-Dock project |
| 3 |
* |
| 4 |
* Copyright : (C) see the 'copyright' file. |
| 5 |
* E-mail : see the 'copyright' file. |
| 6 |
* |
| 7 |
* This program is free software; you can redistribute it and/or |
| 8 |
* modify it under the terms of the GNU General Public License |
| 9 |
* as published by the Free Software Foundation; either version 3 |
| 10 |
* of the License, or (at your option) any later version. |
| 11 |
* |
| 12 |
* This program is distributed in the hope that it will be useful, |
| 13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
* GNU General Public License for more details. |
| 16 |
* You should have received a copy of the GNU General Public License |
| 17 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 18 |
*/ |
| 19 |
|
| 20 |
#ifndef __CD_DND2SHARE__ |
| 21 |
#define __CD_DND2SHARE__ |
| 22 |
|
| 23 |
#include <cairo-dock.h> |
| 24 |
#include "applet-struct.h" |
| 25 |
|
| 26 |
|
| 27 |
#define DND2SHARE_GENERIC_ERROR_MSG D_("Couldn't upload the file, check that your internet connection is active.") |
| 28 |
#define DND2SHARE_SET_GENERIC_ERROR_WEBSITE(cWebsite) g_set_error (pError, 1, 1, \ |
| 29 |
D_("Couldn't upload the file to %s, check that your internet connection is active."), \ |
| 30 |
cWebsite) |
| 31 |
#define DND2SHARE_SET_GENERIC_ERROR_SERVICE(cService, cCommand) g_set_error (pError, 1, 1, \ |
| 32 |
D_("Couldn't upload the file to %s.\nCheck that your internet connection is active and '%s' is correctly installed and running"), \ |
| 33 |
cService, cCommand) |
| 34 |
|
| 35 |
|
| 36 |
void cd_dnd2share_free_uploaded_item (CDUploadedItem *pItem); |
| 37 |
|
| 38 |
void cd_dnd2share_build_history (void); |
| 39 |
|
| 40 |
void cd_dnd2share_clear_history (void); |
| 41 |
|
| 42 |
|
| 43 |
void cd_dnd2share_launch_upload (const gchar *cFilePath, CDFileType iFileType); |
| 44 |
|
| 45 |
|
| 46 |
void cd_dnd2share_clear_working_directory (void); |
| 47 |
|
| 48 |
void cd_dnd2share_clear_copies_in_working_directory (void); |
| 49 |
|
| 50 |
void cd_dnd2share_set_working_directory_size (guint iNbItems); |
| 51 |
|
| 52 |
void cd_dnd2share_clean_working_directory (void); |
| 53 |
|
| 54 |
|
| 55 |
void cd_dnd2share_copy_url_to_clipboard (const gchar *cURL); |
| 56 |
void cd_dnd2share_copy_url_to_primary (const gchar *cURL); |
| 57 |
|
| 58 |
gchar *cd_dnd2share_get_prefered_url_from_item (CDUploadedItem *pItem); |
| 59 |
|
| 60 |
void cd_dnd2share_set_current_url_from_item (CDUploadedItem *pItem); |
| 61 |
|
| 62 |
|
| 63 |
void cd_dnd2share_remove_one_item (CDUploadedItem *pItem); |
| 64 |
|
| 65 |
|
| 66 |
void cd_dnd2share_register_new_backend (CDFileType iFileType, const gchar *cSiteName, int iNbUrls, const gchar **cUrlLabels, int iPreferedUrlType, CDUploadFunc pUploadFunc); |
| 67 |
|
| 68 |
|
| 69 |
#endif // __CD_DND2SHARE__ |