~ubuntu-branches/ubuntu/saucy/f-spot/saucy

« back to all changes in this revision

Viewing changes to extensions/Exporters/FacebookExport/Mono.Facebook/Photo.cs

  • Committer: Bazaar Package Importer
  • Author(s): Iain Lane
  • Date: 2010-05-24 10:35:57 UTC
  • mfrom: (2.4.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20100524103557-1j0i8f66caybci2n
Tags: 0.7.0-1
* New upstream release 0.7.0
 + First release of the unstable 0.7 development series. Massive changes.
 + Reparenting and detaching support (Anton Keks) (Closes: #559745)
 + A new Mallard-based documentation (Harold Schreckengost)
 + No longer embeds flickrnet, uses distribution copy (Iain Lane)
 + Adoption of a large amount of Hyena functionality (Paul Lange, Peter
   Goetz)
 + No longer embeds gnome-keyring-sharp
 + Completely rewritten import, much faster and less memory hungry (Ruben
   Vermeersch) (Closes: #559080, #492658, #341790, #357811, #426017) (LP:
   #412091)
 + No longer use gphoto2-sharp, now uses gvfs which is less crash-pron
   (Ruben Vermeersch)
 + Fix Facebook support (Ruben Vermeersch)
 + Modernized unit tests
 + Revamped build (Mike Gemünde)
 + Much improved duplicate detection (much faster too) (Ruben Vermeersch)
 + Mouse selection in Iconview (Vincent Pomey)
 + Image panning support using middle mouse button (Wojciech Dzierżanowski)
 + Timeline slider now restricted to the size of the window (Iain Churcher)
 + Over 100 bugs closed (http://bit.ly/cyVjnD)
   - No more warnings about schema defaults (Closes: #584215) (LP: #586132)
* debian/control: Clean up build deps to match configure checks
* debian/rules: Don't run dh_makeshilbs as we don't ship any shared
  libraries. There are some private ones though, which get picked up and
  result in a useless postinst/postrm call to ldconfig. Thanks, lintian.
* debian/patches/debian_fix-distclean.patch,
  debian/patches/debian_fix_f-spot.exe.config.patch,
  debian/patches/debian_link-system-flickrnet.patch,
  debian/patches/debian_link-system-gnome-keyring.patch,
  debian/patches/debian_disable-unit-tests,
  debian/patches/git_transition_duration.patch,
  debian/patches/ubuntu_fix_folder_export_hang.patch:
  Clean up obsolete patches which are no longer necessary 
* debian/patches/*: Temporarily disable patches which originated from Ubuntu
  and no longer apply cleanly. We will get these back in a future upstream
  development release.
* debian/patches/*: Refresh to apply cleanly 
* debian/rules: Add new include dir to autoreconf call to pick up f-spot
  macros 

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
//
7
7
// (C) Copyright 2007 Novell, Inc. (http://www.novell.com)
8
8
//
9
 
 
10
9
// Permission is hereby granted, free of charge, to any person obtaining
11
10
// a copy of this software and associated documentation files (the
12
11
// "Software"), to deal in the Software without restriction, including
27
26
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
27
//
29
28
using System.Xml.Serialization;
 
29
using Mono.Facebook.Schemas;
30
30
 
31
31
namespace Mono.Facebook
32
32
{
33
 
        [XmlRoot ("photos_upload_response", Namespace="http://api.facebook.com/1.0/")]
34
 
        public class Photo : SessionWrapper
 
33
    [System.Xml.Serialization.XmlRootAttribute("photos_upload_response", Namespace="http://api.facebook.com/1.0/")]
 
34
        public class Photo : photo, SessionWrapper
35
35
        {
36
 
                [XmlElement ("pid")]
37
 
                public long PId;
38
 
 
39
 
                [XmlElement ("aid")]
40
 
                public long AId;
41
 
 
42
 
                [XmlElement ("owner")]
43
 
                public long Owner;
44
 
 
45
 
                [XmlElement ("src")]
46
 
                public string Source;
47
 
 
48
 
                [XmlElement ("src_big")]
49
 
                public string SourceBig;
50
 
 
51
 
                [XmlElement ("src_small")]
52
 
                public string SourceSmall;
53
 
 
54
 
                [XmlElement ("link")]
55
 
                public string Link;
56
 
 
57
 
                [XmlElement ("caption")]
58
 
                public string Caption;
59
 
 
60
 
                [XmlElement ("created")]
61
 
                public long Created;
 
36
        [XmlIgnore]
 
37
                public FacebookSession Session { get; set; }
 
38
 
 
39
        [XmlIgnore]
 
40
        public string PId { get { return pid; } }
62
41
 
63
42
                public Tag[] GetTags ()
64
43
                {
65
44
                        PhotoTagsResponse rsp = Session.Util.GetResponse<PhotoTagsResponse> ("facebook.photos.getTags",
66
 
                                FacebookParam.Create ("pids", PId),
 
45
                                FacebookParam.Create ("pids", pid),
67
46
                                FacebookParam.Create ("session_key", Session.SessionKey),
68
47
                                FacebookParam.Create ("call_id", System.DateTime.Now.Ticks));
69
48
 
75
54
 
76
55
                public Album GetAlbum ()
77
56
                {
78
 
                        AlbumsResponse rsp = Session.Util.GetResponse<AlbumsResponse> ("facebook.photos.getAlbums",
79
 
                                FacebookParam.Create ("aids", AId),
 
57
                        var rsp = Session.Util.GetResponse<AlbumsResponse> ("facebook.photos.getAlbums",
 
58
                                FacebookParam.Create ("aids", aid),
80
59
                                FacebookParam.Create ("session_key", Session.SessionKey),
81
60
                                FacebookParam.Create ("call_id", System.DateTime.Now.Ticks));
82
61
 
83
 
                        if (rsp.Albums.Length < 1)
 
62
                        if (rsp.album.Length < 1)
84
63
                                return null;
85
64
 
86
 
                        rsp.Albums[0].Session = Session;
87
 
                        return rsp.Albums[0];
 
65
                        rsp.album[0].Session = Session;
 
66
                        return rsp.album[0];
88
67
                }
89
68
 
90
69
                // does not work right now: cannot tag photo already visible on facebook