2
* ubuntuone-nautilus.c - Nautilus extensions for Ubuntu One
4
* Authors: Tim Cole <tim.cole@canonical.com>
5
* Rodney Dawes <rodney.dawes@canonical.com>
6
* Rodrigo Moya <rodrigo.moya@canonical.com>
8
* Copyright 2009-2010 Canonical Ltd.
10
* This program is free software: you can redistribute it and/or modify it
11
* under the terms of the GNU General Public License version 3, as published
12
* by the Free Software Foundation.
14
* This program is distributed in the hope that it will be useful, but
15
* WITHOUT ANY WARRANTY; without even the implied warranties of
16
* MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
17
* PURPOSE. See the GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License along
20
* with this program. If not, see <http://www.gnu.org/licenses/>.
24
#ifndef __UBUNTUONE_NAUTILUS_H__
25
#define __UBUNTUONE_NAUTILUS_H__
27
#include <dbus/dbus-glib.h>
28
#include <libsyncdaemon/syncdaemon-daemon.h>
30
#define UBUNTUONE_TYPE_NAUTILUS (ubuntuone_nautilus_get_type ())
31
#define UBUNTUONE_NAUTILUS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UBUNTUONE_TYPE_NAUTILUS, UbuntuOneNautilus))
33
/* Magical struct for passing data in callbacks */
34
typedef struct _CBData CBData;
39
SyncdaemonDaemon * syncdaemon;
41
DBusGConnection * bus;
42
DBusGProxy * u1_status;
43
DBusGProxy * u1_shares;
44
DBusGProxy * u1_folders;
46
/* Are we connected? */
49
/* The managed directory root */
52
/* Avoid calling get_rootdir and get_folders lots of times */
57
/* Lists of ul/dl/shares for setting emblems */
59
GHashTable * downloads;
62
/* Lists of public files and user defined folders */
66
/* Lists of sync/unsync'd files */
68
GHashTable * needsupdating;
70
/* List of files that are observed for changes */
71
GHashTable * observed;
73
/* Extra data we need to free on finalization */
78
GObjectClass parent_slot;
79
} UbuntuOneNautilusClass;
82
UbuntuOneNautilus * uon;
86
/* Share dialog widgets */
87
GtkWidget * user_picker;
88
GtkWidget * name_entry;
89
GtkWidget * allow_mods;
91
/* Whether to make a file public or private */
95
GType ubuntuone_nautilus_get_type (void);
97
/* Utility functions */
98
gboolean ubuntuone_is_storagefs (UbuntuOneNautilus * uon,
102
void ubuntuone_show_error_dialog (UbuntuOneNautilus *uon, const gchar *title, const gchar *error_message, ...);