Logo Search packages:      
Sourcecode: f-spot version File versions  Download package

Response.cs

using System;
using System.Xml;
using System.Xml.Serialization;
using System.Xml.Schema;

namespace FlickrNet
{
      /// <summary>
      /// The root object returned by Flickr. Used with Xml Serialization to get the relevant object.
      /// It is internal to the FlickrNet API Library and should not be used elsewhere.
      /// </summary>
      [XmlRoot("rsp", Namespace="", IsNullable=false)]
      [Serializable]
00014       public class Response 
      {

            /// <remarks/>
            [XmlElement("blogs", Form=XmlSchemaForm.Unqualified)]
00019             public Blogs Blogs;

            /// <remarks/>
            [XmlElement("contacts", Form=XmlSchemaForm.Unqualified)]
00023             public Contacts Contacts;

            /// <remarks/>
            [XmlElement("photos", Form=XmlSchemaForm.Unqualified)]
00027             public Photos Photos;

            /// <remarks/>
            [XmlElement("category", Form=XmlSchemaForm.Unqualified)]
00031             public Category Category;

            /// <remarks/>
            [XmlElement("activegroups", Form=XmlSchemaForm.Unqualified)]
00035             public ActiveGroups ActiveGroups;

            /// <remarks/>
            [XmlElement("groups", Form=XmlSchemaForm.Unqualified)]
00039             public PoolGroups PoolGroups;

            /// <remarks/>
            [XmlElement("group", Form=XmlSchemaForm.Unqualified)]
00043             public GroupInfo GroupInfo;

            /// <remarks/>
            [XmlElement("photocounts", Form=XmlSchemaForm.Unqualified)]
00047             public PhotoCounts PhotoCounts;

            /// <remarks/>
            [XmlElement("photo", Form=XmlSchemaForm.Unqualified)]
00051             public PhotoInfo PhotoInfo;

            /// <remarks/>
            [XmlElement("who", Form=XmlSchemaForm.Unqualified)]
00055             public WhoInfo Who;

            /// <remarks/>
            [XmlElement("tags", Form=XmlSchemaForm.Unqualified)]
00059             public PhotoInfoTags Tags;

            /// <remarks/>
            [XmlElement("perms", Form=XmlSchemaForm.Unqualified)]
00063             public PhotoPermissions PhotoPermissions;

            /// <remarks/>
            [XmlElement("user", Form=XmlSchemaForm.Unqualified)]
00067             public User User;
    
            /// <remarks/>
            [XmlElement("person", Form=XmlSchemaForm.Unqualified)]
00071             public Person Person;
    
            /// <remarks/>
            [XmlElement("photoset", Form=XmlSchemaForm.Unqualified)]
00075             public Photoset Photoset;

            /// <remarks/>
            [XmlElement("photosets", Form=XmlSchemaForm.Unqualified)]
00079             public Photosets Photosets;

            /// <remarks/>
            [XmlElement("online", Form=XmlSchemaForm.Unqualified)]
00083             public Online OnlineUsers;
    
            /// <remarks/>
            [XmlElement("sizes", Form=XmlSchemaForm.Unqualified)]
00087             public Sizes Sizes;
    
            /// <remarks/>
            [XmlElement("licenses", Form=XmlSchemaForm.Unqualified)]
00091             public Licenses Licenses;

            /// <remarks/>
            [XmlElement("count", Form=XmlSchemaForm.Unqualified)]
00095             public ContextCount ContextCount;

            /// <remarks/>
            [XmlElement("nextphoto", Form=XmlSchemaForm.Unqualified)]
00099             public ContextPhoto ContextNextPhoto;

            /// <remarks/>
            [XmlElement("prevphoto", Form=XmlSchemaForm.Unqualified)]
00103             public ContextPhoto ContextPrevPhoto;

            /// <remarks/>
            [XmlAttribute("stat", Form=XmlSchemaForm.Unqualified)]
00107             public ResponseStatus Status;

            /// <summary>
            /// If an error occurs the Error property is populated with 
            /// a <see cref="ResponseError"/> instance.
            /// </summary>
            [XmlElement("err", Form=XmlSchemaForm.Unqualified)]
00114             public ResponseError Error;

            /// <summary>
            /// If using flickr.test.echo this contains all the other elements not covered above.
            /// </summary>
            /// <remarks>
            /// t is an array of <see cref="XmlElement"/> objects. Use the XmlElement Name and InnerXml properties
            /// to get the name and value of the returned property.
            /// </remarks>
            [XmlAnyElement()]
00124             public XmlElement[] AllElements;
      }

      /// <summary>
      /// If an error occurs then Flickr returns this object.
      /// </summary>
      [System.Serializable]
00131       public class ResponseError
      {
            /// <summary>
            /// The code or number of the error.
            /// </summary>
            /// <remarks>
            /// 100 - Invalid Api Key.
            /// 99  - User not logged in.
            /// Other codes are specific to a method.
            /// </remarks>
            [XmlAttribute("code", Form=XmlSchemaForm.Unqualified)]
00142             public int Code;

            /// <summary>
            /// The verbose message matching the error code.
            /// </summary>
            [XmlAttribute("msg", Form=XmlSchemaForm.Unqualified)]
00148             public string Message;
      }

      /// <summary>
      /// The status of the response, either ok or fail.
      /// </summary>
      public enum ResponseStatus
      {
            /// <summary>
            /// The response returns "ok" on a successful execution of the method.
            /// </summary>
            [XmlEnum("ok")]
            OK,
            /// <summary>
            /// The response returns "fail" if there is an error, such as invalid API key or login failure.
            /// </summary>
            [XmlEnum("fail")]
            Failed
      }
}

Generated by  Doxygen 1.6.0   Back to index