Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/f-spot/ChangeLog,v
retrieving revision 1.1535
diff -u -p -r1.1535 ChangeLog
--- ChangeLog	11 Aug 2006 17:17:26 -0000	1.1535
+++ ChangeLog	25 Aug 2006 09:34:49 -0000
@@ -1,3 +1,18 @@
+2006-08-25  Stephane Delcroix <stephane@delcroix.org>
+
+	* gnome-keyring-sharp:
+	* google-sharp:
+	* configure.in:
+	* Makefile.am: 
+	* src/f-spot.in: Include gnome-keyring-sharp and google-sharp (CVS
+	versions) to the buildchain.
+
+	* src/Makefile.am:
+	* src/MainWindow.cs:
+	* src/Preferences.cs:
+	* src/f-spot.glade:
+	* src/PicasaWebExport.cs: Support for export to Picasaweb.
+
 2006-08-11  Gabriel Burt  <gabriel.burt@gmail.com>
 
 	* src/FolderExport.cs: Internationalize several strings in generated HTML
Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/f-spot/Makefile.am,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile.am
--- Makefile.am	17 Feb 2006 17:02:32 -0000	1.13
+++ Makefile.am	25 Aug 2006 09:34:49 -0000
@@ -1,5 +1,7 @@
 SUBDIRS = 		\
 	FlickrNet	\
+	google-sharp	\
+	gnome-keyring-sharp \
 	icons		\
 	libeog		\
 	libjpegtran	\
Index: configure.in
===================================================================
RCS file: /cvs/gnome/f-spot/configure.in,v
retrieving revision 1.102
diff -u -p -r1.102 configure.in
--- configure.in	24 May 2006 15:44:42 -0000	1.102
+++ configure.in	25 Aug 2006 09:34:49 -0000
@@ -170,6 +170,8 @@ AC_SUBST(GNOME_ICON_THEME_PREFIX)
 AC_OUTPUT([
 Makefile
 FlickrNet/Makefile
+google-sharp/Makefile
+gnome-keyring-sharp/Makefile
 icons/Makefile
 libeog/Makefile
 libeog/cursors/Makefile
Index: src/MainWindow.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/MainWindow.cs,v
retrieving revision 1.304
diff -u -p -r1.304 MainWindow.cs
--- src/MainWindow.cs	11 Aug 2006 16:35:53 -0000	1.304
+++ src/MainWindow.cs	25 Aug 2006 09:34:51 -0000
@@ -1374,6 +1374,10 @@ public class MainWindow {
 		info_display_window.Destroyed += HandleInfoDisplayDestroy;
 	}
 
+	void HandleExportToPicasa (object sender, EventArgs args)
+	{
+		new FSpot.GoogleExport (new FSpot.PhotoArray (SelectedPhotos ()));
+	}
 
 	void HandleExportToGallery (object sender, EventArgs args)
 	{
Index: src/Makefile.am
===================================================================
RCS file: /cvs/gnome/f-spot/src/Makefile.am,v
retrieving revision 1.64
diff -u -p -r1.64 Makefile.am
--- src/Makefile.am	18 Jul 2006 23:16:24 -0000	1.64
+++ src/Makefile.am	25 Aug 2006 09:34:51 -0000
@@ -75,6 +75,7 @@ F_SPOT_CSDISTFILES =				\
 	$(srcdir)/PhotoView.cs			\
 	$(srcdir)/PngFile.cs			\
 	$(srcdir)/PnmFile.cs			\
+	$(srcdir)/PicasaWebExport.cs		\
 	$(srcdir)/PixbufLoader.cs		\
 	$(srcdir)/PixbufUtils.cs		\
 	$(srcdir)/PixbufCache.cs		\
@@ -125,6 +126,8 @@ ASSEMBLIES =					\
 	-r:$(top_builddir)/libgphoto2-sharp/libgphoto2-sharp.dll   \
 	-r:$(top_builddir)/semweb/SemWeb.dll	\
 	-r:$(top_builddir)/FlickrNet/FlickrNet.dll	\
+	-r:$(top_builddir)/google-sharp/google-sharp.dll	\
+	-r:$(top_builddir)/gnome-keyring-sharp/gnome-keyring-sharp.dll	\
 	-r:System.Data				\
 	-r:System.Web				\
 	-r:Mono.Data.SqliteClient		\
@@ -135,7 +138,8 @@ ASSEMBLIES =					\
 	-pkg:gtkhtml-sharp-2.0			\
 	-pkg:glade-sharp-2.0			\
 	-pkg:gnome-vfs-sharp-2.0		\
-	-pkg:gconf-sharp-2.0
+	-pkg:gconf-sharp-2.0			
+
 
 RESOURCES =										\
 	-resource:$(top_srcdir)/icons/f-spot-adjust-colors.png,f-spot-adjust-colors.png		\
Index: src/Preferences.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/Preferences.cs,v
retrieving revision 1.13
diff -u -p -r1.13 Preferences.cs
--- src/Preferences.cs	19 May 2006 16:21:10 -0000	1.13
+++ src/Preferences.cs	25 Aug 2006 09:34:51 -0000
@@ -71,6 +71,11 @@ namespace FSpot
 		public const string EXPORT_GALLERY_BROWSER = "/apps/f-spot/export/gallery/browser";
 		public const string EXPORT_GALLERY_META = "/apps/f-spot/export/gallery/meta";
 
+		public const string EXPORT_PICASAWEB_SCALE = "/apps/f-spot/export/picasaweb/scale";
+		public const string EXPORT_PICASAWEB_SIZE = "/apps/f-spot/export/picasaweb/size";
+		public const string EXPORT_PICASAWEB_ROTATE = "/apps/f-spot/export/picasaweb/rotate";
+		public const string EXPORT_PICASAWEB_BROWSER = "/apps/f-spot/export/picasaweb/browser";
+
 		public const string SCREENSAVER_TAG = "/apps/f-spot/screensaver/tag_id";
 
 		public const string METADATA_EMBED_IN_IMAGE = "/apps/f-spot/metadata/embed_in_image";
@@ -119,7 +124,13 @@ namespace FSpot
 			case SHOW_TIMELINE:
 			case SHOW_TAGS:
 			case SHOW_DATES:
+			case EXPORT_PICASAWEB_SCALE:
+			case EXPORT_PICASAWEB_ROTATE:
+			case EXPORT_PICASAWEB_BROWSER:
 				return true;
+			
+			case EXPORT_PICASAWEB_SIZE:
+				return 800;
 		
 			case SIDEBAR_POSITION:
 			case ZOOM:
Index: src/f-spot.glade
===================================================================
RCS file: /cvs/gnome/f-spot/src/f-spot.glade,v
retrieving revision 1.164
diff -u -p -r1.164 f-spot.glade
--- src/f-spot.glade	6 Jun 2006 18:09:47 -0000	1.164
+++ src/f-spot.glade	25 Aug 2006 09:35:02 -0000
@@ -3123,7 +3123,7 @@ Photo Details</property>
   </child>
 </widget>
 
-<widget class="GtkDialog" id="gallery_export_dialog">
+<widget class="GtkDialog" id="google_export_dialog">
   <property name="title" translatable="yes">Export</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
   <property name="window_position">GTK_WIN_POS_NONE</property>
@@ -3385,11 +3385,11 @@ Photo Details</property>
 			      <property name="visible">True</property>
 			      <property name="label" translatable="yes"></property>
 			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
+			      <property name="use_markup">True</property>
 			      <property name="justify">GTK_JUSTIFY_LEFT</property>
 			      <property name="wrap">False</property>
 			      <property name="selectable">False</property>
-			      <property name="xalign">0.5</property>
+			      <property name="xalign">0</property>
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">0</property>
 			      <property name="ypad">0</property>
@@ -3412,7 +3412,7 @@ Photo Details</property>
 		  <child>
 		    <widget class="GtkLabel" id="label44">
 		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">&lt;b&gt;Gallery&lt;/b&gt;</property>
+		      <property name="label" translatable="yes">&lt;b&gt;PicasaWeb Export&lt;/b&gt;</property>
 		      <property name="use_underline">False</property>
 		      <property name="use_markup">True</property>
 		      <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -3693,14 +3693,14 @@ Photo Details</property>
 			  </child>
 
 			  <child>
-			    <widget class="GtkCheckButton" id="meta_check">
+			    <widget class="GtkCheckButton" id="rotate_check">
 			      <property name="visible">True</property>
 			      <property name="can_focus">True</property>
-			      <property name="label" translatable="yes">Export _titles and comments</property>
+			      <property name="label" translatable="yes">Autorotate</property>
 			      <property name="use_underline">True</property>
 			      <property name="relief">GTK_RELIEF_NORMAL</property>
 			      <property name="focus_on_click">True</property>
-			      <property name="active">True</property>
+			      <property name="active">False</property>
 			      <property name="inconsistent">False</property>
 			      <property name="draw_indicator">True</property>
 			    </widget>
@@ -3762,9 +3762,8 @@ Photo Details</property>
   </child>
 </widget>
 
-<widget class="GtkDialog" id="gallery_add_album_dialog">
-  <property name="visible">True</property>
-  <property name="title" translatable="yes"></property>
+<widget class="GtkDialog" id="gallery_export_dialog">
+  <property name="title" translatable="yes">Export</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
   <property name="window_position">GTK_WIN_POS_NONE</property>
   <property name="modal">False</property>
@@ -3780,13 +3779,13 @@ Photo Details</property>
   <property name="has_separator">False</property>
 
   <child internal-child="vbox">
-    <widget class="GtkVBox" id="dialog-vbox12">
+    <widget class="GtkVBox" id="dialog-vbox11">
       <property name="visible">True</property>
       <property name="homogeneous">False</property>
       <property name="spacing">0</property>
 
       <child internal-child="action_area">
-	<widget class="GtkHButtonBox" id="dialog-action_area12">
+	<widget class="GtkHButtonBox" id="dialog-action_area11">
 	  <property name="visible">True</property>
 	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
@@ -3804,11 +3803,11 @@ Photo Details</property>
 	  </child>
 
 	  <child>
-	    <widget class="GtkButton" id="add_button">
+	    <widget class="GtkButton" id="ok_button">
 	      <property name="visible">True</property>
 	      <property name="can_default">True</property>
 	      <property name="can_focus">True</property>
-	      <property name="label">gtk-add</property>
+	      <property name="label">gtk-ok</property>
 	      <property name="use_stock">True</property>
 	      <property name="relief">GTK_RELIEF_NORMAL</property>
 	      <property name="focus_on_click">True</property>
@@ -3825,208 +3824,1358 @@ Photo Details</property>
       </child>
 
       <child>
-	<widget class="GtkTable" id="table10">
-	  <property name="border_width">12</property>
+	<widget class="GtkHBox" id="hbox17">
+	  <property name="border_width">6</property>
 	  <property name="visible">True</property>
-	  <property name="n_rows">4</property>
-	  <property name="n_columns">2</property>
 	  <property name="homogeneous">False</property>
-	  <property name="row_spacing">6</property>
-	  <property name="column_spacing">7</property>
+	  <property name="spacing">0</property>
 
 	  <child>
-	    <widget class="GtkLabel" id="gallery_label">
+	    <widget class="GtkFrame" id="frame8">
 	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_Parent Album:</property>
-	      <property name="use_underline">True</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">1</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="mnemonic_widget">album_optionmenu</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="left_attach">0</property>
-	      <property name="right_attach">1</property>
-	      <property name="top_attach">0</property>
-	      <property name="bottom_attach">1</property>
-	      <property name="x_options">fill</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_NONE</property>
 
-	  <child>
-	    <widget class="GtkLabel" id="password_label">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_Title:</property>
-	      <property name="use_underline">True</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">1</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="mnemonic_widget">title_entry</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="left_attach">0</property>
-	      <property name="right_attach">1</property>
-	      <property name="top_attach">3</property>
-	      <property name="bottom_attach">4</property>
-	      <property name="x_options">fill</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
+	      <child>
+		<widget class="GtkAlignment" id="alignment12">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">1</property>
+		  <property name="yscale">1</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">12</property>
+		  <property name="right_padding">0</property>
 
-	  <child>
-	    <widget class="GtkEntry" id="title_entry">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="editable">True</property>
-	      <property name="visibility">True</property>
-	      <property name="max_length">0</property>
-	      <property name="text" translatable="yes"></property>
-	      <property name="has_frame">True</property>
-	      <property name="invisible_char">*</property>
-	      <property name="activates_default">False</property>
-	    </widget>
-	    <packing>
-	      <property name="left_attach">1</property>
-	      <property name="right_attach">2</property>
-	      <property name="top_attach">3</property>
-	      <property name="bottom_attach">4</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
+		  <child>
+		    <widget class="GtkScrolledWindow" id="thumb_scrolledwindow">
+		      <property name="width_request">180</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="shadow_type">GTK_SHADOW_IN</property>
+		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
 
-	  <child>
-	    <widget class="GtkLabel" id="descroption_label">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_Description:</property>
-	      <property name="use_underline">True</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">1</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="mnemonic_widget">description_entry</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="left_attach">0</property>
-	      <property name="right_attach">1</property>
-	      <property name="top_attach">2</property>
-	      <property name="bottom_attach">3</property>
-	      <property name="x_options">fill</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
 
-	  <child>
-	    <widget class="GtkEntry" id="description_entry">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="editable">True</property>
-	      <property name="visibility">True</property>
-	      <property name="max_length">0</property>
-	      <property name="text" translatable="yes"></property>
-	      <property name="has_frame">True</property>
-	      <property name="invisible_char">*</property>
-	      <property name="activates_default">False</property>
+	      <child>
+		<widget class="GtkLabel" id="photo_frame">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">&lt;b&gt;Photos&lt;/b&gt;</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">True</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
 	    </widget>
 	    <packing>
-	      <property name="left_attach">1</property>
-	      <property name="right_attach">2</property>
-	      <property name="top_attach">2</property>
-	      <property name="bottom_attach">3</property>
-	      <property name="y_options"></property>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
 	    </packing>
 	  </child>
 
 	  <child>
-	    <widget class="GtkLabel" id="name_label">
+	    <widget class="GtkVBox" id="vbox11">
 	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_Album Name:</property>
-	      <property name="use_underline">True</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">1</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="mnemonic_widget">name_entry</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
+
+	      <child>
+		<widget class="GtkFrame" id="frame9">
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+		  <child>
+		    <widget class="GtkAlignment" id="alignment13">
+		      <property name="visible">True</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xscale">1</property>
+		      <property name="yscale">1</property>
+		      <property name="top_padding">0</property>
+		      <property name="bottom_padding">0</property>
+		      <property name="left_padding">12</property>
+		      <property name="right_padding">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox12">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">6</property>
+
+			  <child>
+			    <widget class="GtkHBox" id="hbox20">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">6</property>
+
+			      <child>
+				<widget class="GtkLabel" id="gallery_label">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">_Gallery:</property>
+				  <property name="use_underline">True</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				  <property name="mnemonic_widget">gallery_optionmenu</property>
+				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+				  <property name="width_chars">-1</property>
+				  <property name="single_line_mode">False</property>
+				  <property name="angle">0</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkOptionMenu" id="gallery_optionmenu">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="history">-1</property>
+				  <signal name="changed" handler="HandleAccountSelected" last_modification_time="Fri, 08 Oct 2004 22:18:26 GMT"/>
+
+				  <child>
+				    <widget class="GtkMenu" id="menu1">
+				    </widget>
+				  </child>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">True</property>
+				  <property name="fill">True</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkButton" id="gallery_button">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label">gtk-add</property>
+				  <property name="use_stock">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <signal name="clicked" handler="HandleAddGallery" last_modification_time="Fri, 08 Oct 2004 22:16:40 GMT"/>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkButton" id="edit_button">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label">gtk-edit</property>
+				  <property name="use_stock">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="status_label">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			      <property name="width_chars">-1</property>
+			      <property name="single_line_mode">False</property>
+			      <property name="angle">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label44">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">&lt;b&gt;Gallery&lt;/b&gt;</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">True</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkFrame" id="frame10">
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+		  <child>
+		    <widget class="GtkAlignment" id="alignment14">
+		      <property name="visible">True</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xscale">1</property>
+		      <property name="yscale">1</property>
+		      <property name="top_padding">0</property>
+		      <property name="bottom_padding">0</property>
+		      <property name="left_padding">12</property>
+		      <property name="right_padding">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox13">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">6</property>
+
+			  <child>
+			    <widget class="GtkHBox" id="hbox18">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">6</property>
+
+			      <child>
+				<widget class="GtkLabel" id="album_label">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">_Export to Album:</property>
+				  <property name="use_underline">True</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				  <property name="mnemonic_widget">album_optionmenu</property>
+				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+				  <property name="width_chars">-1</property>
+				  <property name="single_line_mode">False</property>
+				  <property name="angle">0</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkOptionMenu" id="album_optionmenu">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="history">-1</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">True</property>
+				  <property name="fill">True</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkButton" id="album_button">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label">gtk-add</property>
+				  <property name="use_stock">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <signal name="clicked" handler="HandleAddAlbum" last_modification_time="Sat, 05 Nov 2005 17:24:31 GMT"/>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="browser_check">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Open _album in browser when done uploading</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">True</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label45">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">&lt;b&gt;Album&lt;/b&gt;</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">True</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkFrame" id="frame11">
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+		  <child>
+		    <widget class="GtkAlignment" id="alignment15">
+		      <property name="visible">True</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xscale">1</property>
+		      <property name="yscale">1</property>
+		      <property name="top_padding">0</property>
+		      <property name="bottom_padding">0</property>
+		      <property name="left_padding">12</property>
+		      <property name="right_padding">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox14">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">6</property>
+
+			  <child>
+			    <widget class="GtkHBox" id="hbox58">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<widget class="GtkCheckButton" id="scale_check">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">_Resize to: </property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				  <signal name="toggled" handler="HandleSizeActive" last_modification_time="Sat, 12 Feb 2005 10:29:48 GMT"/>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkSpinButton" id="size_spin">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="climb_rate">1</property>
+				  <property name="digits">0</property>
+				  <property name="numeric">False</property>
+				  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+				  <property name="snap_to_ticks">False</property>
+				  <property name="wrap">False</property>
+				  <property name="adjustment">400 0 10000 1 10 10</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="label153">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">pixels</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+				  <property name="width_chars">-1</property>
+				  <property name="single_line_mode">False</property>
+				  <property name="angle">0</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<placeholder/>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="meta_check">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Export _titles and comments</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">True</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label46">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">&lt;b&gt;Style&lt;/b&gt;</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">True</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="google_add_album_dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes"></property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <property name="has_separator">False</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox12">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area12">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancel_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="add_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-add</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkTable" id="table10">
+	  <property name="border_width">12</property>
+	  <property name="visible">True</property>
+	  <property name="n_rows">3</property>
+	  <property name="n_columns">2</property>
+	  <property name="homogeneous">False</property>
+	  <property name="row_spacing">6</property>
+	  <property name="column_spacing">7</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="descroption_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Description:</property>
+	      <property name="use_underline">True</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="mnemonic_widget">description_entry</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkEntry" id="description_entry">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="editable">True</property>
+	      <property name="visibility">True</property>
+	      <property name="max_length">0</property>
+	      <property name="text" translatable="yes"></property>
+	      <property name="has_frame">True</property>
+	      <property name="invisible_char">*</property>
+	      <property name="activates_default">False</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="name_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Album Title:</property>
+	      <property name="use_underline">True</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="mnemonic_widget">title_entry</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkEntry" id="title_entry">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="editable">True</property>
+	      <property name="visibility">True</property>
+	      <property name="max_length">0</property>
+	      <property name="text" translatable="yes"></property>
+	      <property name="has_frame">True</property>
+	      <property name="invisible_char">*</property>
+	      <property name="activates_default">False</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="public_check">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">Public Album</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">2</property>
+	      <property name="bottom_attach">3</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="gallery_add_album_dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes"></property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <property name="has_separator">False</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox12">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area12">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancel_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="add_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-add</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkTable" id="table10">
+	  <property name="border_width">12</property>
+	  <property name="visible">True</property>
+	  <property name="n_rows">4</property>
+	  <property name="n_columns">2</property>
+	  <property name="homogeneous">False</property>
+	  <property name="row_spacing">6</property>
+	  <property name="column_spacing">7</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="gallery_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Parent Album:</property>
+	      <property name="use_underline">True</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="mnemonic_widget">album_optionmenu</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="password_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Title:</property>
+	      <property name="use_underline">True</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="mnemonic_widget">title_entry</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">3</property>
+	      <property name="bottom_attach">4</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkEntry" id="title_entry">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="editable">True</property>
+	      <property name="visibility">True</property>
+	      <property name="max_length">0</property>
+	      <property name="text" translatable="yes"></property>
+	      <property name="has_frame">True</property>
+	      <property name="invisible_char">*</property>
+	      <property name="activates_default">False</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">3</property>
+	      <property name="bottom_attach">4</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="descroption_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Description:</property>
+	      <property name="use_underline">True</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="mnemonic_widget">description_entry</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">2</property>
+	      <property name="bottom_attach">3</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkEntry" id="description_entry">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="editable">True</property>
+	      <property name="visibility">True</property>
+	      <property name="max_length">0</property>
+	      <property name="text" translatable="yes"></property>
+	      <property name="has_frame">True</property>
+	      <property name="invisible_char">*</property>
+	      <property name="activates_default">False</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">2</property>
+	      <property name="bottom_attach">3</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="name_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Album Name:</property>
+	      <property name="use_underline">True</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="mnemonic_widget">name_entry</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkEntry" id="name_entry">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="editable">True</property>
+	      <property name="visibility">True</property>
+	      <property name="max_length">0</property>
+	      <property name="text" translatable="yes"></property>
+	      <property name="has_frame">True</property>
+	      <property name="invisible_char">*</property>
+	      <property name="activates_default">False</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkOptionMenu" id="album_optionmenu">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="history">-1</property>
+	      <signal name="changed" handler="HandleChanged" last_modification_time="Sun, 06 Nov 2005 16:52:31 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="google_add_dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes"></property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <property name="has_separator">False</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox12">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area12">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancel_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="remove_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-remove</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-2</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="add_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-add</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
 	    </widget>
-	    <packing>
-	      <property name="left_attach">0</property>
-	      <property name="right_attach">1</property>
-	      <property name="top_attach">1</property>
-	      <property name="bottom_attach">2</property>
-	      <property name="x_options">fill</property>
-	      <property name="y_options"></property>
-	    </packing>
 	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox63">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
 
 	  <child>
-	    <widget class="GtkEntry" id="name_entry">
+	    <widget class="GtkHBox" id="status_area">
+	      <property name="border_width">12</property>
 	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="editable">True</property>
-	      <property name="visibility">True</property>
-	      <property name="max_length">0</property>
-	      <property name="text" translatable="yes"></property>
-	      <property name="has_frame">True</property>
-	      <property name="invisible_char">*</property>
-	      <property name="activates_default">False</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkImage" id="image12">
+		  <property name="visible">True</property>
+		  <property name="stock">gtk-dialog-question</property>
+		  <property name="icon_size">6</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">2</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox64">
+		  <property name="border_width">6</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="summary_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">&lt;span weight='bold' size='larger'&gt;Error Connecting to Gallery&lt;/span&gt;
+</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">True</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="description_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Please verify that the settings for this gallery are correct.</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 	    </widget>
 	    <packing>
-	      <property name="left_attach">1</property>
-	      <property name="right_attach">2</property>
-	      <property name="top_attach">1</property>
-	      <property name="bottom_attach">2</property>
-	      <property name="y_options"></property>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">False</property>
 	    </packing>
 	  </child>
 
 	  <child>
-	    <widget class="GtkOptionMenu" id="album_optionmenu">
+	    <widget class="GtkTable" id="table10">
+	      <property name="border_width">12</property>
 	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="history">-1</property>
-	      <signal name="changed" handler="HandleChanged" last_modification_time="Sun, 06 Nov 2005 16:52:31 GMT"/>
+	      <property name="n_rows">2</property>
+	      <property name="n_columns">2</property>
+	      <property name="homogeneous">False</property>
+	      <property name="row_spacing">6</property>
+	      <property name="column_spacing">7</property>
+
+	      <child>
+		<widget class="GtkLabel" id="password_label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">_Password:</property>
+		  <property name="use_underline">True</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">1</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="mnemonic_widget">password_entry</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkEntry" id="password_entry">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">True</property>
+		  <property name="visibility">False</property>
+		  <property name="max_length">0</property>
+		  <property name="text" translatable="yes"></property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char">*</property>
+		  <property name="activates_default">False</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="username_label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">_Username:</property>
+		  <property name="use_underline">True</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">1</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="mnemonic_widget">username_entry</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkEntry" id="username_entry">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">True</property>
+		  <property name="visibility">True</property>
+		  <property name="max_length">0</property>
+		  <property name="text" translatable="yes"></property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char">*</property>
+		  <property name="activates_default">False</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
 	    </widget>
 	    <packing>
-	      <property name="left_attach">1</property>
-	      <property name="right_attach">2</property>
-	      <property name="top_attach">0</property>
-	      <property name="bottom_attach">1</property>
-	      <property name="x_options">fill</property>
-	      <property name="y_options"></property>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
 	    </packing>
 	  </child>
 	</widget>
@@ -7225,6 +8374,15 @@ Photo Details</property>
 			  </child>
 
 			  <child>
+			    <widget class="GtkMenuItem" id="export_to_picasa1">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Export to _Picasaweb...</property>
+			      <property name="use_underline">True</property>
+			      <signal name="activate" handler="HandleExportToPicasa" last_modification_time="Fri, 28 Jul 2006 09:03:16 GMT"/>
+			    </widget>
+			  </child>
+
+			  <child>
 			    <widget class="GtkMenuItem" id="export_to_gallery">
 			      <property name="visible">True</property>
 			      <property name="label" translatable="yes">Export to _Web Gallery...</property>
@@ -7272,7 +8430,7 @@ Photo Details</property>
 		      <signal name="activate" handler="HandleSendMailCommand" last_modification_time="Mon, 07 Jun 2004 22:31:01 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image40">
+			<widget class="GtkImage" id="image44">
 			  <property name="visible">True</property>
 			  <property name="stock">gnome-stock-mail-fwd</property>
 			  <property name="icon_size">1</property>
@@ -7297,8 +8455,8 @@ Photo Details</property>
 		      <property name="label" translatable="yes">_Close</property>
 		      <property name="use_underline">True</property>
 		      <signal name="activate" handler="HandleCloseCommand" last_modification_time="Tue, 09 Dec 2003 20:59:54 GMT"/>
-		      <accelerator key="q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
 		      <accelerator key="w" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+		      <accelerator key="q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
 		    </widget>
 		  </child>
 		</widget>
@@ -7625,7 +8783,7 @@ Photo Details</property>
 			      <property name="visible">True</property>
 			      <property name="label" translatable="yes">_Month</property>
 			      <property name="use_underline">True</property>
-			      <property name="active">True</property>
+			      <property name="active">False</property>
 			      <signal name="activate" handler="HandleArrangeByTime" last_modification_time="Fri, 20 Aug 2004 22:26:32 GMT"/>
 			    </widget>
 			  </child>
@@ -7635,7 +8793,7 @@ Photo Details</property>
 			      <property name="visible">True</property>
 			      <property name="label" translatable="yes">_Folder</property>
 			      <property name="use_underline">True</property>
-			      <property name="active">False</property>
+			      <property name="active">True</property>
 			      <property name="group">month</property>
 			      <signal name="activate" handler="HandleArrangeByDirectory" last_modification_time="Fri, 20 Aug 2004 22:26:32 GMT"/>
 			    </widget>
Index: src/f-spot.in
===================================================================
RCS file: /cvs/gnome/f-spot/src/f-spot.in,v
retrieving revision 1.15
diff -u -p -r1.15 f-spot.in
--- src/f-spot.in	1 Mar 2006 07:51:19 -0000	1.15
+++ src/f-spot.in	25 Aug 2006 09:35:02 -0000
@@ -9,7 +9,7 @@ EXE_TO_RUN="$libdir/f-spot/f-spot.exe"
 case "x--uninstalled" in ("x$1" | "x$2")
 	echo "*** Running uninstalled f-spot ***"
 	EXE_TO_RUN="./f-spot.exe"
-	export MONO_PATH=../FlickrNet:../libgphoto2-sharp:../semweb:$MONO_PATH
+	export MONO_PATH=../FlickrNet:../libgphoto2-sharp:../semweb:../google-sharp:../gnome-keyring-sharp:$MONO_PATH
 esac
 
 case "x--debug" in ("x$1" | "x$2")
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ src/PicasaWebExport.cs	2006-08-25 11:34:32.000000000 +0200
@@ -0,0 +1,818 @@
+/*
+ * PicasaWebExport.cs
+ *
+ * Authors:
+ *   Stephane Delcroix <stephane@delcroix.org>
+ *
+ * Copyright (C) 2006 Stephane Delcroix
+ */
+
+using System;
+using System.Net;
+using System.IO;
+using System.Text;
+using System.Collections;
+using System.Collections.Specialized;
+using System.Web;
+using Mono.Unix;
+
+using Gnome.Keyring;
+
+using Mono.Google;
+using Mono.Google.Picasa;
+
+namespace FSpot {
+	public class GoogleAccount {
+
+		private string username;
+		private string password;
+		private bool connected;
+		private GoogleConnection connection;
+		private PicasaWeb picasa;
+
+		public GoogleAccount (string username, string password)
+		{
+			this.username = username;
+			this.password = password;
+		}
+
+		public PicasaWeb Connect ()
+		{
+			System.Console.WriteLine ("GoogleAccount.Connect()");
+			GoogleConnection conn = new GoogleConnection (GoogleService.Picasa);
+			ServicePointManager.CertificatePolicy = new NoCheckCertificatePolicy ();
+			conn.Authenticate(username, password);
+			connection = conn;
+			PicasaWeb picasa = new PicasaWeb(conn);
+			this.picasa = picasa;
+			return picasa;
+		}
+
+		private void MarkChanged()
+		{
+			connection = null;
+			connected = false;
+		}
+
+		public bool Connected {
+			get {
+				return (connection != null);
+			}
+		}
+
+		public string Username {
+			get {
+				return username;
+			}
+			set {
+				if (username != value) {
+					username = value;
+					MarkChanged ();
+				}
+			}
+		}
+
+		public string Password {
+			get {
+				return password;
+			}
+			set {
+				if (password != value) {
+					password = value;
+					MarkChanged ();
+				}
+			}
+		}
+
+		public PicasaWeb Picasa {
+			get {
+				return picasa;
+			}
+		}
+	}
+
+	
+	public class GoogleAccountManager 
+	{
+		private static GoogleAccountManager instance;
+		private const string keyring_item_name = "Google Account";
+		ArrayList accounts;
+
+		public delegate void AccountListChangedHandler (GoogleAccountManager manager, GoogleAccount changed_account);
+		public event AccountListChangedHandler AccountListChanged;
+		
+		public static GoogleAccountManager GetInstance ()
+		{
+			if (instance == null) {
+				instance = new GoogleAccountManager ();
+			}
+
+			return instance;
+		}
+
+		private GoogleAccountManager ()
+		{
+			accounts = new ArrayList ();
+			ReadAccounts ();
+		}	
+
+		public void MarkChanged ()
+		{
+			MarkChanged (true, null);
+		}
+
+		public void MarkChanged (bool write, GoogleAccount changed_account)
+		{
+			if (write)
+				WriteAccounts ();
+
+			if (AccountListChanged != null)
+				AccountListChanged (this, changed_account);
+		}
+
+		public ArrayList GetAccounts ()
+		{
+			return accounts;
+		}
+
+		public void AddAccount (GoogleAccount account)
+		{
+			AddAccount (account, true);
+		}
+
+		public void AddAccount (GoogleAccount account, bool write)
+		{
+			accounts.Add (account);
+			MarkChanged (write, account);
+		}
+
+		public void RemoveAccount (GoogleAccount account)
+		{
+			string keyring = Ring.GetDefaultKeyring();
+			Hashtable request_attributes = new Hashtable();
+			request_attributes["name"] = keyring_item_name;
+			request_attributes["username"] = account.Username;
+			try {
+				foreach(ItemData result in Ring.Find(ItemType.GenericSecret, request_attributes)) {
+					Ring.DeleteItem(keyring, result.ItemID);
+				}
+			} catch (Exception e) {
+				Console.WriteLine(e);
+			}
+			accounts.Remove (account);
+			MarkChanged ();
+		}
+
+		public void WriteAccounts ()
+		{
+			string keyring = Ring.GetDefaultKeyring();
+			foreach (GoogleAccount account in accounts) {
+				Hashtable update_request_attributes = new Hashtable();
+				update_request_attributes["name"] = keyring_item_name;
+				update_request_attributes["username"] = account.Username;
+
+				Ring.CreateItem(keyring, ItemType.GenericSecret, keyring_item_name, update_request_attributes, account.Password, true);
+			}
+		}
+
+		private void ReadAccounts ()
+		{
+
+			Hashtable request_attributes = new Hashtable();
+			request_attributes["name"] = keyring_item_name;
+			try {
+				foreach(ItemData result in Ring.Find(ItemType.GenericSecret, request_attributes)) {
+					if(!result.Attributes.ContainsKey("name") || !result.Attributes.ContainsKey("username") ||
+						(result.Attributes["name"] as string) != keyring_item_name) 
+						continue;
+					
+					string username = (string)result.Attributes["username"];
+					string password = result.Secret;
+	
+					if (username == null || username == String.Empty || password == null || password == String.Empty)
+						throw new ApplicationException ("Invalid username/password in keyring");
+	
+					GoogleAccount account = new GoogleAccount(username, password);
+					if (account != null)
+						AddAccount (account, false);
+
+				}
+			} catch (Exception e) {
+				Console.Error.WriteLine(e);
+			}
+
+			MarkChanged ();
+		}
+	}
+	
+	public class GoogleAccountDialog : GladeDialog {
+		public GoogleAccountDialog (Gtk.Window parent) : this (parent, null, false) { 
+			Dialog.Response += HandleAddResponse;
+			add_button.Sensitive = false;
+		}
+		
+		public GoogleAccountDialog (Gtk.Window parent, GoogleAccount account, bool show_error) :  base ("google_add_dialog")
+		{
+			this.Dialog.Modal = false;
+			this.Dialog.TransientFor = parent;
+			this.Dialog.DefaultResponse = Gtk.ResponseType.Ok;
+			
+			this.account = account;
+
+			status_area.Visible = show_error;
+
+			if (account != null) {
+				password_entry.Text = account.Password;
+				username_entry.Text = account.Username;
+				add_button.Label = Gtk.Stock.Ok;
+				Dialog.Response += HandleEditResponse;
+			}
+
+			if (remove_button != null)
+				remove_button.Visible = account != null;
+
+			this.Dialog.Show ();
+
+			password_entry.Changed += HandleChanged;
+			username_entry.Changed += HandleChanged;
+			HandleChanged (null, null);
+		}
+
+		private void HandleChanged (object sender, System.EventArgs args)
+		{
+			password = password_entry.Text;
+			username = username_entry.Text;
+
+			if (password == "" || username == "")
+				add_button.Sensitive = false;
+			else
+				add_button.Sensitive = true;
+
+		}
+		
+		[GLib.ConnectBefore]
+		protected void HandleAddResponse (object sender, Gtk.ResponseArgs args)
+		{
+			if (args.ResponseId == Gtk.ResponseType.Ok) {
+				GoogleAccount account = new GoogleAccount (username, password);
+				GoogleAccountManager.GetInstance ().AddAccount (account);
+			}
+			Dialog.Destroy ();
+		}
+
+		protected void HandleEditResponse (object sender, Gtk.ResponseArgs args)
+		{
+			if (args.ResponseId == Gtk.ResponseType.Ok) {
+				account.Username = username;
+				account.Password = password;
+				GoogleAccountManager.GetInstance ().MarkChanged (true, account);
+			} else if (args.ResponseId == Gtk.ResponseType.Reject) {
+				// NOTE we are using Reject to signal the remove action.
+				GoogleAccountManager.GetInstance ().RemoveAccount (account);
+			}
+			Dialog.Destroy ();				
+		}
+
+		private GoogleAccount account;
+		private string password;
+		private string username;
+
+		// widgets 
+		[Glade.Widget] Gtk.Entry password_entry;
+		[Glade.Widget] Gtk.Entry username_entry;
+
+		[Glade.Widget] Gtk.Button add_button;
+		[Glade.Widget] Gtk.Button remove_button;
+		[Glade.Widget] Gtk.Button cancel_button;
+
+		[Glade.Widget] Gtk.HBox status_area;
+	}
+
+	public class GoogleAddAlbum : GladeDialog {
+		[Glade.Widget] Gtk.OptionMenu album_optionmenu;
+
+		[Glade.Widget] Gtk.Entry title_entry;
+		[Glade.Widget] Gtk.Entry description_entry;
+		[Glade.Widget] Gtk.CheckButton public_check;
+		
+		[Glade.Widget] Gtk.Button add_button;
+		[Glade.Widget] Gtk.Button cancel_button;
+
+		private GoogleExport export;
+		private PicasaWeb picasa;
+		private string description;
+		private string title;
+		private bool public_album;
+
+		public GoogleAddAlbum (GoogleExport export, PicasaWeb picasa) : base ("google_add_album_dialog")
+		{
+			this.export = export;
+			this.picasa = picasa;	
+			PopulateAlbums ();
+			
+			Dialog.Response += HandleAddResponse;
+
+			description_entry.Changed += HandleChanged;
+			title_entry.Changed += HandleChanged;
+			HandleChanged (null, null);
+		}
+		
+		private void PopulateAlbums ()
+		{
+//			Gtk.Menu menu = new Gtk.Menu ();
+//			Gtk.MenuItem top_item = new Gtk.MenuItem (Mono.Posix.Catalog.GetString ("(TopLevel)"));
+//			menu.Append (top_item);
+//
+//			PicasaAlbumCollection albums = picasa.GetAlbums();
+//
+//			foreach (PicasaAlbum album in albums.AllValues) {
+//				System.Text.StringBuilder label_builder = new System.Text.StringBuilder ();
+//				
+//				label_builder.Append (album.Title);
+//				
+//				Gtk.MenuItem item = new Gtk.MenuItem (label_builder.ToString ());
+//				((Gtk.Label)item.Child).UseUnderline = false;
+//				menu.Append (item);
+//			}
+//
+//			album_optionmenu.Sensitive = true;
+//			menu.ShowAll ();
+//			album_optionmenu.Menu = menu;
+		}
+		
+		private void HandleChanged (object sender, EventArgs args)
+		{
+			description = description_entry.Text;
+			title = title_entry.Text;
+			public_album = public_check.Active;
+
+			if (title == "")
+				add_button.Sensitive = false;
+			else
+				add_button.Sensitive = true;
+		}
+		
+		[GLib.ConnectBefore]
+		protected void HandleAddResponse (object sender, Gtk.ResponseArgs args)
+		{
+			if (args.ResponseId == Gtk.ResponseType.Ok) {
+				public_album = public_check.Active;
+
+				if (public_album)
+					picasa.CreateAlbum (title, description, AlbumAccess.Public);
+				else	
+					picasa.CreateAlbum (title, description, AlbumAccess.Private);
+				export.HandleAlbumAdded (title);
+			}
+			Dialog.Destroy ();
+		}
+	}
+
+	
+	public class GoogleExport : GladeDialog {
+		public GoogleExport (IBrowsableCollection selection) : base ("google_export_dialog")
+		{
+			this.photos = (Photo []) selection.Items;
+			album_button.Sensitive = false;
+			IconView view = new IconView (selection);
+			view.DisplayDates = false;
+			view.DisplayTags = false;
+
+			Dialog.Modal = false;
+			Dialog.TransientFor = null;
+
+			thumb_scrolledwindow.Add (view);
+			view.Show ();
+			Dialog.Show ();
+
+
+			GoogleAccountManager manager = GoogleAccountManager.GetInstance ();
+			manager.AccountListChanged += PopulateGoogleOptionMenu;
+			PopulateGoogleOptionMenu (manager, null);
+
+			if (edit_button != null)
+				edit_button.Clicked += HandleEditGallery;
+			
+			rh = new Gtk.ResponseHandler (HandleResponse);
+			Dialog.Response += HandleResponse;
+			connect = true;
+			HandleSizeActive (null, null);
+			Connect ();
+
+			scale_check.Toggled += HandleScaleCheckToggled;
+			
+			LoadPreference (Preferences.EXPORT_PICASAWEB_SCALE);
+			LoadPreference (Preferences.EXPORT_PICASAWEB_SIZE);
+			LoadPreference (Preferences.EXPORT_PICASAWEB_ROTATE);
+			LoadPreference (Preferences.EXPORT_PICASAWEB_BROWSER);
+//			LoadPreference (Preferences.EXPORT_PICASAWEB_META);
+		}
+		
+		Gtk.ResponseHandler rh;
+		
+		private bool scale;
+		private int size;
+		private bool browser;
+		private bool rotate;
+//		private bool meta;
+		private bool connect = false;
+
+		Photo [] photos;
+		int photo_index;
+		FSpot.ThreadProgressDialog progress_dialog;
+		
+		ArrayList accounts;
+		private GoogleAccount account;
+		private PicasaAlbum album;
+
+		private string xml_path;
+
+		// Dialogs
+		private GoogleAccountDialog gallery_add;
+		private GoogleAddAlbum album_add;
+
+		// Widgets
+		[Glade.Widget] Gtk.OptionMenu gallery_optionmenu;
+		[Glade.Widget] Gtk.OptionMenu album_optionmenu;
+		
+		[Glade.Widget] Gtk.Entry width_entry;
+		[Glade.Widget] Gtk.Entry height_entry;
+
+		[Glade.Widget] Gtk.Label status_label;
+
+		[Glade.Widget] Gtk.CheckButton browser_check;
+		[Glade.Widget] Gtk.CheckButton scale_check;
+		[Glade.Widget] Gtk.CheckButton rotate_check;
+//		[Glade.Widget] Gtk.CheckButton meta_check;
+		
+		[Glade.Widget] Gtk.SpinButton size_spin;
+
+		[Glade.Widget] Gtk.Button album_button;
+		[Glade.Widget] Gtk.Button add_button;
+		[Glade.Widget] Gtk.Button edit_button;
+		
+		[Glade.Widget] Gtk.Button ok_button;
+		[Glade.Widget] Gtk.Button cancel_button;
+
+		[Glade.Widget] Gtk.ScrolledWindow thumb_scrolledwindow;
+
+		System.Threading.Thread command_thread;
+		
+
+		private void HandleResponse (object sender, Gtk.ResponseArgs args)
+		{
+			if (args.ResponseId != Gtk.ResponseType.Ok) {
+				Dialog.Destroy ();
+				return;
+			}
+
+			if (scale_check != null) {
+				scale = scale_check.Active;
+				size = size_spin.ValueAsInt;
+			} else
+				scale = false;
+
+			browser = browser_check.Active;
+			rotate = rotate_check.Active;
+//			meta = meta_check.Active;
+
+			if (account != null) { 
+				//System.Console.WriteLine ("history = {0}", album_optionmenu.History);
+				album = (PicasaAlbum) account.Picasa.GetAlbums() [Math.Max (0, album_optionmenu.History)]; 
+				photo_index = 0;
+				
+				Dialog.Destroy ();
+
+				command_thread = new System.Threading.Thread (new System.Threading.ThreadStart (this.Upload));
+				command_thread.Name = Mono.Posix.Catalog.GetString ("Uploading Pictures");
+				
+				progress_dialog = new FSpot.ThreadProgressDialog (command_thread, photos.Length);
+				progress_dialog.Start ();
+
+				// Save these settings for next time
+				Preferences.Set (Preferences.EXPORT_PICASAWEB_SCALE, scale);
+				Preferences.Set (Preferences.EXPORT_PICASAWEB_SIZE, size);
+				Preferences.Set (Preferences.EXPORT_PICASAWEB_ROTATE, rotate);
+				Preferences.Set (Preferences.EXPORT_PICASAWEB_BROWSER, browser);
+//				Preferences.Set (Preferences.EXPORT_GALLERY_META, meta);
+			}
+		}
+		
+		private void HandleProgressChanged (ProgressItem item)
+		{
+			//System.Console.WriteLine ("Changed value = {0}", item.Value);
+			progress_dialog.Fraction = (photo_index - 1.0 + item.Value) / (double) photos.Length;
+		}
+
+		public void HandleSizeActive (object sender, EventArgs args)
+		{
+			size_spin.Sensitive = scale_check.Active;
+		}
+
+		private void Upload ()
+		{
+			try {
+//				account.Gallery.Progress = new ProgressItem ();
+//				account.Gallery.Progress.Changed += HandleProgressChanged;
+
+				System.Console.WriteLine ("Starting Upload to Picasa");
+				while (photo_index < photos.Length) {
+					Photo photo = photos [photo_index];
+
+					System.Console.WriteLine ("uploading {0}", photo_index);
+
+					progress_dialog.Message = System.String.Format (Mono.Posix.Catalog.GetString ("Uploading picture \"{0}\""), photo.Name);
+					progress_dialog.Fraction = photo_index / (double) photos.Length;
+					photo_index++;
+
+					progress_dialog.ProgressText = System.String.Format (Mono.Posix.Catalog.GetString ("{0} of {1}"), photo_index, photos.Length);
+					
+					if (scale) {
+						string orig = photo.DefaultVersionUri.LocalPath;
+						string path = PixbufUtils.Resize (orig, size, true);
+						string final = path + System.IO.Path.GetExtension (orig);
+						System.IO.File.Move (path, final);
+						album.UploadPicture (final);
+						System.IO.File.Delete (final);
+					} else if (rotate){
+						string orig = photo.DefaultVersionUri.LocalPath;
+						string path = System.IO.Path.GetTempFileName();
+						Exif.ExifData exif_data = new Exif.ExifData(orig);
+						PixbufOrientation orientation = PixbufUtils.GetOrientation (exif_data);
+						if (orientation == PixbufOrientation.RightTop)
+							JpegUtils.Transform (orig, path, JpegUtils.TransformType.Rotate90);
+						else if (orientation == PixbufOrientation.LeftBottom)
+							JpegUtils.Transform (orig, path, JpegUtils.TransformType.Rotate270);
+						else
+							File.Copy(orig, path, true);
+						string final = path + System.IO.Path.GetExtension (orig);
+						System.IO.File.Move (path, final);
+						album.UploadPicture (final);
+						System.IO.File.Delete (final);
+					} else {
+						album.UploadPicture (photo.DefaultVersionUri.LocalPath);
+					}
+				}
+
+				progress_dialog.Message = Mono.Posix.Catalog.GetString ("Done Sending Photos");
+				progress_dialog.Fraction = 1.0;
+				progress_dialog.ProgressText = Mono.Posix.Catalog.GetString ("Upload Complete");
+				progress_dialog.ButtonLabel = Gtk.Stock.Ok;
+			} catch (System.Exception e) {
+				progress_dialog.Message = String.Format (Mono.Posix.Catalog.GetString ("Error Uploading To Gallery: {0}"),
+									 e.Message);
+				progress_dialog.ProgressText = Mono.Posix.Catalog.GetString ("Error");
+				System.Console.WriteLine (e);
+			}
+			
+			if (browser) {
+				GnomeUtil.UrlShow (null, album.Link);
+			}
+		}
+
+		private void HandleScaleCheckToggled (object o, EventArgs e)
+		{
+			rotate_check.Sensitive = !scale_check.Active;
+		}
+		
+		private void PopulateGoogleOptionMenu (GoogleAccountManager manager, GoogleAccount changed_account)
+		{
+			Gtk.Menu menu = new Gtk.Menu ();
+			this.account = changed_account;
+			int pos = -1;
+
+			accounts = manager.GetAccounts ();
+			if (accounts == null || accounts.Count == 0) {
+				Gtk.MenuItem item = new Gtk.MenuItem (Mono.Posix.Catalog.GetString ("(No Gallery)"));
+				menu.Append (item);
+				gallery_optionmenu.Sensitive = false;
+				edit_button.Sensitive = false;
+			} else {
+				int i = 0;
+				foreach (GoogleAccount account in accounts) {
+					if (account == changed_account)
+						pos = i;
+					
+					Gtk.MenuItem item = new Gtk.MenuItem (account.Username);
+					menu.Append (item);		
+					i++;
+				}
+				gallery_optionmenu.Sensitive = true;
+				edit_button.Sensitive = true;
+			}
+
+			menu.ShowAll ();
+			gallery_optionmenu.Menu = menu;
+			gallery_optionmenu.SetHistory ((uint)pos);
+		}
+
+		private static string ToHumanReadableSize (long in_size)
+		{
+			string tmp_str = "";
+			float tmp_size = in_size;
+			int k = 0;
+			string[] size_abr = {"bytes", "kB", "MB", "GB", "TB" };
+			
+			while (tmp_size > 700) { //it's easier to read 0.9MB than 932kB
+				tmp_size = tmp_size / 1024;
+				k++;
+			}
+			
+			if (tmp_size < 7)
+				tmp_str = tmp_size.ToString ("#.##");
+			else if (tmp_size < 70)
+				tmp_str = tmp_size.ToString ("##.#");
+			else
+				tmp_str = tmp_size.ToString ("#,###");
+			
+			if (k < size_abr.Length)
+				return tmp_str + " " + size_abr[k];
+			else
+				return in_size.ToString();
+		}
+	
+		private void Connect ()
+		{
+			Connect (null);
+		}
+
+		private void Connect (GoogleAccount selected)
+		{
+			try {
+				if (accounts.Count != 0 && connect) {
+					if (selected == null)
+						account = (GoogleAccount) accounts [gallery_optionmenu.History];
+					else
+						account = selected;
+
+					if (!account.Connected)
+						account.Connect ();
+					
+					PopulateAlbumOptionMenu (account.Picasa);
+
+					long qu = account.Picasa.QuotaUsed;
+					long ql = account.Picasa.QuotaLimit;
+
+					StringBuilder sb = new StringBuilder("<small>");
+					sb.Append(Catalog.GetString("Available space :"));
+					sb.Append(ToHumanReadableSize(ql - qu));
+					sb.Append(" ( ");
+					sb.Append(100 * qu / ql);
+					sb.Append("% used out of ");
+					sb.Append(ToHumanReadableSize(ql));
+					sb.Append(")");
+					sb.Append("</small>");
+
+					status_label.Text = sb.ToString();
+					status_label.UseMarkup = true;
+
+					album_button.Sensitive = true;
+				}
+			} catch (System.Exception ex) {
+				if (selected != null)
+					account = selected;
+
+				System.Console.WriteLine("Can not connect to Picasa. Bad username ? password ? network connection ?");
+				//System.Console.WriteLine ("{0}",ex);
+				PopulateAlbumOptionMenu (account.Picasa);
+
+				status_label.Text = "";
+				album_button.Sensitive = false;
+				
+				GoogleAccountDialog dialog = new GoogleAccountDialog (this.Dialog, account, true);
+				Gtk.ResponseType response = (Gtk.ResponseType) dialog.Dialog.Run ();
+
+				if (response == Gtk.ResponseType.Ok) {
+					Connect (account);					
+				}
+			} 
+		}
+
+		private void HandleAccountSelected (object sender, System.EventArgs args)
+		{
+			Connect ();
+		}
+
+		public void HandleAlbumAdded (string title) {
+			GoogleAccount account = (GoogleAccount) accounts [gallery_optionmenu.History];
+			PopulateAlbumOptionMenu (account.Picasa);
+				
+			// make the newly created album selected
+			PicasaAlbumCollection albums = account.Picasa.GetAlbums();
+			for (int i=0; i < albums.Count; i++) {
+				if (((PicasaAlbum)albums[i]).Title == title) {
+					album_optionmenu.SetHistory((uint)i);
+				}
+			}
+		}
+
+		private void PopulateAlbumOptionMenu (PicasaWeb picasa)
+		{
+			PicasaAlbumCollection albums = null;
+			if (picasa != null) {
+				//gallery.FetchAlbumsPrune ();
+				albums = picasa.GetAlbums();
+			}
+
+			Gtk.Menu menu = new Gtk.Menu ();
+
+			bool disconnected = picasa == null || !account.Connected || albums == null;
+
+			if (disconnected || albums.Count == 0) {
+				string msg = disconnected ? Mono.Posix.Catalog.GetString ("(Not Connected)") 
+					: Mono.Posix.Catalog.GetString ("(No Albums)");
+
+				Gtk.MenuItem item = new Gtk.MenuItem (msg);
+				menu.Append (item);
+
+				ok_button.Sensitive = false;
+				album_optionmenu.Sensitive = false;
+				album_button.Sensitive = false;
+
+				if (disconnected) 
+					album_button.Sensitive = false;
+			} else {
+				foreach (PicasaAlbum album in albums.AllValues) {
+					System.Text.StringBuilder label_builder = new System.Text.StringBuilder ();
+					
+//					for (int i=0; i < album.Parents.Count; i++) {
+//						label_builder.Append ("  ");
+//					}
+					label_builder.Append (album.Title);
+
+					Gtk.MenuItem item = new Gtk.MenuItem (label_builder.ToString ());
+					((Gtk.Label)item.Child).UseUnderline = false;
+					menu.Append (item);
+			
+				        //AlbumPermission add_permission = album.Perms & AlbumPermission.Add;
+
+//					if (add_permission == 0)
+//						item.Sensitive = false;
+				}
+
+				ok_button.Sensitive = photos.Length > 0;
+				album_optionmenu.Sensitive = true;
+				album_button.Sensitive = true;
+			}
+
+			menu.ShowAll ();
+			album_optionmenu.Menu = menu;
+		}
+		
+		public void HandleAddGallery (object sender, System.EventArgs args)
+		{
+			gallery_add = new GoogleAccountDialog (this.Dialog);
+		}
+		
+		public void HandleEditGallery (object sender, System.EventArgs args)
+		{
+			gallery_add = new GoogleAccountDialog (this.Dialog, account, false);
+		}
+
+		public void HandleAddAlbum (object sender, System.EventArgs args)
+		{
+			if (account == null)
+				throw new Exception (Catalog.GetString ("No account selected"));
+				
+			album_add = new GoogleAddAlbum (this, account.Picasa);
+		}
+
+		void LoadPreference (string key)
+		{
+			object val = Preferences.Get (key);
+
+			if (val == null)
+				return;
+			
+			//System.Console.WriteLine ("Setting {0} to {1}", key, val);
+
+			switch (key) {
+			case Preferences.EXPORT_PICASAWEB_SCALE:
+				if (scale_check.Active != (bool) val) {
+					scale_check.Active = (bool) val;
+					rotate_check.Sensitive = !(bool) val;
+				}
+				break;
+
+			case Preferences.EXPORT_PICASAWEB_SIZE:
+				size_spin.Value = (double) (int) val;
+				break;
+			
+			case Preferences.EXPORT_PICASAWEB_BROWSER:
+				if (browser_check.Active != (bool) val)
+					browser_check.Active = (bool) val;
+				break;
+			
+			case Preferences.EXPORT_PICASAWEB_ROTATE:
+				if (rotate_check.Active != (bool) val)
+					rotate_check.Active = (bool) val;
+				break;
+			
+//			case Preferences.EXPORT_GALLERY_META:
+//				if (meta_check.Active != (bool) val)
+//					meta_check.Active = (bool) val;
+//				break;
+			}
+		}
+	}
+}
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ google-sharp/AlbumAccess.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,36 @@
+//
+// Mono.Google.Picasa.AlbumAccess.cs:
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Mono.Google.Picasa {
+	public enum AlbumAccess {
+		Public,
+		Private
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ google-sharp/Authentication.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,126 @@
+//
+// Mono.Google.Authentication.cs:
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Security.Cryptography.X509Certificates;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Xml;
+
+namespace Mono.Google {
+	class Authentication {
+		static string picasa_login_url ="https://www.google.com/accounts/ServiceLoginAuth?service=lh2&passive=true&continue=http://picasaweb.google.com/";
+		CookieContainer cookies = new CookieContainer ();
+
+		private Authentication ()
+		{
+		}
+
+		public static CookieContainer GetAuthCookies (string user, string password, GoogleService service)
+		{
+			// No auth performed if no useror no password
+			if (user == null || password == null)
+				return new CookieContainer ();
+
+			// service == Picasa by now
+			Authentication auth = new Authentication ();
+			return auth.GetCookieContainer (user, password);
+		}
+
+		CookieContainer GetCookieContainer (string user, string password)
+		{
+			StringBuilder content = new StringBuilder ();
+			content.AppendFormat ("null=Sign%20in&Email={0}&Passwd={1}&", user, password);
+			content.Append ("service=lh2&passive=true&continue=http%3A%2F%2Fpicasaweb.google.com%2F");
+			byte [] bytes = Encoding.UTF8.GetBytes (content.ToString ());
+
+			HttpWebRequest request = (HttpWebRequest) WebRequest.Create (picasa_login_url);
+			request.CookieContainer = cookies;
+			request.Method = "POST";
+			request.ContentType = "application/x-www-form-urlencoded";
+			request.ContentLength = bytes.Length;
+
+			Stream output = request.GetRequestStream ();
+			output.Write (bytes, 0, bytes.Length);
+			output.Close ();
+
+			HttpWebResponse response = (HttpWebResponse) request.GetResponse ();
+			string received = "";
+			using (Stream stream = response.GetResponseStream ()) {
+				StreamReader sr = new StreamReader (stream, Encoding.UTF8);
+				received = sr.ReadToEnd ();
+			}
+			response.Close ();
+
+			Regex regex = new Regex ("location\\.replace\\(\"(?<location>.*)\"\\)");
+			Match match = regex.Match (received);
+			if (!match.Success)
+				return null;
+
+			string redirect = match.Result ("${location}");
+			cookies = RemoveExpiredCookies (cookies);
+			request = (HttpWebRequest) WebRequest.Create (redirect);
+			request.CookieContainer = cookies;
+			response = (HttpWebResponse) request.GetResponse ();
+			using (Stream stream = response.GetResponseStream ()) {
+				StreamReader sr = new StreamReader (stream, Encoding.UTF8);
+				received = sr.ReadToEnd (); // ignored. Just for the cookies.
+			}
+			response.Close ();
+			return cookies;
+		}
+
+		static CookieContainer RemoveExpiredCookies (CookieContainer all)
+		{
+			CookieContainer container = new CookieContainer ();
+			Uri secure = new Uri ("https://www.google.com/accounts/");
+			CookieCollection c1 = all.GetCookies (secure);
+			foreach (Cookie cookie in c1) {
+				if (cookie.Expired)
+					continue;
+				container.Add (secure, cookie);
+			}
+
+			Uri pweb = new Uri ("http://picasaweb.google.com/");
+			CookieCollection c2 = all.GetCookies (pweb);
+			foreach (Cookie cookie in c2) {
+				if (cookie.Expired)
+					continue;
+				container.Add (pweb, cookie);
+			}
+			
+			return container;
+		}
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ google-sharp/CreateAlbumException.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,44 @@
+//
+// Mono.Google.Picasa.CreateAlbumException.cs:
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Runtime.Serialization;
+namespace Mono.Google.Picasa {
+	public class CreateAlbumException : Exception {
+		public CreateAlbumException (string msg) : base (msg)
+		{
+		}
+
+		protected CreateAlbumException (SerializationInfo info, StreamingContext context)
+			: base (info, context)
+		{
+		}
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ google-sharp/DeleteAlbumException.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,44 @@
+//
+// Mono.Google.Picasa.DeleteAlbumException.cs:
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Runtime.Serialization;
+namespace Mono.Google.Picasa {
+	public class DeleteAlbumException : Exception {
+		public DeleteAlbumException (string msg) : base (msg)
+		{
+		}
+
+		protected DeleteAlbumException (SerializationInfo info, StreamingContext context)
+			: base (info, context)
+		{
+		}
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ google-sharp/GoogleConnection.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,157 @@
+//
+// Mono.Google.GoogleConnection.cs:
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.IO;
+using System.Net;
+using System.Text;
+
+namespace Mono.Google {
+	public class GoogleConnection {
+		CookieContainer cookies;
+		string user;
+		GoogleService service;
+
+		public GoogleConnection (GoogleService service)
+		{
+			if (service != GoogleService.Picasa)
+				throw new ArgumentException ("Unsupported service.", "service");
+
+			this.service = service;
+		}
+
+		public void Authenticate (string user, string password)
+		{
+			if (user == null)
+				throw new ArgumentNullException ("user");
+
+			if (this.user != null)
+				throw new InvalidOperationException (String.Format ("Already authenticated for {0}", this.user));
+
+			this.user = user;
+			this.cookies = Authentication.GetAuthCookies (user, password, service);
+			if (this.cookies == null) {
+				this.user = null;
+				throw new Exception (String.Format ("Authentication failed for user {0}", user));
+			}
+		}
+
+		public string DownloadString (string url)
+		{
+			if (url == null)
+				throw new ArgumentNullException ("url");
+
+			string received = null;
+			HttpWebRequest req = (HttpWebRequest) WebRequest.Create (url);
+			req.CookieContainer = cookies;
+			HttpWebResponse response = (HttpWebResponse) req.GetResponse ();
+			Encoding encoding = Encoding.UTF8;
+			if (response.ContentEncoding != "") {
+				try {
+					encoding = Encoding.GetEncoding (response.ContentEncoding);
+				} catch {}
+			}
+
+			using (Stream stream = response.GetResponseStream ()) {
+				StreamReader sr = new StreamReader (stream, encoding);
+				received = sr.ReadToEnd ();
+			}
+			response.Close ();
+			return received;
+		}
+
+		public byte [] DownloadBytes (string url)
+		{
+			if (url == null)
+				throw new ArgumentNullException ("url");
+
+			HttpWebRequest req = (HttpWebRequest) WebRequest.Create (url);
+			req.CookieContainer = cookies;
+			HttpWebResponse response = (HttpWebResponse) req.GetResponse ();
+			byte [] bytes = null;
+			using (Stream stream = response.GetResponseStream ()) {
+				if (response.ContentLength != -1) {
+					bytes = new byte [response.ContentLength];
+					stream.Read (bytes, 0, bytes.Length);
+				} else {
+					MemoryStream ms = new MemoryStream ();
+					bytes = new byte [4096];
+					int nread;
+					while ((nread = stream.Read (bytes, 0, bytes.Length)) > 0) {
+						ms.Write (bytes, 0, nread);
+						if (nread < bytes.Length)
+							break;
+					}
+					bytes = ms.ToArray ();
+				}
+			}
+			response.Close ();
+
+			return bytes;
+		}
+
+		public void DownloadToStream (string url, Stream output)
+		{
+			if (url == null)
+				throw new ArgumentNullException ("url");
+
+			if (output == null)
+				throw new ArgumentNullException ("output");
+
+			if (!output.CanWrite)
+				throw new ArgumentException ("The stream is not writeable", "output");
+
+			HttpWebRequest req = (HttpWebRequest) WebRequest.Create (url);
+			req.CookieContainer = cookies;
+			HttpWebResponse response = (HttpWebResponse) req.GetResponse ();
+			byte [] bytes = null;
+			using (Stream stream = response.GetResponseStream ()) {
+				bytes = new byte [4096];
+				int nread;
+				while ((nread = stream.Read (bytes, 0, bytes.Length)) > 0) {
+					output.Write (bytes, 0, nread);
+				}
+			}
+			response.Close ();
+		}
+
+		public string User {
+			get { return user; }
+		}
+
+		public GoogleService Service {
+			get { return service; }
+		}
+
+		internal CookieContainer Cookies {
+			get { return cookies; }
+		}
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ google-sharp/GoogleService.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,37 @@
+//
+// Mono.Google.GoogleService.cs:
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+namespace Mono.Google {
+	[Flags]
+	public enum GoogleService {
+		Picasa = 1
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ google-sharp/Makefile.am	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,36 @@
+CSC = mcs
+
+LIBGOOGLESHARP_CSFILES =				\
+	$(srcdir)/AlbumAccess.cs  \
+	$(srcdir)/Authentication.cs  \
+	$(srcdir)/CreateAlbumException.cs  \
+	$(srcdir)/DeleteAlbumException.cs  \
+	$(srcdir)/GoogleConnection.cs  \
+	$(srcdir)/GoogleService.cs  \
+	$(srcdir)/MultipartRequest.cs  \
+	$(srcdir)/NoCheckCertificatePolicy.cs  \
+	$(srcdir)/PicasaAlbum.cs  \
+	$(srcdir)/PicasaAlbumCollection.cs  \
+	$(srcdir)/PicasaPicture.cs  \
+	$(srcdir)/PicasaPictureCollection.cs  \
+	$(srcdir)/PicasaV1.cs  \
+	$(srcdir)/PicasaWeb.cs  \
+	$(srcdir)/UploadPictureException.cs  
+
+libgooglesharplibdir = $(libdir)/f-spot
+libgooglesharplib_DATA =		\
+	google-sharp.dll
+
+
+google-sharp.dll: $(LIBGOOGLESHARP_CSFILES)
+	$(CSC) -out:$@ /target:library $(LIBGOOGLESHARP_CSFILES)
+
+all: google-sharp.dll
+
+EXTRA_DIST =							\
+	$(LIBGOOGLESHARP_CSFILES)	
+
+
+CLEANFILES =							\
+	google-sharp.dll
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ google-sharp/Makefile.in	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,459 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = google-sharp
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libgooglesharplibdir)"
+libgooglesharplibDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(libgooglesharplib_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXIF_SOVERSION = @EXIF_SOVERSION@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+F_CFLAGS = @F_CFLAGS@
+F_LIBS = @F_LIBS@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@
+GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GNOME_ICON_THEME_PREFIX = @GNOME_ICON_THEME_PREFIX@
+GNOME_SCREENSAVER_SAVERDIR = @GNOME_SCREENSAVER_SAVERDIR@
+GNOME_SCREENSAVER_THEMESDIR = @GNOME_SCREENSAVER_THEMESDIR@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+ICONS_DIRECTORY = @ICONS_DIRECTORY@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_ICONV = @INTLTOOL_ICONV@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@
+INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
+LCMS_CFLAGS = @LCMS_CFLAGS@
+LCMS_LIBS = @LCMS_LIBS@
+LDFLAGS = @LDFLAGS@
+LIBEXIF_API_CHECK_CFLAGS = @LIBEXIF_API_CHECK_CFLAGS@
+LIBEXIF_API_CHECK_LIBS = @LIBEXIF_API_CHECK_LIBS@
+LIBEXIF_VERSION_CHECK_CFLAGS = @LIBEXIF_VERSION_CHECK_CFLAGS@
+LIBEXIF_VERSION_CHECK_LIBS = @LIBEXIF_VERSION_CHECK_LIBS@
+LIBGPHOTO2_CFLAGS = @LIBGPHOTO2_CFLAGS@
+LIBGPHOTO2_LIBS = @LIBGPHOTO2_LIBS@
+LIBJPEG = @LIBJPEG@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MCS = @MCS@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MONO = @MONO@
+MSGFMT = @MSGFMT@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SQLITE_CFLAGS = @SQLITE_CFLAGS@
+SQLITE_LIBS = @SQLITE_LIBS@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WARN_CFLAGS = @WARN_CFLAGS@
+XGETTEXT = @XGETTEXT@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+expanded_libdir = @expanded_libdir@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+CSC = mcs
+LIBGOOGLESHARP_CSFILES = \
+	$(srcdir)/AlbumAccess.cs  \
+	$(srcdir)/Authentication.cs  \
+	$(srcdir)/CreateAlbumException.cs  \
+	$(srcdir)/DeleteAlbumException.cs  \
+	$(srcdir)/GoogleConnection.cs  \
+	$(srcdir)/GoogleService.cs  \
+	$(srcdir)/MultipartRequest.cs  \
+	$(srcdir)/NoCheckCertificatePolicy.cs  \
+	$(srcdir)/PicasaAlbum.cs  \
+	$(srcdir)/PicasaAlbumCollection.cs  \
+	$(srcdir)/PicasaPicture.cs  \
+	$(srcdir)/PicasaPictureCollection.cs  \
+	$(srcdir)/PicasaV1.cs  \
+	$(srcdir)/PicasaWeb.cs  \
+	$(srcdir)/UploadPictureException.cs  
+
+libgooglesharplibdir = $(libdir)/f-spot
+libgooglesharplib_DATA = \
+	google-sharp.dll
+
+EXTRA_DIST = \
+	$(LIBGOOGLESHARP_CSFILES)	
+
+CLEANFILES = \
+	google-sharp.dll
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  google-sharp/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  google-sharp/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-libgooglesharplibDATA: $(libgooglesharplib_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(libgooglesharplibdir)" || $(mkdir_p) "$(DESTDIR)$(libgooglesharplibdir)"
+	@list='$(libgooglesharplib_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(libgooglesharplibDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(libgooglesharplibdir)/$$f'"; \
+	  $(libgooglesharplibDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(libgooglesharplibdir)/$$f"; \
+	done
+
+uninstall-libgooglesharplibDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(libgooglesharplib_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(libgooglesharplibdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(libgooglesharplibdir)/$$f"; \
+	done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	$(mkdir_p) $(distdir)/$(srcdir)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(libgooglesharplibdir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-libgooglesharplibDATA
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-libgooglesharplibDATA
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-exec install-exec-am \
+	install-info install-info-am install-libgooglesharplibDATA \
+	install-man install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+	ps ps-am uninstall uninstall-am uninstall-info-am \
+	uninstall-libgooglesharplibDATA
+
+
+google-sharp.dll: $(LIBGOOGLESHARP_CSFILES)
+	$(CSC) -out:$@ /target:library $(LIBGOOGLESHARP_CSFILES)
+
+all: google-sharp.dll
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ google-sharp/MultipartRequest.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,149 @@
+//
+// Mono.Google.MultipartRequest
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml;
+
+namespace Mono.Google {
+	class MultipartRequest {
+		static byte [] crlf = new byte [] { 13, 10 };
+		HttpWebRequest request;
+		Stream req_stream;
+		byte [] bound_bytes;
+		byte [] bound_end_bytes;
+
+		public MultipartRequest (string url)
+		{
+			string hash = (((long) url.GetHashCode () << 32) + GetHashCode ()).ToString ("X");
+			string bound_str1 = "---------------------" + hash;
+			string bound_head = "--" + bound_str1 + "\r\n";
+			string bound_end = "--" + bound_str1 + "--\r\n";
+			bound_bytes = Encoding.ASCII.GetBytes (bound_head);
+			bound_end_bytes = Encoding.ASCII.GetBytes (bound_end);
+			request = (HttpWebRequest) WebRequest.Create (url);
+			request.Method = "POST";
+			request.ContentType = "multipart/form-data; boundary=" + bound_str1;
+		}
+
+		public HttpWebRequest Request {
+			get { return request; }
+		}
+
+		public void BeginPart ()
+		{
+			if (req_stream == null)
+				req_stream = request.GetRequestStream ();
+
+			req_stream.Write (bound_bytes, 0, bound_bytes.Length);
+		}
+
+		public void AddHeader (string name, string val)
+		{
+			AddHeader (name, val, false);
+		}
+
+		public void AddHeader (string name, string val, bool last)
+		{
+			AddHeader (String.Format ("{0}: {1}"), last);
+		}
+
+		public void AddHeader (string header)
+		{
+			AddHeader (header, false);
+		}
+
+		public void AddHeader (string header, bool last)
+		{
+			bool need_crlf = !header.EndsWith ("\r\n");
+			byte [] bytes = Encoding.UTF8.GetBytes (header);
+			req_stream.Write (bytes, 0, bytes.Length);
+			if (need_crlf)
+				req_stream.Write (crlf, 0, 2);
+			if (last)
+				req_stream.Write (crlf, 0, 2);
+		}
+
+		public void WriteContent (string content)
+		{
+			WriteContent (Encoding.UTF8.GetBytes (content));
+		}
+
+		public void WriteContent (byte [] content)
+		{
+			req_stream.Write (content, 0, content.Length);
+			req_stream.Write (crlf, 0, crlf.Length);
+		}
+
+		public void WritePartialContent (byte [] content, int offset, int nbytes)
+		{
+			req_stream.Write (content, offset, nbytes);
+		}
+
+		public void EndPartialContent ()
+		{
+			req_stream.Write (crlf, 0, crlf.Length);
+		}
+
+		public void EndPart (bool last)
+		{
+			if (last) {
+				req_stream.Write (bound_end_bytes, 0, bound_end_bytes.Length);
+				req_stream.Close ();
+			} else {
+				req_stream.Write (bound_bytes, 0, bound_bytes.Length);
+			}
+		}
+
+		public string GetResponseAsString ()
+		{
+			HttpWebResponse response = null;
+			try {
+				response = (HttpWebResponse) request.GetResponse ();
+			} catch (WebException wexc) {
+				response = (HttpWebResponse) wexc.Response;
+				if (response == null)
+					throw;
+			}
+
+			string received = "";
+			using (Stream stream = response.GetResponseStream ()) {
+				StreamReader sr = new StreamReader (stream, Encoding.UTF8);
+				received = sr.ReadToEnd ();
+			}
+			response.Close ();
+			return received;
+		}
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ google-sharp/NoCheckCertificatePolicy.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,41 @@
+//
+// Mono.Google.NoCheckCertificatePolicy
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System.Net;
+using System.Security.Cryptography.X509Certificates;
+
+namespace Mono.Google {
+	public class NoCheckCertificatePolicy : ICertificatePolicy {
+		public bool CheckValidationResult (ServicePoint a, X509Certificate b, WebRequest c, int d)
+		{
+			return true;
+		}
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ google-sharp/PicasaAlbumCollection.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,92 @@
+//
+// Mono.Google.Picasa.PicasaAlbumCollection
+//
+// Author:
+//	Gonzalo Paniagua Javier (gonzalo@novell.com)
+//
+
+//
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Specialized;
+
+namespace Mono.Google.Picasa {
+	public sealed class PicasaAlbumCollection : NameObjectCollectionBase {
+		internal PicasaAlbumCollection ()
+		{
+		}
+
+		internal void Add (PicasaAlbum album)
+		{
+			if (BaseGet (album.UniqueID) != null)
+				throw new Exception ("Duplicate album?");
+
+			BaseAdd (album.UniqueID, album);
+		}
+
+		internal void SetReadOnly ()
+		{
+			IsReadOnly = true;
+		}
+
+		public PicasaAlbum GetByTitle (string title)
+		{
+			if (title == null)
+				throw new ArgumentNullException ("id");
+
+			int count = Count;
+			for (int i = 0; i < count; i++) {
+				if (this [i].Title == title)
+					return this [i];
+			}
+
+			return null;
+		}
+
+		public PicasaAlbum this [int index] {
+			get { return (PicasaAlbum) BaseGet (index); }
+		}
+
+		public PicasaAlbum this [string uniqueID] {
+			get { return (PicasaAlbum) BaseGet (uniqueID); }
+		}
+
+		public string [] AllKeys {
+			get {
+				NameObjectCollectionBase.KeysCollection keys = Keys;
+				int count = keys.Count;
+				string [] result = new string [count];
+				for (int i = 0; i < count; i++)
+					result [i] = keys [i];
+				
+				return result;
+			}
+		}
+
+		public PicasaAlbum [] AllValues {
+			get { return (PicasaAlbum []) BaseGetAllValues (typeof (PicasaAlbum)); }
+		}
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ google-sharp/PicasaAlbum.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,228 @@
+//
+// Mono.Google.Picasa.PicasaAlbum.cs:
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml;
+
+namespace Mono.Google.Picasa {
+	public class PicasaAlbum {
+		GoogleConnection conn;
+		PicasaWeb picasa_web;
+		string title;
+		string description;
+		string id;
+		string rsslink;
+		string link;
+		AlbumAccess access = AlbumAccess.Public;
+		int num_photos = -1;
+		int num_photos_remaining = -1;
+
+		internal PicasaAlbum (PicasaWeb pw)
+		{
+			this.conn = pw.Connection;
+			this.picasa_web = pw;
+		}
+
+		internal static PicasaAlbum ParseAlbumInfo (PicasaWeb pw, XmlNode nodeitem, XmlNamespaceManager nsmgr)
+		{
+			PicasaAlbum album = new PicasaAlbum (pw);
+			album.title = nodeitem.SelectSingleNode ("title").InnerText;
+			album.description = nodeitem.SelectSingleNode ("description").InnerText;
+			album.link = nodeitem.SelectSingleNode ("link").InnerText;
+			XmlNode node = nodeitem.SelectSingleNode ("gphoto:id", nsmgr);
+			if (node != null)
+				album.id = node.InnerText;
+			node = nodeitem.SelectSingleNode ("gphoto:access", nsmgr);
+			if (node != null) {
+				string acc = node.InnerText;
+				album.access = (acc == "public") ? AlbumAccess.Public : AlbumAccess.Private;
+			}
+			node = nodeitem.SelectSingleNode ("gphoto:rsslink", nsmgr);
+			if (node != null) 
+				album.rsslink = node.InnerText;
+
+			node = nodeitem.SelectSingleNode ("gphoto:numphotos", nsmgr);
+			if (node != null)
+				album.num_photos = (int) UInt32.Parse (node.InnerText);
+
+			node = nodeitem.SelectSingleNode ("gphoto:numphotosremaining", nsmgr);
+			if (node != null)
+				album.num_photos_remaining = (int) UInt32.Parse (node.InnerText);
+			return album;
+		}
+
+		public PicasaPictureCollection GetPictures ()
+		{
+			string received = conn.DownloadString (rsslink);
+			XmlDocument doc = new XmlDocument ();
+			doc.LoadXml (received);
+			XmlNamespaceManager nsmgr = new XmlNamespaceManager (doc.NameTable);
+			nsmgr.AddNamespace ("photo", "http://www.pheed.com/pheed/");
+			nsmgr.AddNamespace ("media", "http://search.yahoo.com/mrss/");
+			nsmgr.AddNamespace ("gphoto", "http://picasaweb.google.com/lh/picasaweb/");
+			
+			XmlNode channel = doc.SelectSingleNode ("/rss/channel");
+			PicasaPictureCollection coll = new PicasaPictureCollection ();
+			foreach (XmlNode item in channel.SelectNodes ("item")) {
+				coll.Add (PicasaPicture.ParsePictureInfo (conn, this, item, nsmgr));
+			}
+			coll.SetReadOnly ();
+			return coll;
+		}
+
+		static string op_upload = 
+			"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n" +
+			"<rss version=\"2.0\" xmlns:gphoto=\"http://www.temp.com/\">\n" +
+			" <channel>\n" +
+			"  <gphoto:user>{0}</gphoto:user>\n" +
+			"  <gphoto:id>{1}</gphoto:id>\n" +
+			"  <gphoto:op>createAndAppendPhotoToAlbum</gphoto:op>\n" +
+			"  <item>\n" +
+			"   <title>{2}</title>\n" +
+			"   <description/>\n" +
+			"   <gphoto:multipart>{3}</gphoto:multipart>\n" +
+			"   <gphoto:layout>0.000000</gphoto:layout>\n" +
+			//"   <gphoto:checksum>17077b37</gphoto:checksum>\n" +
+			"   <gphoto:client>picasa</gphoto:client>\n" +
+			"  </item>\n" +
+			" </channel>\n" +
+			"</rss>";
+
+		static string disp_pic = "Content-Disposition: form-data; name=\"{0}\"; filename=\"{1}\"\r\n";
+
+		public string UploadPicture (string title, Stream input)
+		{
+			if (title == null)
+				throw new ArgumentNullException ("title");
+
+			if (input == null)
+				throw new ArgumentNullException ("input");
+
+			if (!input.CanRead)
+				throw new ArgumentException ("Cannot read from stream", "input");
+
+			string url = API.GetPostURL ();
+			MultipartRequest request = new MultipartRequest (url);
+			request.Request.CookieContainer = conn.Cookies;
+			request.BeginPart ();
+			request.AddHeader ("Content-Disposition: form-data; name=\"xml\"\r\n");
+			request.AddHeader ("Content-Type: text/plain; charset=utf8\r\n", true);
+			string upload = String.Format (op_upload, Connection.User, UniqueID, title, title.GetHashCode ().ToString ());
+			request.WriteContent (upload);
+			request.EndPart (false);
+			request.BeginPart ();
+			request.AddHeader (String.Format (disp_pic, title.GetHashCode ().ToString (), title));
+			request.AddHeader ("Content-Type: application/octet-stream\r\n", true);
+
+			byte [] data = new byte [8192];
+			int nread;
+			while ((nread = input.Read (data, 0, data.Length)) > 0) {
+				request.WritePartialContent (data, 0, nread);
+			}
+			request.EndPartialContent ();
+			request.EndPart (true);
+
+			string received = request.GetResponseAsString ();
+			XmlDocument doc = new XmlDocument ();
+			doc.LoadXml (received);
+			XmlNode node = doc.SelectSingleNode ("/response/result");
+			if (node == null)
+				throw new UploadPictureException ("Invalid response from server");
+
+			if (node.InnerText != "success") {
+				node = doc.SelectSingleNode ("/response/reason");
+				if (node == null)
+					throw new UploadPictureException ("Unknown reason");
+					
+				throw new UploadPictureException (node.InnerText);
+			}
+			return doc.SelectSingleNode ("/response/id").InnerText;
+		}
+
+		public void UploadPicture (string filename)
+		{
+			if (filename == null)
+				throw new ArgumentNullException ("filename");
+
+			string title = Path.GetFileName (filename);
+			using (Stream stream = File.OpenRead (filename)) {
+				UploadPicture (title, stream);
+			}
+		}
+
+		public string Title {
+			get { return title; }
+		}
+
+		public string Description {
+			get { return description; }
+		}
+
+		public string Link {
+			get { return link; }
+		}
+
+		public string UniqueID {
+			get { return id; }
+		}
+
+		public string RssLink {
+			get { return rsslink; }
+		}
+
+		public AlbumAccess Access {
+			get { return access; }
+		}
+
+		public int PicturesCount {
+			get { return num_photos; }
+		}
+
+		public int PicturesRemaining {
+			get { return num_photos_remaining; }
+		}
+
+		public string User {
+			get { return picasa_web.User; }
+		}
+
+		internal PicasaV1 API {
+			get { return picasa_web.API; }
+		}
+
+		internal GoogleConnection Connection {
+			get { return conn; }
+		}
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ google-sharp/PicasaPictureCollection.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,94 @@
+//
+// Mono.Google.Picasa.PicasaPictureCollection
+//
+// Author:
+//	Gonzalo Paniagua Javier (gonzalo@novell.com)
+//
+
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections;
+using System.Collections.Specialized;
+
+namespace Mono.Google.Picasa {
+	public sealed class PicasaPictureCollection : NameObjectCollectionBase {
+		internal PicasaPictureCollection ()
+		{
+		}
+
+		internal void Add (PicasaPicture picture)
+		{
+			if (BaseGet (picture.UniqueID) != null)
+				throw new Exception ("Duplicate picture?");
+
+			BaseAdd (picture.UniqueID, picture);
+		}
+
+		internal void SetReadOnly ()
+		{
+			IsReadOnly = true;
+		}
+
+		public PicasaPicture GetByTitle (string title)
+		{
+			if (title == null)
+				throw new ArgumentNullException ("id");
+
+			int count = Count;
+			for (int i = 0; i < count; i++) {
+				if (this [i].Title == title)
+					return this [i];
+			}
+
+			return null;
+		}
+
+		public PicasaPicture this [int index] {
+			get { return (PicasaPicture) BaseGet (index); }
+		}
+
+		public PicasaPicture this [string uniqueID] {
+			get { return (PicasaPicture) BaseGet (uniqueID); }
+		}
+
+		public string [] AllKeys {
+			get {
+				NameObjectCollectionBase.KeysCollection keys = Keys;
+				int count = keys.Count;
+				string [] result = new string [count];
+				for (int i = 0; i < count; i++)
+					result [i] = keys [i];
+				
+				return result;
+			}
+		}
+
+		public PicasaPicture [] AllValues {
+			get { return (PicasaPicture []) BaseGetAllValues (typeof (PicasaPicture)); }
+		}
+
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ google-sharp/PicasaPicture.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,122 @@
+//
+// Mono.Google.Picasa.PicasaPicture.cs:
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml;
+
+namespace Mono.Google.Picasa {
+	public class PicasaPicture {
+		GoogleConnection conn;
+		PicasaAlbum album;
+		string title;
+		string description;
+		DateTime pub_date;
+		string thumbnail_url;
+		string image_url;
+		int width;
+		int height;
+		int index;
+		string id;
+
+		internal PicasaPicture (GoogleConnection conn, PicasaAlbum album)
+		{
+			this.conn = conn;
+			this.album = album;
+		}
+
+		internal static PicasaPicture ParsePictureInfo (GoogleConnection conn, PicasaAlbum album, XmlNode nodeitem, XmlNamespaceManager nsmgr)
+		{
+			PicasaPicture picture = new PicasaPicture (conn, album);
+			picture.title = nodeitem.SelectSingleNode ("title").InnerText;
+			picture.description = nodeitem.SelectSingleNode ("description").InnerText;
+			picture.pub_date = DateTime.ParseExact (nodeitem.SelectSingleNode ("pubDate").InnerText, "d' 'MMM' 'yyyy' 'HH':'mm':'ss' 'zzz", null);
+			picture.thumbnail_url = nodeitem.SelectSingleNode ("photo:thumbnail", nsmgr).InnerText;
+			picture.image_url = nodeitem.SelectSingleNode ("photo:imgsrc", nsmgr).InnerText;
+			picture.width = (int) UInt32.Parse (nodeitem.SelectSingleNode ("gphoto:width", nsmgr).InnerText);
+			picture.height = (int) UInt32.Parse (nodeitem.SelectSingleNode ("gphoto:height", nsmgr).InnerText);
+			picture.index = (int) UInt32.Parse (nodeitem.SelectSingleNode ("gphoto:index", nsmgr).InnerText);
+			picture.id = nodeitem.SelectSingleNode ("gphoto:id", nsmgr).InnerText;
+			return picture;
+		}
+
+		public void DownloadToStream (Stream stream)
+		{
+			conn.DownloadToStream (image_url, stream);
+		}
+
+		public void DownloadThumbnailToStream (Stream stream)
+		{
+			conn.DownloadToStream (thumbnail_url, stream);
+		}
+
+		public PicasaAlbum Album {
+			get { return album; }
+		}
+
+		public string Title {
+			get { return title; }
+		}
+
+		public string Description {
+			get { return description; }
+		}
+
+		public DateTime Date {
+			get { return pub_date; }
+		}
+
+		public string ThumbnailURL {
+			get { return thumbnail_url; }
+		}
+
+		public string ImageURL {
+			get { return image_url; }
+		}
+
+		public int Width {
+			get { return width; }
+		}
+
+		public int Height {
+			get { return height; }
+		}
+
+		public int Index {
+			get { return index; }
+		}
+
+		public string UniqueID {
+			get { return id; }
+		}
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ google-sharp/PicasaV1.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,76 @@
+//
+// Mono.Google.Picasa.PicasaV1.cs:
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Xml;
+namespace Mono.Google.Picasa {
+	class PicasaV1 {
+		static string url = "http://picasaweb.google.com/api/urls?version=1";
+
+		//string photo_page;
+		//string album_page;
+		string gallery;
+		//string gallery_page;
+		string post;
+
+		internal PicasaV1 (GoogleConnection conn)
+		{
+			string received = conn.DownloadString (url);
+			// photoPage, albumPage, post, gallery and galleryPage
+			XmlDocument doc = new XmlDocument ();
+			doc.LoadXml (received);
+			foreach (XmlNode node in doc.SelectNodes ("/rss/channel/item")) {
+				XmlNode title_node = node.SelectSingleNode ("title");
+				XmlNode link_node = node.SelectSingleNode ("link");
+				string title = title_node.InnerText;
+				switch (title) {
+				case "gallery":
+					gallery = link_node.InnerText;
+					break;
+				case "post":
+					post = link_node.InnerText;
+					break;
+				default:
+					break;
+				}
+			}
+		}
+
+		public string GetGalleryLink (string user)
+		{
+			return gallery.Replace ("{username}", user); // URLEncode user name?
+		}
+
+		public string GetPostURL ()
+		{
+			return post;
+		}
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ google-sharp/PicasaWeb.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,259 @@
+//
+// Mono.Google.Picasa.PicasaWeb.cs:
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml;
+
+namespace Mono.Google.Picasa {
+	public class PicasaWeb {
+		GoogleConnection conn;
+		PicasaV1 api;
+		string title;
+		string link;
+		string user;
+		string nickname;
+		long quota_used;
+		long quota_limit;
+
+		public PicasaWeb (GoogleConnection conn)
+		{
+			if (conn == null)
+				throw new ArgumentNullException ("conn");
+
+			if (conn.User == null)
+				throw new ArgumentException ("Need authentication before being used.", "conn");
+
+			this.conn = conn;
+			api = new PicasaV1 (conn);
+		}
+
+		public string Title {
+			get { return title; }
+		}
+
+		public string Link {
+			get { return link; }
+		}
+
+		public string User {
+			get { return user; }
+		}
+
+		public string NickName {
+			get { return nickname; }
+		}
+
+		public long QuotaUsed {
+			get { return quota_used; }
+		}
+
+		public long QuotaLimit {
+			get { return quota_limit; }
+		}
+
+		internal PicasaV1 API {
+			get { return api; }
+		}
+
+		internal GoogleConnection Connection {
+			get { return conn; }
+		}
+
+		public string CreateAlbum (string title)
+		{
+			return CreateAlbum (title, null);
+		}
+
+		public string CreateAlbum (string title, AlbumAccess access)
+		{
+			return CreateAlbum (title, null, access, DateTime.Now);
+		}
+
+		public string CreateAlbum (string title, string description)
+		{
+			return CreateAlbum (title, description, AlbumAccess.Public);
+		}
+
+		public string CreateAlbum (string title, string description, AlbumAccess access)
+		{
+			return CreateAlbum (title, description, access, DateTime.Now);
+		}
+
+		public string CreateAlbum (string title, string description, AlbumAccess access, DateTime pubDate)
+		{
+			if (title == null)
+				throw new ArgumentNullException ("title");
+
+			if (description == null)
+				description = "";
+
+			if (access != AlbumAccess.Public && access != AlbumAccess.Private)
+				throw new ArgumentException ("Invalid value.", "access");
+
+			// Check if pubDate can be in the past
+			string url = api.GetPostURL ();
+			string op_string = GetXmlForCreate (title, description, pubDate, access, conn.User);
+			byte [] op_bytes = Encoding.UTF8.GetBytes (op_string);
+			MultipartRequest request = new MultipartRequest (url);
+			request.Request.CookieContainer = conn.Cookies;
+			request.BeginPart ();
+			request.AddHeader ("Content-Disposition: form-data; name=\"xml\"\r\n");
+			request.AddHeader ("Content-Type: text/plain; charset=utf8\r\n", true);
+			request.WriteContent (op_bytes);
+			request.EndPart (true);
+			string received = request.GetResponseAsString ();
+
+			XmlDocument doc = new XmlDocument ();
+			doc.LoadXml (received);
+			XmlNode node = doc.SelectSingleNode ("/response/result");
+			if (node == null)
+				throw new CreateAlbumException ("Invalid response from server");
+
+			if (node.InnerText != "success") {
+				node = doc.SelectSingleNode ("/response/reason");
+				if (node == null)
+					throw new CreateAlbumException ("Unknown reason");
+					
+				throw new CreateAlbumException (node.InnerText);
+			}
+			return doc.SelectSingleNode ("/response/id").InnerText;
+		}
+
+		static string create_album_op =
+				"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n" +
+				"<rss version=\"2.0\" xmlns:gphoto=\"http://www.temp.com/\">\n" +
+				" <channel>\n" +
+				"  <title>{0}</title>\n" +
+				"  <description/>\n" +
+				"  <pubDate>{1:d' 'MMM' 'yyyy' 'HH':'mm':'ss' 'zzz}</pubDate>\n" +
+				"  <gphoto:access>{2}</gphoto:access>\n" +
+				"  <gphoto:user>{3}</gphoto:user>\n" +
+				"  <gphoto:location/>\n" +
+				"  <gphoto:op>createAlbum</gphoto:op>\n" +
+				" </channel>\n" +
+				"</rss>";
+
+		static string GetXmlForCreate (string title, string desc, DateTime date, AlbumAccess access, string username)
+		{
+			string acc = access.ToString ().ToLower (CultureInfo.InvariantCulture);
+			string result = String.Format (create_album_op, title, date, acc, username).Replace (":00", "00");
+			if (desc != null && (desc = desc.Trim ()) != "")
+				result = result.Replace ("  <description/>", String.Format ("  <description>{0}</description>", desc));
+			return result;
+		}
+
+		static string delete_album_op =
+				"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n" +
+				"<rss version=\"2.0\" xmlns:gphoto=\"http://www.temp.com/\">\n" +
+				"  <channel>\n" +
+				"    <gphoto:user>{0}</gphoto:user>\n" +
+				"    <gphoto:id>{1}</gphoto:id>\n" +
+				"    <gphoto:op>deleteAlbum</gphoto:op>\n" +
+				"  </channel>\n" +
+				"</rss>";
+
+		public void DeleteAlbum (PicasaAlbum album)
+		{
+			if (album == null)
+				throw new ArgumentNullException ("album");
+
+			DeleteAlbum (album.UniqueID);
+		}
+
+		public void DeleteAlbum (string unique_id)
+		{
+			if (unique_id == null)
+				throw new ArgumentNullException ("unique_id");
+
+			string url = api.GetPostURL ();
+			string op_string = String.Format (delete_album_op, conn.User, unique_id);
+			byte [] op_bytes = Encoding.UTF8.GetBytes (op_string);
+			MultipartRequest request = new MultipartRequest (url);
+			request.Request.CookieContainer = conn.Cookies;
+			request.BeginPart ();
+			request.AddHeader ("Content-Disposition: form-data; name=\"xml\"\r\n");
+			request.AddHeader ("Content-Type: text/plain; charset=utf8\r\n", true);
+			request.WriteContent (op_bytes);
+			request.EndPart (true);
+			string received = request.GetResponseAsString ();
+
+			XmlDocument doc = new XmlDocument ();
+			doc.LoadXml (received);
+			XmlNode node = doc.SelectSingleNode ("/response/result");
+			if (node == null)
+				throw new DeleteAlbumException ("Invalid response from server");
+
+			if (node.InnerText != "success") {
+				node = doc.SelectSingleNode ("/response/reason");
+				if (node == null)
+					throw new DeleteAlbumException ("Unknown reason");
+					
+				throw new DeleteAlbumException (node.InnerText);
+			}
+		}
+
+		public PicasaAlbumCollection GetAlbums ()
+		{
+			string gallery_link = api.GetGalleryLink (conn.User);
+			string received = conn.DownloadString (gallery_link);
+
+			XmlDocument doc = new XmlDocument ();
+			doc.LoadXml (received);
+			XmlNode channel = doc.SelectSingleNode ("/rss/channel");
+			XmlNode node = channel.SelectSingleNode ("title");
+			title = node.InnerText;
+			node = channel.SelectSingleNode ("link");
+			link = node.InnerText;
+			XmlNamespaceManager nsmgr = new XmlNamespaceManager (doc.NameTable);
+			nsmgr.AddNamespace ("photo", "http://www.pheed.com/pheed/");
+			nsmgr.AddNamespace ("media", "http://search.yahoo.com/mrss/");
+			nsmgr.AddNamespace ("gphoto", "http://picasaweb.google.com/lh/picasaweb/");
+			node = channel.SelectSingleNode ("gphoto:user", nsmgr);
+			user = node.InnerText;
+			node = channel.SelectSingleNode ("gphoto:nickname", nsmgr);
+			nickname = node.InnerText;
+			node = channel.SelectSingleNode ("gphoto:quotacurrent", nsmgr);
+			quota_used = (node != null) ? (long) UInt64.Parse (node.InnerText) : -1;
+			node = channel.SelectSingleNode ("gphoto:quotalimit", nsmgr);
+			quota_limit = (node != null) ? (long) UInt64.Parse (node.InnerText) : -1;
+			PicasaAlbumCollection coll = new PicasaAlbumCollection ();
+			foreach (XmlNode item in channel.SelectNodes ("item")) {
+				coll.Add (PicasaAlbum.ParseAlbumInfo (this, item, nsmgr));
+			}
+			coll.SetReadOnly ();
+			return coll;
+		}
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ google-sharp/UploadPictureException.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,44 @@
+//
+// Mono.Google.Picasa.UploadPictureException.cs:
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Runtime.Serialization;
+namespace Mono.Google.Picasa {
+	public class UploadPictureException : Exception {
+		public UploadPictureException (string msg) : base (msg)
+		{
+		}
+
+		protected UploadPictureException (SerializationInfo info, StreamingContext context)
+			: base (info, context)
+		{
+		}
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ gnome-keyring-sharp/AccessRights.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,39 @@
+//
+// Gnome.Keyring.AccessRights.cs
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+namespace Gnome.Keyring {
+	[Flags]
+	public enum AccessRights {
+		Read = 1,
+		Write = 1 << 1,
+		Remove = 1 << 2
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ gnome-keyring-sharp/AttributeType.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,36 @@
+//
+// Gnome.Keyring.AttributeType.cs
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Gnome.Keyring {
+	enum AttributeType {
+		String,
+		UInt32
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ gnome-keyring-sharp/GenericItemData.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,50 @@
+//
+// Gnome.Keyring.GenericItemData.cs
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System.Collections;
+
+namespace Gnome.Keyring {
+	public class GenericItemData : ItemData {
+		public string Name;
+
+		public override ItemType Type {
+			get { return ItemType.GenericSecret; }
+		}
+
+		internal override void SetValuesFromAttributes ()
+		{
+			Hashtable tbl = Attributes;
+			if (tbl == null)
+				return;
+
+			Name = (string) tbl ["name"];
+		}
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ gnome-keyring-sharp/ItemACL.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,63 @@
+//
+// Gnome.Keyring.ItemACL.cs
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Gnome.Keyring {
+	public class ItemACL {
+		string display_name;
+		string path;
+		AccessRights access;
+
+		public ItemACL (string displayName, string path, AccessRights access)
+		{
+			this.display_name = displayName;
+			this.path = path;
+			this.access = (AccessRights) access;
+		}
+
+		public override string ToString ()
+		{
+			return String.Format ("Name: {0} Path: {1} Access: {2}", display_name, path, access);
+		}
+
+		public string DisplayName {
+			get { return display_name; }
+		}
+
+		public string FullPath {
+			get { return path; }
+		}
+
+		public AccessRights Access {
+			get { return access; }
+		}
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ gnome-keyring-sharp/ItemData.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,70 @@
+//
+// Gnome.Keyring.ItemData.cs
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections;
+using System.Text;
+
+namespace Gnome.Keyring {
+	public abstract class ItemData {
+		public string Keyring;
+		public int ItemID;
+		public string Secret;
+		public Hashtable Attributes;
+
+		public abstract ItemType Type { get; }
+
+		public override string ToString ()
+		{
+			StringBuilder sb = new StringBuilder ();
+			foreach (string key in Attributes.Keys)
+				sb.AppendFormat ("{0}: {1}\n", key, Attributes [key]);
+			return String.Format ("Keyring: {0} ItemID: {1} Secret: {2}\n{3}", Keyring, ItemID, Secret, sb.ToString ());
+		}
+
+		internal virtual void SetValuesFromAttributes ()
+		{
+		}
+
+		internal static ItemData GetInstanceFromItemType (ItemType type)
+		{
+			if (type == ItemType.GenericSecret)
+				return new GenericItemData ();
+
+			if (type == ItemType.NetworkPassword)
+				return new NetItemData ();
+
+			if (type == ItemType.Note)
+				return new NoteItemData ();
+
+			throw new ArgumentException ("Unknown type: " + type, "type");
+		}
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ gnome-keyring-sharp/ItemType.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,37 @@
+//
+// Gnome.Keyring.ItemType.cs
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Gnome.Keyring {
+	public enum ItemType {
+		GenericSecret,
+		NetworkPassword,
+		Note
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ gnome-keyring-sharp/KeyringException.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,89 @@
+//
+// Gnome.Keyring.KeyringException.cs
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Runtime.Serialization;
+
+namespace Gnome.Keyring {
+	public class KeyringException : Exception, ISerializable {
+		ResultCode code;
+
+		public KeyringException () : base ("Unknown error")
+		{
+		}
+
+		internal KeyringException (ResultCode code) : base (GetMsg (code))
+		{
+			this.code = code;
+		}
+
+		protected KeyringException (SerializationInfo info, StreamingContext context)
+			: base (info, context)
+		{
+			code = (ResultCode) info.GetInt32 ("code");
+		}
+
+		void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context)
+		{
+			base.GetObjectData (info, context);
+			info.AddValue ("code", (int) code, typeof (int));
+		}
+
+		public ResultCode ResultCode {
+			get { return code; }
+		}
+
+		static string GetMsg (ResultCode code)
+		{
+			switch (code) {
+			case ResultCode.Ok:
+				return "Success";
+			case ResultCode.Denied:
+				return "Access denied";
+			case ResultCode.NoKeyringDaemon:
+				return "The keyring daemon is not available";
+			case ResultCode.AlreadyUnlocked:
+				return "Keyring was already unlocked";
+			case ResultCode.NoSuchKeyring:
+				return "No such keyring";
+			case ResultCode.BadArguments:
+				return "Bad arguments";
+			case ResultCode.IOError:
+				return "I/O error";
+			case ResultCode.Cancelled:
+				return "Operation canceled";
+			case ResultCode.AlreadyExists:
+				return "Item already exists";
+			default:
+				return "Unknown error";
+			}
+		}
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ gnome-keyring-sharp/KeyringInfo.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,106 @@
+//
+// Gnome.Keyring.KeyringInfo.cs
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+namespace Gnome.Keyring {
+	public class KeyringInfo {
+		int lock_timeout;
+		DateTime mtime;
+		DateTime ctime;
+		bool lock_on_idle;
+		bool locked;
+		string name;
+
+		internal KeyringInfo (string name, bool lock_on_idle, int lock_timeout, DateTime mtime, DateTime ctime, bool locked)
+		{
+			this.name = name;
+			this.lock_timeout = lock_timeout;
+			this.mtime = mtime;
+			this.ctime = ctime;
+			this.lock_on_idle = lock_on_idle;
+			this.locked = locked;
+		}
+
+		public KeyringInfo ()
+		{
+		}
+
+		public KeyringInfo (bool lockOnIdle) : this (lockOnIdle, 0)
+		{
+		}
+
+		public KeyringInfo (bool lockOnIdle, int lockTimeout)
+		{
+			this.lock_on_idle = lockOnIdle;
+			LockTimeoutSeconds = lockTimeout;
+		}
+
+		public override string ToString ()
+		{
+			return String.Format ("Keyring name: {0}\n" +
+						"Locked: {2}\n" +
+						"LockOnIdle: {1}\n" +
+						"Lock timeout: {3}\n" +
+						"Creation time: {4}\n" +
+						"Modification time: {5}",
+						name, lock_on_idle, locked, lock_timeout, ctime, mtime);
+		}
+
+		public string Name {
+			get { return name; }
+		}
+
+		public bool LockOnIdle {
+			get { return lock_on_idle; }
+			set { lock_on_idle = value; }
+		}
+
+		public int LockTimeoutSeconds {
+			get { return lock_timeout; }
+			set {
+				if (value < 0)
+					throw new ArgumentOutOfRangeException ("value");
+				lock_timeout = value;
+			}
+		}
+
+		public DateTime ModificationTime {
+			get { return mtime; }
+		}
+
+		public DateTime CreationTime {
+			get { return ctime; }
+		}
+
+		public bool Locked {
+			get { return locked; }
+		}
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ gnome-keyring-sharp/Makefile.am	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,39 @@
+CSC = mcs
+
+LIBGNOMEKEYRING_CSFILES =				\
+	$(srcdir)/AccessRights.cs  \
+	$(srcdir)/AttributeType.cs  \
+	$(srcdir)/GenericItemData.cs  \
+	$(srcdir)/ItemACL.cs  \
+	$(srcdir)/ItemData.cs  \
+	$(srcdir)/ItemType.cs  \
+	$(srcdir)/KeyringException.cs  \
+	$(srcdir)/KeyringInfo.cs  \
+	$(srcdir)/NetItemData.cs  \
+	$(srcdir)/NoteItemData.cs  \
+	$(srcdir)/Operation.cs  \
+	$(srcdir)/RequestMessage.cs  \
+	$(srcdir)/ResponseMessage.cs  \
+	$(srcdir)/ResultCode.cs  \
+	$(srcdir)/Ring.cs  
+
+ASSEMBLIES =					\
+	-r:Mono.Posix	
+
+libgnomekeyringsharplibdir = $(libdir)/f-spot
+libgnomekeyringsharplib_DATA =		\
+	gnome-keyring-sharp.dll
+
+
+gnome-keyring-sharp.dll: $(LIBGNOMEKEYRING_CSFILES)
+	$(CSC) -out:$@ /target:library $(ASSEMBLIES) $(LIBGNOMEKEYRING_CSFILES)
+
+all: gnome-keyring-sharp.dll
+
+EXTRA_DIST =							\
+	$(LIBGNOMEKEYRING_CSFILES)	\
+	License.txt
+
+CLEANFILES =							\
+	gnome-keyring-sharp.dll
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ gnome-keyring-sharp/Makefile.in	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,463 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = gnome-keyring-sharp
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libgnomekeyringsharplibdir)"
+libgnomekeyringsharplibDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(libgnomekeyringsharplib_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXIF_SOVERSION = @EXIF_SOVERSION@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+F_CFLAGS = @F_CFLAGS@
+F_LIBS = @F_LIBS@
+GCONFTOOL = @GCONFTOOL@
+GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@
+GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@
+GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GNOME_ICON_THEME_PREFIX = @GNOME_ICON_THEME_PREFIX@
+GNOME_SCREENSAVER_SAVERDIR = @GNOME_SCREENSAVER_SAVERDIR@
+GNOME_SCREENSAVER_THEMESDIR = @GNOME_SCREENSAVER_THEMESDIR@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+ICONS_DIRECTORY = @ICONS_DIRECTORY@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_ICONV = @INTLTOOL_ICONV@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@
+INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
+LCMS_CFLAGS = @LCMS_CFLAGS@
+LCMS_LIBS = @LCMS_LIBS@
+LDFLAGS = @LDFLAGS@
+LIBEXIF_API_CHECK_CFLAGS = @LIBEXIF_API_CHECK_CFLAGS@
+LIBEXIF_API_CHECK_LIBS = @LIBEXIF_API_CHECK_LIBS@
+LIBEXIF_VERSION_CHECK_CFLAGS = @LIBEXIF_VERSION_CHECK_CFLAGS@
+LIBEXIF_VERSION_CHECK_LIBS = @LIBEXIF_VERSION_CHECK_LIBS@
+LIBGPHOTO2_CFLAGS = @LIBGPHOTO2_CFLAGS@
+LIBGPHOTO2_LIBS = @LIBGPHOTO2_LIBS@
+LIBJPEG = @LIBJPEG@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MCS = @MCS@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MONO = @MONO@
+MSGFMT = @MSGFMT@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SQLITE_CFLAGS = @SQLITE_CFLAGS@
+SQLITE_LIBS = @SQLITE_LIBS@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WARN_CFLAGS = @WARN_CFLAGS@
+XGETTEXT = @XGETTEXT@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+expanded_libdir = @expanded_libdir@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+CSC = mcs
+LIBGNOMEKEYRING_CSFILES = \
+	$(srcdir)/AccessRights.cs  \
+	$(srcdir)/AttributeType.cs  \
+	$(srcdir)/GenericItemData.cs  \
+	$(srcdir)/ItemACL.cs  \
+	$(srcdir)/ItemData.cs  \
+	$(srcdir)/ItemType.cs  \
+	$(srcdir)/KeyringException.cs  \
+	$(srcdir)/KeyringInfo.cs  \
+	$(srcdir)/NetItemData.cs  \
+	$(srcdir)/NoteItemData.cs  \
+	$(srcdir)/Operation.cs  \
+	$(srcdir)/RequestMessage.cs  \
+	$(srcdir)/ResponseMessage.cs  \
+	$(srcdir)/ResultCode.cs  \
+	$(srcdir)/Ring.cs  
+
+ASSEMBLIES = \
+	-r:Mono.Posix	
+
+libgnomekeyringsharplibdir = $(libdir)/f-spot
+libgnomekeyringsharplib_DATA = \
+	gnome-keyring-sharp.dll
+
+EXTRA_DIST = \
+	$(LIBGNOMEKEYRING_CSFILES)	\
+	License.txt
+
+CLEANFILES = \
+	gnome-keyring-sharp.dll
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  gnome-keyring-sharp/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  gnome-keyring-sharp/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-libgnomekeyringsharplibDATA: $(libgnomekeyringsharplib_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(libgnomekeyringsharplibdir)" || $(mkdir_p) "$(DESTDIR)$(libgnomekeyringsharplibdir)"
+	@list='$(libgnomekeyringsharplib_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(libgnomekeyringsharplibDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(libgnomekeyringsharplibdir)/$$f'"; \
+	  $(libgnomekeyringsharplibDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(libgnomekeyringsharplibdir)/$$f"; \
+	done
+
+uninstall-libgnomekeyringsharplibDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(libgnomekeyringsharplib_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(libgnomekeyringsharplibdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(libgnomekeyringsharplibdir)/$$f"; \
+	done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	$(mkdir_p) $(distdir)/$(srcdir)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(libgnomekeyringsharplibdir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-libgnomekeyringsharplibDATA
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-libgnomekeyringsharplibDATA
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-exec install-exec-am \
+	install-info install-info-am \
+	install-libgnomekeyringsharplibDATA install-man install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
+	uninstall-info-am uninstall-libgnomekeyringsharplibDATA
+
+
+gnome-keyring-sharp.dll: $(LIBGNOMEKEYRING_CSFILES)
+	$(CSC) -out:$@ /target:library $(ASSEMBLIES) $(LIBGNOMEKEYRING_CSFILES)
+
+all: gnome-keyring-sharp.dll
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ gnome-keyring-sharp/NetItemData.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,65 @@
+//
+// Gnome.Keyring.NetItemData.cs
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System.Collections;
+
+namespace Gnome.Keyring {
+	public class NetItemData : ItemData {
+		public string User;
+		public string Domain;
+		public string Server;
+		public string Obj;
+		public string Protocol;
+		public string AuthType;
+		public int Port;
+
+		public override ItemType Type {
+			get { return ItemType.NetworkPassword; }
+		}
+
+		internal override void SetValuesFromAttributes ()
+		{
+			Hashtable tbl = Attributes;
+			if (tbl == null)
+				return;
+
+			User = (string) tbl ["user"];
+			Domain = (string) tbl ["domain"];
+			Server = (string) tbl ["server"];
+			Obj = (string) tbl ["object"];
+			Protocol = (string) tbl ["protocol"];
+			AuthType = (string) tbl ["authtype"];
+			if (tbl ["port"] != null)
+				Port = (int) tbl ["port"];
+
+			base.SetValuesFromAttributes ();
+		}
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ gnome-keyring-sharp/NoteItemData.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,39 @@
+//
+// Gnome.Keyring.NoteItemData.cs
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System.Collections;
+
+namespace Gnome.Keyring {
+	public class NoteItemData : ItemData {
+		public override ItemType Type {
+			get { return ItemType.Note; }
+		}
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ gnome-keyring-sharp/Operation.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,54 @@
+//
+// Gnome.Keyring.Operation.cs
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Gnome.Keyring {
+	enum Operation {
+		LockAll,
+		SetDefaultKeyring,
+		GetDefaultKeyring,
+		ListKeyrings,
+		CreateKeyring,
+		LockKeyring,
+		UnlockKeyring,
+		DeleteKeyring,
+		GetKeyringInfo,
+		SetKeyringInfo,
+		ListItems,
+		Find,
+		CreateItem,
+		DeleteItem,
+		GetItemInfo,
+		SetItemInfo,
+		GetItemAttributes,
+		SetItemAttributes,
+		GetItemACL,
+		SetItemACL
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ gnome-keyring-sharp/RequestMessage.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,173 @@
+//
+// Gnome.Keyring.RequestMessage.cs
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections;
+using System.IO;
+using System.Text;
+
+namespace Gnome.Keyring {
+	class RequestMessage {
+		MemoryStream stream = new MemoryStream ();
+		int op_start = -1;
+
+		public MemoryStream Stream {
+			get { return stream; }
+		}
+
+		public void CreateSimpleOperation (Operation op)
+		{
+			StartOperation (op);
+			EndOperation ();
+		}
+
+		public void CreateSimpleOperation (Operation op, string str1)
+		{
+			StartOperation (op);
+			Write (str1);
+			EndOperation ();
+		}
+
+		public void CreateSimpleOperation (Operation op, string str1, string str2)
+		{
+			StartOperation (op);
+			Write (str1);
+			Write (str2);
+			EndOperation ();
+		}
+
+		public void CreateSimpleOperation (Operation op, string str1, int i1)
+		{
+			StartOperation (op);
+			Write (str1);
+			Write (i1);
+			EndOperation ();
+		}
+
+		public void StartOperation (Operation op)
+		{
+			string appname = Ring.ApplicationName;
+			BinaryWriter writer = new BinaryWriter (stream);
+			writer.Write (0);
+
+			Write (appname);
+			int curpos = (int) stream.Position;
+			stream.Position = 0;
+			writer = new BinaryWriter (stream);
+			writer.Write (SwapBytes (curpos));
+			stream.Position = curpos;
+
+			op_start = (int) stream.Length;
+			writer.Write (0);
+			writer.Write (SwapBytes ((int) op));
+		}
+
+		public void EndOperation ()
+		{
+			int current = (int) stream.Length;
+			int size = SwapBytes (current - op_start);
+			stream.Position = op_start;
+			BinaryWriter writer = new BinaryWriter (stream);
+			writer.Write (size);
+		}
+
+		public void Write (string str)
+		{
+			WriteString (new BinaryWriter (stream), str);
+		}
+
+		static void WriteString (BinaryWriter writer, string str)
+		{
+			if (str == null) {
+				writer.Write ((int) -1);
+				return;
+			}
+			byte [] bytes = Encoding.UTF8.GetBytes (str);
+			writer.Write (SwapBytes (bytes.Length));
+			writer.Write (bytes);
+		}
+
+		public void Write (int i)
+		{
+			BinaryWriter writer = new BinaryWriter (stream);
+			writer.Write (SwapBytes (i));
+		}
+
+		public void WriteAttributes (Hashtable atts)
+		{
+			Hashtable copy = new Hashtable ();
+			foreach (string key in atts.Keys) {
+				object o = atts [key];
+				if (o != null)
+					copy [key] = o;
+				
+			}
+			BinaryWriter writer = new BinaryWriter (stream);
+			writer.Write (SwapBytes (copy.Count));
+			foreach (string key in copy.Keys) {
+				object o = atts [key];
+				if (o is string) {
+					EncodeAttribute (writer, key, (string) o);
+				} else if (o is int) {
+					int i = (int) o;
+					if (key == "port" && i == 0)
+						continue;
+					EncodeAttribute (writer, key, i);
+				} else {
+					throw new Exception ("Should not happen.");
+				}
+			}
+		}
+
+		static void EncodeAttribute (BinaryWriter writer, string name, string val)
+		{
+			WriteString (writer, name);
+			writer.Write (SwapBytes ((int) AttributeType.String));
+			WriteString (writer, val);
+		}
+
+		static void EncodeAttribute (BinaryWriter writer, string name, int val)
+		{
+			WriteString (writer, name);
+			writer.Write (SwapBytes ((int) AttributeType.UInt32));
+			writer.Write (SwapBytes (val));
+		}
+
+		static int SwapBytes (int i)
+		{
+			byte b0 = (byte) ((i >> 24) & 0xFF);
+			byte b1 = (byte) ((i >> 16) & 0xFF);
+			byte b2 = (byte) ((i >> 8) & 0xFF);
+			byte b3 = (byte) (i & 0xFF);
+			return b0 + (b1 << 8) + (b2 << 16) + (b3 << 24);
+		}
+
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ gnome-keyring-sharp/ResponseMessage.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,108 @@
+//
+// Gnome.Keyring.ResponseMessage.cs
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections;
+using System.IO;
+using System.Text;
+
+using Mono.Unix.Native;
+
+namespace Gnome.Keyring {
+	class ResponseMessage {
+		byte [] buffer;
+		MemoryStream stream;
+
+		public ResponseMessage (byte [] buffer)
+		{
+			this.buffer = buffer;
+			stream = new MemoryStream (buffer);
+		}
+
+		public bool DataAvailable {
+			get { return (stream.Position < stream.Length); }
+		}
+
+		public string [] GetStringList ()
+		{
+			int nstrings = GetInt32 ();
+			string [] list = new string [nstrings];
+			for (int i = 0; i < nstrings; i++) {
+				list [i] = GetString ();
+			}
+
+			return list;
+		}
+
+		public string GetString ()
+		{
+			int len = GetInt32 ();
+			if (len == -1) {
+				return null;
+			}
+			int offset = (int) stream.Position;
+			string result =  Encoding.UTF8.GetString (buffer, offset, len);
+			stream.Position += len;
+			return result;
+		}
+
+		public int GetInt32 ()
+		{
+			byte b3 = (byte) stream.ReadByte ();
+			byte b2 = (byte) stream.ReadByte ();
+			byte b1 = (byte) stream.ReadByte ();
+			byte b0 = (byte) stream.ReadByte ();
+			return (b0 + (b1 << 8) + (b2 << 16) + (b3 << 24));
+		}
+
+		public DateTime GetDateTime ()
+		{
+			return NativeConvert.FromTimeT ((GetInt32 () << 32) + GetInt32 ());
+		}
+
+		public void ReadAttributes (Hashtable tbl)
+		{
+			int natts = GetInt32 ();
+			for (int i = 0; i < natts; i++) {
+				object val;
+				string name = GetString ();
+				AttributeType type = (AttributeType) GetInt32 ();
+				if (AttributeType.String == type) {
+					val = GetString ();
+				} else if (type == AttributeType.UInt32) {
+					val = GetInt32 ();
+				} else {
+					throw new Exception ("This should not happen: "  + type);
+				}
+				tbl [name] = val;
+			}
+		}
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ gnome-keyring-sharp/ResultCode.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,43 @@
+//
+// Gnome.Keyring.ResultCode.cs
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Gnome.Keyring {
+	public enum ResultCode {
+		Ok,
+		Denied,
+		NoKeyringDaemon,
+		AlreadyUnlocked,
+		NoSuchKeyring,
+		BadArguments,
+		IOError,
+		Cancelled,
+		AlreadyExists
+	}
+}
+
--- /dev/null	2006-08-25 09:02:38.892169250 +0200
+++ gnome-keyring-sharp/Ring.cs	2006-08-25 11:16:04.000000000 +0200
@@ -0,0 +1,504 @@
+//
+// Gnome.Keyring.Ring.cs
+//
+// Authors:
+//	Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Copyright 2006 Novell, Inc. (http://www.novell.com)
+//
+
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections;
+using System.IO;
+using System.Net;
+using System.Net.Sockets;
+using System.Reflection;
+
+using Mono.Unix;
+
+namespace Gnome.Keyring {
+	public class Ring {
+		static string appname;
+
+		private Ring ()
+		{
+		}
+
+		public static string ApplicationName {
+			get {
+				if (appname == null) {
+					Assembly assembly = Assembly.GetEntryAssembly ();
+					if (assembly == null)
+						throw new Exception ("You need to set Ring.ApplicationName.");
+					appname = assembly.GetName ().Name;
+				}
+
+				return appname;
+			}
+
+			set {
+				if (value == null || value == "")
+					throw new ArgumentException ("Cannot be null or empty", "value");
+
+				appname = value;
+			}
+		}
+
+		public static bool Available {
+			get {
+				Socket sock = Connect ();
+				if (sock != null) {
+					sock.Close ();
+					return true;
+				}
+				return false;
+			}
+		}
+
+		static Socket Connect ()
+		{
+			string filename = Environment.GetEnvironmentVariable ("GNOME_KEYRING_SOCKET");
+			if (filename == null || filename == "")
+				return null;
+
+			EndPoint ep = new UnixEndPoint (filename);
+			Socket sock = new Socket (AddressFamily.Unix, SocketType.Stream, ProtocolType.IP);
+			try {
+				sock.Connect (ep);
+			} catch (Exception) {
+				sock.Close ();
+				return null;
+			}
+			return sock;
+		}
+
+		static int GetInt32 (Socket sock)
+		{
+			byte [] cuatro = new byte [4];
+			if (sock.Receive (cuatro) != 4)
+				throw new KeyringException (ResultCode.IOError);
+			return (cuatro [3] + (cuatro [2] << 8) + (cuatro [1] << 16) + (cuatro [0] << 24));
+		}
+
+		static byte [] one = new byte [1];
+		static ResponseMessage SendRequest (MemoryStream stream)
+		{
+			Socket sock = Connect ();
+			if (sock == null)
+				throw new KeyringException (ResultCode.NoKeyringDaemon);
+
+			try {
+				sock.Send (one); // Credentials byte
+				byte [] buffer = stream.ToArray ();
+				sock.Send (buffer);
+				int packet_size = GetInt32 (sock) - 4;
+				if (packet_size < 0)
+					throw new KeyringException (ResultCode.IOError);
+				byte [] response = new byte [packet_size];
+				int nbytes = sock.Receive (response);
+				if (nbytes != response.Length)
+					throw new KeyringException (ResultCode.IOError);
+				ResponseMessage resp = new ResponseMessage (response);
+				ResultCode result = (ResultCode) resp.GetInt32 ();
+				if (result != 0)
+					throw new KeyringException (result);
+
+				return resp;
+			} finally {
+				sock.Close ();
+			}
+		}
+
+		public static void LockAll ()
+		{
+			RequestMessage req = new RequestMessage ();
+			req.CreateSimpleOperation (Operation.LockAll);
+			SendRequest (req.Stream);
+		}
+
+		public static void SetDefaultKeyring (string newKeyring)
+		{
+			if (newKeyring == null)
+				throw new ArgumentNullException ("newKeyring");
+			RequestMessage req = new RequestMessage ();
+			req.CreateSimpleOperation (Operation.SetDefaultKeyring, newKeyring);
+			SendRequest (req.Stream);
+		}
+
+		public static string GetDefaultKeyring ()
+		{
+			RequestMessage req = new RequestMessage ();
+			req.CreateSimpleOperation (Operation.GetDefaultKeyring);
+			ResponseMessage resp = SendRequest (req.Stream);
+			return resp.GetString ();
+		}
+
+		public static string [] GetKeyrings ()
+		{
+			RequestMessage req = new RequestMessage ();
+			req.CreateSimpleOperation (Operation.ListKeyrings);
+			ResponseMessage resp = SendRequest (req.Stream);
+			return resp.GetStringList ();
+		}
+
+		public static void CreateKeyring (string name, string password)
+		{
+			RequestMessage req = new RequestMessage ();
+			req.CreateSimpleOperation (Operation.CreateKeyring, name, password);
+			SendRequest (req.Stream);
+		}
+
+		public static void Lock (string keyring)
+		{
+			if (keyring == null)
+				throw new ArgumentNullException ("keyring");
+
+			RequestMessage req = new RequestMessage ();
+			req.CreateSimpleOperation (Operation.LockKeyring, keyring);
+			SendRequest (req.Stream);
+		}
+
+		public static void Unlock (string keyring, string password)
+		{
+			if (keyring == null)
+				throw new ArgumentNullException ("keyring");
+
+			if (password == null)
+				throw new ArgumentNullException ("password");
+
+			RequestMessage req = new RequestMessage ();
+			req.CreateSimpleOperation (Operation.UnlockKeyring, keyring, password);
+			try {
+				SendRequest (req.Stream);
+			} catch (KeyringException ke) {
+				if (ke.ResultCode != ResultCode.AlreadyUnlocked)
+					throw;
+			}
+		}
+
+		public static void DeleteKeyring (string keyring)
+		{
+			if (keyring == null)
+				throw new ArgumentNullException ("keyring");
+
+			RequestMessage req = new RequestMessage ();
+			req.CreateSimpleOperation (Operation.DeleteKeyring, keyring);
+			SendRequest (req.Stream);
+		}
+
+		public static int [] ListItemIDs (string keyring)
+		{
+			if (keyring == null)
+				throw new ArgumentNullException ("keyring");
+
+			RequestMessage req = new RequestMessage ();
+			req.CreateSimpleOperation (Operation.ListItems, keyring);
+			ResponseMessage resp = SendRequest (req.Stream);
+			int len = resp.GetInt32 ();
+			int [] result = new int [len];
+			for (int i = 0; i < len; i++) {
+				result [i] = resp.GetInt32 ();
+			}
+
+			return result;
+		}
+
+		static ItemData [] empty_item_data = new ItemData [0];
+		public static ItemData [] Find (ItemType type, Hashtable atts)
+		{
+			if (atts == null)
+				throw new ArgumentNullException ("atts");
+			RequestMessage req = new RequestMessage ();
+			req.StartOperation (Operation.Find);
+			req.Write ((int) type);
+			req.WriteAttributes (atts);
+			req.EndOperation ();
+
+			ResponseMessage resp = null;
+			try {
+				resp = SendRequest (req.Stream);
+			} catch (KeyringException ke) {
+				if (ke.ResultCode == ResultCode.Denied)
+					return empty_item_data;
+				throw;
+			}
+
+			ArrayList list = new ArrayList ();
+			while (resp.DataAvailable) {
+				ItemData found = ItemData.GetInstanceFromItemType (type);
+				found.Keyring = resp.GetString ();
+				found.ItemID = resp.GetInt32 ();
+				found.Secret = resp.GetString ();
+				found.Attributes = new Hashtable ();
+				resp.ReadAttributes (found.Attributes);
+				found.SetValuesFromAttributes ();
+				list.Add (found);
+			}
+
+			return (ItemData []) list.ToArray (typeof (ItemData));
+		}
+
+		static NetItemData [] empty_net_item_data = new NetItemData [0];
+		public static NetItemData [] FindNetworkPassword (string user, string domain, string server, string obj,
+									string protocol, string authtype, int port)
+		{
+			RequestMessage req = new RequestMessage ();
+			req.StartOperation (Operation.Find);
+			req.Write ((int) ItemType.NetworkPassword);
+			Hashtable tbl = new Hashtable ();
+			tbl ["user"] = user;
+			tbl ["domain"] = domain;
+			tbl ["server"] = server;
+			tbl ["object"] = obj;
+			tbl ["protocol"] = protocol;
+			tbl ["authtype"] = authtype;
+			if (port != 0)
+				tbl ["port"] = port;
+			req.WriteAttributes (tbl);
+			req.EndOperation ();
+
+			ResponseMessage resp = null;
+			try {
+				resp = SendRequest (req.Stream);
+			} catch (KeyringException ke) {
+				if (ke.ResultCode == ResultCode.Denied)
+					return empty_net_item_data;
+				throw;
+			}
+			ArrayList list = new ArrayList ();
+			while (resp.DataAvailable) {
+				NetItemData found = new NetItemData ();
+				found.Keyring = resp.GetString ();
+				found.ItemID = resp.GetInt32 ();
+				found.Secret = resp.GetString ();
+				found.Attributes = new Hashtable ();
+				resp.ReadAttributes (found.Attributes);
+				found.SetValuesFromAttributes ();
+				list.Add (found);
+			}
+
+			return (NetItemData []) list.ToArray (typeof (NetItemData));
+		}
+
+		public static int CreateItem (string keyring, ItemType type, string displayName, Hashtable attributes,
+						string secret, bool updateIfExists)
+		{
+			RequestMessage req = new RequestMessage ();
+			req.StartOperation (Operation.CreateItem);
+			req.Write (keyring);
+			req.Write (displayName);
+			req.Write (secret);
+			req.WriteAttributes (attributes);
+			req.Write ((int) type);
+			req.Write (updateIfExists ? 1 : 0);
+			req.EndOperation ();
+			ResponseMessage resp = SendRequest (req.Stream);
+			return resp.GetInt32 ();
+		}
+
+		public static void DeleteItem (string keyring, int id)
+		{
+			if (keyring == null)
+				throw new ArgumentNullException ("keyring");
+
+			RequestMessage req = new RequestMessage ();
+			req.CreateSimpleOperation (Operation.DeleteItem, keyring, id);
+			SendRequest (req.Stream);
+		}
+
+		public static int CreateOrModifyNetworkPassword (string keyring, string user, string domain, string server, string obj,
+								string protocol, string authtype, int port, string password)
+		{
+			Hashtable tbl = new Hashtable ();
+			tbl ["user"] = user;
+			tbl ["domain"] = domain;
+			tbl ["server"] = server;
+			tbl ["object"] = obj;
+			tbl ["protocol"] = protocol;
+			tbl ["authtype"] = authtype;
+			if (port != 0)
+				tbl ["port"] = port;
+
+			string display_name;
+			if (port != 0)
+				display_name = String.Format ("{0}@{1}:{3}/{2}", user, server, obj, port);
+			else
+				display_name = String.Format ("{0}@{1}/{2}", user, server, obj);
+
+			return CreateItem (keyring, ItemType.NetworkPassword, display_name, tbl, password, true);
+		}
+
+		public static ItemData GetItemInfo (string keyring, int id)
+		{
+			if (keyring == null)
+				throw new ArgumentNullException ("keyring");
+
+			RequestMessage req = new RequestMessage ();
+			req.CreateSimpleOperation (Operation.GetItemInfo, keyring, id);
+			ResponseMessage resp = SendRequest (req.Stream);
+			ItemType itype = (ItemType) resp.GetInt32 ();
+			ItemData item = ItemData.GetInstanceFromItemType (itype);
+			string name = resp.GetString ();
+			string secret = resp.GetString ();
+			DateTime mtime = resp.GetDateTime ();
+			DateTime ctime =  resp.GetDateTime ();
+			item.Keyring = keyring;
+			item.ItemID = id;
+			item.Secret = secret;
+			Hashtable tbl = new Hashtable ();
+			tbl ["name"] = name;
+			tbl ["keyring_ctime"] = ctime;
+			tbl ["keyring_mtime"] = mtime;
+			item.Attributes = tbl;
+			item.SetValuesFromAttributes ();
+			return item;
+		}
+
+		public static void SetItemInfo (string keyring, int id, ItemType type, string displayName, string secret)
+		{
+			if (keyring == null)
+				throw new ArgumentNullException ("keyring");
+
+			RequestMessage req = new RequestMessage ();
+			req.StartOperation (Operation.SetItemInfo);
+			req.Write (keyring);
+			req.Write (id);
+			req.Write ((int) type);
+			req.Write (displayName);
+			req.Write (secret);
+			req.EndOperation ();
+			SendRequest (req.Stream);
+		}
+
+		public static Hashtable GetItemAttributes (string keyring, int id)
+		{
+			if (keyring == null)
+				throw new ArgumentNullException ("keyring");
+
+			RequestMessage req = new RequestMessage ();
+			req.CreateSimpleOperation (Operation.GetItemAttributes, keyring, id);
+			ResponseMessage resp = SendRequest (req.Stream);
+			Hashtable tbl = new Hashtable ();
+			resp.ReadAttributes (tbl);
+			return tbl;
+		}
+
+		public static void SetItemAttributes (string keyring, int id, Hashtable atts)
+		{
+			if (keyring == null)
+				throw new ArgumentNullException ("keyring");
+
+			RequestMessage req = new RequestMessage ();
+			req.StartOperation (Operation.SetItemAttributes);
+			req.Write (keyring);
+			req.Write (id);
+			req.WriteAttributes (atts);
+			req.EndOperation ();
+			SendRequest (req.Stream);
+		}
+
+		public static KeyringInfo GetKeyringInfo (string keyring)
+		{
+			if (keyring == null)
+				throw new ArgumentNullException ("keyring");
+
+			RequestMessage req = new RequestMessage ();
+			req.CreateSimpleOperation (Operation.GetKeyringInfo, keyring);
+			ResponseMessage resp = SendRequest (req.Stream);
+			return new KeyringInfo (keyring, (resp.GetInt32 () != 0),
+							resp.GetInt32 (),
+							resp.GetDateTime (),
+							resp.GetDateTime (),
+							(resp.GetInt32 () != 0));
+		}
+
+		public static void SetKeyringInfo (string keyring, KeyringInfo info)
+		{
+			if (keyring == null)
+				throw new ArgumentNullException ("keyring");
+
+			if (info == null)
+				throw new ArgumentNullException ("info");
+
+			RequestMessage req = new RequestMessage ();
+			req.StartOperation (Operation.SetKeyringInfo);
+			req.Write (keyring);
+			req.Write (info.LockOnIdle ? 1 : 0);
+			req.Write (info.LockTimeoutSeconds);
+			req.EndOperation ();
+			SendRequest (req.Stream);
+		}
+
+		public static ArrayList GetItemACL (string keyring, int id)
+		{
+			if (keyring == null)
+				throw new ArgumentNullException ("keyring");
+
+			RequestMessage req = new RequestMessage ();
+			req.CreateSimpleOperation (Operation.GetItemACL, keyring, id);
+			ResponseMessage resp = SendRequest (req.Stream);
+			int count = resp.GetInt32 ();
+			ArrayList list = new ArrayList (count);
+			for (int i = 0; i < count; i++) {
+				list.Add (new ItemACL (resp.GetString (), resp.GetString (), (AccessRights) resp.GetInt32 ()));
+			}
+			return list;
+		}
+
+		public static void SetItemACL (string keyring, int id, ICollection acls)
+		{
+			if (acls == null)
+				throw new ArgumentNullException ("acls");
+
+			ItemACL [] arr = new ItemACL [acls.Count];
+			acls.CopyTo (arr, 0);
+			SetItemACL (keyring, id, arr);
+		}
+
+		public static void SetItemACL (string keyring, int id, ItemACL [] acls)
+		{
+			if (keyring == null)
+				throw new ArgumentNullException ("keyring");
+
+			if (acls == null)
+				throw new ArgumentNullException ("acls");
+
+			if (acls.Length == 0)
+				throw new ArgumentException ("Empty ACL set.", "acls");
+
+			RequestMessage req = new RequestMessage ();
+			req.StartOperation (Operation.SetItemACL);
+			req.Write (keyring);
+			req.Write (id);
+			req.Write (acls.Length);
+			foreach (ItemACL acl in acls) {
+				req.Write (acl.DisplayName);
+				req.Write (acl.FullPath);
+				req.Write ((int) acl.Access);
+			}
+			req.EndOperation ();
+			SendRequest (req.Stream);
+		}
+	}
+}
+
