File: Uploader.cs

package info (click to toggle)
libflickrnet 25277-6
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 628 kB
  • ctags: 1,355
  • sloc: cs: 7,136; makefile: 24; sh: 13; ansic: 6
file content (59 lines) | stat: -rw-r--r-- 1,424 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using System;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace FlickrNet
{
	/// <summary>
	/// Information returned by the UploadPicture url.
	/// </summary>
	[XmlRoot("rsp")]
	public class Uploader
	{
		private ResponseStatus _status;
		private string _photoId;
		private string _ticketId;
		private ResponseError _error;

		/// <summary>
		/// The status of the upload, either "ok" or "fail".
		/// </summary>
		[XmlAttribute("stat", Form=XmlSchemaForm.Unqualified)]
		public ResponseStatus Status
		{
			get { return _status; }
			set { _status = value; }
		}

		/// <summary>
		/// If the upload succeeded then this contains the id of the photo. Otherwise it will be zero.
		/// </summary>
		[XmlElement("photoid", Form=XmlSchemaForm.Unqualified)]
		public string PhotoId
		{
			get { return _photoId; }
			set { _photoId = value; }
		}

		/// <summary>
		/// The ticket id, if using Asynchronous uploading.
		/// </summary>
		[XmlElement("ticketid", Form=XmlSchemaForm.Unqualified)]
		public string TicketId
		{
			get { return _ticketId; }
			set { _ticketId = value; }
		}

		/// <summary>
		/// Contains the error returned if the upload is unsuccessful.
		/// </summary>
		[XmlElement("err", Form=XmlSchemaForm.Unqualified)]
		public ResponseError Error
		{
			get { return _error; }
			set { _error = value; }
		}
	}
}