Merge lp:~rodrigo-moya/ubuntuone-client/add-missing-libsd-api into lp:ubuntuone-client

Proposed by Rodrigo Moya
Status: Merged
Approved by: dobey
Approved revision: 747
Merged at revision: 747
Proposed branch: lp:~rodrigo-moya/ubuntuone-client/add-missing-libsd-api
Merge into: lp:ubuntuone-client
Diff against target: 129 lines (+106/-1)
2 files modified
libsyncdaemon/syncdaemon-daemon.c (+103/-0)
libsyncdaemon/syncdaemon-daemon.h (+3/-1)
To merge this branch: bzr merge lp:~rodrigo-moya/ubuntuone-client/add-missing-libsd-api
Reviewer Review Type Date Requested Status
Stuart Langridge (community) Approve
dobey (community) Approve
Review via email: mp+40939@code.launchpad.net

Commit message

Added missing public files API in SyncdaemonDaemon object

Description of the change

Added missing public files API in SyncdaemonDaemon object

To post a comment you must log in.
Revision history for this message
dobey (dobey) :
review: Approve
Revision history for this message
Stuart Langridge (sil) :
review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (8.8 KiB)

The attempt to merge lp:~rodrigo-moya/ubuntuone-client/add-missing-libsd-api into lp:ubuntuone-client failed. Below is the output from the failed tests.

/usr/bin/gnome-autogen.sh
checking for autoconf >= 2.53...
  testing autoconf2.50... not found.
  testing autoconf... found 2.67
checking for automake >= 1.10...
  testing automake-1.11... found 1.11.1
checking for libtool >= 1.5...
  testing libtoolize... found 2.2.6b
checking for intltool >= 0.30...
  testing intltoolize... found 0.41.1
checking for pkg-config >= 0.14.0...
  testing pkg-config... found 0.25
checking for gtk-doc >= 1.0...
  testing gtkdocize... found 1.15
Checking for required M4 macros...
Checking for forbidden M4 macros...
Processing ./configure.ac
Running libtoolize...
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
Running intltoolize...
Running gtkdocize...
Running aclocal-1.11...
Running autoconf...
Running autoheader...
Running automake-1.11...
Running ./configure --enable-gtk-doc --enable-debug ...
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for library containing strerror... none required
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dep...

Read more...

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

There was a problem validating some authors of the branch. Authors must be either one of the listed Launchpad users, or a member of one of the listed teams on Launchpad.

Persons or Teams:

    contributor-agreement-canonical
    ubuntuone-hackers

Unaccepted Authors:

    Rodrigo Moya <email address hidden>

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

There was a problem validating some authors of the branch. Authors must be either one of the listed Launchpad users, or a member of one of the listed teams on Launchpad.

Persons or Teams:

    contributor-agreement-canonical
    ubuntuone-hackers

Unaccepted Authors:

    Rodrigo Moya <email address hidden>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libsyncdaemon/Makefile.am'
2=== modified file 'libsyncdaemon/syncdaemon-daemon.c'
3--- libsyncdaemon/syncdaemon-daemon.c 2010-11-03 10:33:54 +0000
4+++ libsyncdaemon/syncdaemon-daemon.c 2010-11-19 09:22:48 +0000
5@@ -1068,6 +1068,109 @@
6 }
7
8 /**
9+ * syncdaemon_daemon_publish_file:
10+ * @daemon: A #SyncdaemonDaemon object
11+ * @path: Full path of the file to be published
12+ *
13+ * Publish a file on Ubuntu One. When the file is successfully published, the "file_published"
14+ * signal will be emitted.
15+ *
16+ * Return value: TRUE if successful, FALSE otherwise.
17+ */
18+gboolean
19+syncdaemon_daemon_publish_file (SyncdaemonDaemon *daemon, const gchar *path)
20+{
21+ SyncdaemonMetadata *metadata;
22+ gboolean result = FALSE;
23+
24+ g_return_val_if_fail (SYNCDAEMON_IS_DAEMON (daemon), FALSE);
25+
26+ /* First, retrieve the metadata */
27+ metadata = syncdaemon_daemon_get_metadata (daemon, path, FALSE);
28+ if (metadata != NULL) {
29+ SyncdaemonInterface *interface;
30+
31+ interface = syncdaemon_daemon_get_publicfiles_interface (daemon);
32+ syncdaemon_publicfiles_interface_change_public_access (
33+ SYNCDAEMON_PUBLICFILES_INTERFACE (interface),
34+ syncdaemon_metadata_get_share_id (metadata),
35+ syncdaemon_metadata_get_node_id (metadata),
36+ TRUE);
37+
38+ result = TRUE;
39+
40+ g_object_unref (metadata);
41+ }
42+
43+ return result;
44+}
45+
46+/**
47+ * syncdaemon_daemon_unpublish_file:
48+ * @daemon: A #SyncdaemonDaemon object
49+ * @path: Full path of the file to be unpublished
50+ *
51+ * Unpublish a file from Ubuntu One. When the file is successfully unpublished, the "file_unpublished"
52+ * signal will be emitted.
53+ *
54+ * Return value: TRUE if successful, FALSE otherwise.
55+ */
56+gboolean
57+syncdaemon_daemon_unpublish_file (SyncdaemonDaemon *daemon, const gchar *path)
58+{
59+ SyncdaemonMetadata *metadata;
60+ gboolean result = FALSE;
61+
62+ g_return_val_if_fail (SYNCDAEMON_IS_DAEMON (daemon), FALSE);
63+
64+ /* First, retrieve the metadata */
65+ metadata = syncdaemon_daemon_get_metadata (daemon, path, FALSE);
66+ if (metadata != NULL) {
67+ SyncdaemonInterface *interface;
68+
69+ interface = syncdaemon_daemon_get_publicfiles_interface (daemon);
70+ syncdaemon_publicfiles_interface_change_public_access (
71+ SYNCDAEMON_PUBLICFILES_INTERFACE (interface),
72+ syncdaemon_metadata_get_share_id (metadata),
73+ syncdaemon_metadata_get_node_id (metadata),
74+ FALSE);
75+
76+ result = TRUE;
77+
78+ g_object_unref (metadata);
79+ }
80+
81+ return result;
82+}
83+
84+/**
85+ * syncdaemon_daemon_get_public_files:
86+ * @daemon: A #SyncdaemonDaemon object
87+ *
88+ * Retrieve the list of public files.
89+ *
90+ * Return value: A #GSList of #SyncdaemonFileInfo objects, each of which describes
91+ * a published file for the user. When no longer needed, this list should be
92+ * freed by calling g_slist_free, but the data within the list should never
93+ * be freed, as it belongs to the library.
94+ */
95+GSList *
96+syncdaemon_daemon_get_public_files (SyncdaemonDaemon *daemon)
97+{
98+ SyncdaemonInterface *interface;
99+
100+ g_return_val_if_fail (SYNCDAEMON_IS_DAEMON (daemon), NULL);
101+
102+ interface = syncdaemon_daemon_get_publicfiles_interface (daemon);
103+ if (interface != NULL) {
104+ return syncdaemon_publicfiles_interface_get_public_files (
105+ SYNCDAEMON_PUBLICFILES_INTERFACE (interface));
106+ }
107+
108+ return NULL;
109+}
110+
111+/**
112 * syncdaemon_daemon_create_share:
113 * @daemon: A #SyncdaemonDaemon object
114 * @path: Full path of the folder to be shared
115
116=== modified file 'libsyncdaemon/syncdaemon-daemon.h'
117--- libsyncdaemon/syncdaemon-daemon.h 2010-11-03 10:33:54 +0000
118+++ libsyncdaemon/syncdaemon-daemon.h 2010-11-19 09:22:48 +0000
119@@ -124,7 +124,9 @@
120 void syncdaemon_daemon_unsubscribe_folder (SyncdaemonDaemon *daemon, const gchar *path);
121
122 /* Public files operations */
123-/* FIXME: need nautilus-refactor branch landed first */
124+gboolean syncdaemon_daemon_publish_file (SyncdaemonDaemon *daemon, const gchar *path);
125+gboolean syncdaemon_daemon_unpublish_file (SyncdaemonDaemon *daemon, const gchar *path);
126+GSList *syncdaemon_daemon_get_public_files (SyncdaemonDaemon *daemon);
127
128 /* Shares operations */
129 void syncdaemon_daemon_create_share (SyncdaemonDaemon *daemon,

Subscribers

People subscribed via source and target branches