Author: thomasvm
Date: 2007-03-30 00:38:33 -0500 (Fri, 30 Mar 2007)
New Revision: 75178

Modified:
   trunk/facebook-sharp/src/Mono.Facebook/FacebookSession.cs
   trunk/facebook-sharp/src/Mono.Facebook/Responses.cs
Log:
Fix file format

Modified: trunk/facebook-sharp/src/Mono.Facebook/FacebookSession.cs
===================================================================
--- trunk/facebook-sharp/src/Mono.Facebook/FacebookSession.cs   2007-03-30 
00:29:05 UTC (rev 75177)
+++ trunk/facebook-sharp/src/Mono.Facebook/FacebookSession.cs   2007-03-30 
05:38:33 UTC (rev 75178)
@@ -1,83 +1,83 @@
-using System;
-using System.Xml;
-using System.Collections.Generic;
-using System.Text;
-using System.IO;
-using System.Net;
-
-namespace Mono.Facebook
-{
-       public class FacebookSession
-       {
-               Util util;
-               SessionInfo session_info;
-               string auth_token;
-
-               internal Util Util
-               {
-                       get { return util; }
-               }
-
-               internal string SessionKey
-               {
-                       get { return session_info.SessionKey; }
-               }
-
-               public FacebookSession (string api_key, string shared_secret)
-               {
-                       util = new Util (api_key, shared_secret);
-               }
-
-               public Uri CreateToken ()
-               {
-                       XmlDocument doc = util.GetResponse 
("facebook.auth.createToken");
-                       auth_token = doc.InnerText;
-
-                       return new Uri (string.Format 
("http://www.facebook.com/login.php?api_key={0}&v=1.0&auth_token={1}";, 
util.ApiKey, auth_token));
-               }
-
-               public void GetSession ()
-               {
-                       this.session_info = util.GetResponse<SessionInfo> 
("facebook.auth.getSession", 
-                               FacebookParam.Create ("auth_token", 
auth_token));
-                       this.util.SharedSecret = session_info.Secret;
-                       this.auth_token = string.Empty;
-               }
-
-               public Album[] GetAlbums ()
-               {
-                       AlbumsResponse rsp = util.GetResponse<AlbumsResponse> 
("facebook.photos.getAlbums",
-                               FacebookParam.Create ("uid", session_info.UId),
-                               FacebookParam.Create ("session_key", 
session_info.SessionKey),
-                               FacebookParam.Create ("call_id", 
DateTime.Now.Ticks));
-
-                       foreach (Album album in rsp.Albums)
-                               album.Session = this;
-
-                       return rsp.Albums;
-               }
-
-               public Album CreateAlbum (string name, string description, 
string location)
-               {
-                       // create parameter list
-                       List<FacebookParam> param_list = new 
List<FacebookParam> ();
-                       param_list.Add (FacebookParam.Create ("session_key", 
session_info.SessionKey));
-                       param_list.Add (FacebookParam.Create ("call_id", 
DateTime.Now.Ticks));
-                       param_list.Add (FacebookParam.Create ("name", name));
-
-                       if (description != null && description != string.Empty)
-                               param_list.Add (FacebookParam.Create 
("description", description));
-
-                       if (location != null && location != string.Empty)
-                               param_list.Add (FacebookParam.Create 
("location", location));
-
-                       // create the albums
-                       Album new_album = util.GetResponse<Album> 
("facebook.photos.createAlbum", param_list.ToArray ());
-                       new_album.Session = this;
-
-                       // return
-                       return new_album;
-               }
-
-       }
-}
+using System;
+using System.Xml;
+using System.Collections.Generic;
+using System.Text;
+using System.IO;
+using System.Net;
+
+namespace Mono.Facebook
+{
+       public class FacebookSession
+       {
+               Util util;
+               SessionInfo session_info;
+               string auth_token;
+
+               internal Util Util
+               {
+                       get { return util; }
+               }
+
+               internal string SessionKey
+               {
+                       get { return session_info.SessionKey; }
+               }
+
+               public FacebookSession (string api_key, string shared_secret)
+               {
+                       util = new Util (api_key, shared_secret);
+               }
+
+               public Uri CreateToken ()
+               {
+                       XmlDocument doc = util.GetResponse 
("facebook.auth.createToken");
+                       auth_token = doc.InnerText;
+
+                       return new Uri (string.Format 
("http://www.facebook.com/login.php?api_key={0}&v=1.0&auth_token={1}";, 
util.ApiKey, auth_token));
+               }
+
+               public void GetSession ()
+               {
+                       this.session_info = util.GetResponse<SessionInfo> 
("facebook.auth.getSession", 
+                               FacebookParam.Create ("auth_token", 
auth_token));
+                       this.util.SharedSecret = session_info.Secret;
+                       this.auth_token = string.Empty;
+               }
+
+               public Album[] GetAlbums ()
+               {
+                       AlbumsResponse rsp = util.GetResponse<AlbumsResponse> 
("facebook.photos.getAlbums",
+                               FacebookParam.Create ("uid", session_info.UId),
+                               FacebookParam.Create ("session_key", 
session_info.SessionKey),
+                               FacebookParam.Create ("call_id", 
DateTime.Now.Ticks));
+
+                       foreach (Album album in rsp.Albums)
+                               album.Session = this;
+
+                       return rsp.Albums;
+               }
+
+               public Album CreateAlbum (string name, string description, 
string location)
+               {
+                       // create parameter list
+                       List<FacebookParam> param_list = new 
List<FacebookParam> ();
+                       param_list.Add (FacebookParam.Create ("session_key", 
session_info.SessionKey));
+                       param_list.Add (FacebookParam.Create ("call_id", 
DateTime.Now.Ticks));
+                       param_list.Add (FacebookParam.Create ("name", name));
+
+                       if (description != null && description != string.Empty)
+                               param_list.Add (FacebookParam.Create 
("description", description));
+
+                       if (location != null && location != string.Empty)
+                               param_list.Add (FacebookParam.Create 
("location", location));
+
+                       // create the albums
+                       Album new_album = util.GetResponse<Album> 
("facebook.photos.createAlbum", param_list.ToArray ());
+                       new_album.Session = this;
+
+                       // return
+                       return new_album;
+               }
+
+       }
+}

Modified: trunk/facebook-sharp/src/Mono.Facebook/Responses.cs
===================================================================
--- trunk/facebook-sharp/src/Mono.Facebook/Responses.cs 2007-03-30 00:29:05 UTC 
(rev 75177)
+++ trunk/facebook-sharp/src/Mono.Facebook/Responses.cs 2007-03-30 05:38:33 UTC 
(rev 75178)
@@ -1,65 +1,65 @@
-using System;
-using System.Xml.Serialization;
-
-namespace Mono.Facebook
-{
-       [XmlRoot ("auth_getSession_response", Namespace = 
"http://api.facebook.com/1.0/";, IsNullable = false)]
-       public class SessionInfo
-       {
-               [XmlElement ("session_key")]
-               public string SessionKey;
-
-               [XmlElement ("uid")]
-               public string UId;
-
-               [XmlElement ("secret")]
-               public string Secret;
-       }
-
-       [XmlRoot ("photos_getAlbums_response", Namespace = 
"http://api.facebook.com/1.0/";, IsNullable = false)]
-       public class AlbumsResponse
-       {
-               [XmlElement ("album")]
-               public Album[] album_array;
-
-               [XmlIgnore ()]
-               public Album[] Albums
-               {
-                       get { return album_array ?? new Album[0]; }
-               }
-
-               [XmlAttribute ("list")]
-               public bool List;
-       }
-
-       [XmlRoot ("photos_get_response", Namespace = 
"http://api.facebook.com/1.0/";, IsNullable = false)]
-       public class PhotosResponse
-       {
-               [XmlElement ("photo")]
-               public Photo[] photo_array;
-
-               [XmlIgnore ()]
-               public Photo[] Photos
-               {
-                       get { return photo_array ?? new Photo[0]; }
-               }
-
-               [XmlAttribute ("list")]
-               public bool List;
-       }
-
-       [XmlRoot ("photos_getTags_response", Namespace = 
"http://api.facebook.com/1.0/";, IsNullable = false)]
-       public class PhotoTagsResponse
-       {
-               [XmlElement ("photo_tag")]
-               public Tag[] tag_array;
-
-               public Tag[] Tags
-               {
-                       get { return tag_array ?? new Tag[0]; }
-               }
-
-               [XmlAttribute ("list")]
-               public bool List;
-       }
-}
+using System;
+using System.Xml.Serialization;
+
+namespace Mono.Facebook
+{
+       [XmlRoot ("auth_getSession_response", Namespace = 
"http://api.facebook.com/1.0/";, IsNullable = false)]
+       public class SessionInfo
+       {
+               [XmlElement ("session_key")]
+               public string SessionKey;
+
+               [XmlElement ("uid")]
+               public string UId;
+
+               [XmlElement ("secret")]
+               public string Secret;
+       }
+
+       [XmlRoot ("photos_getAlbums_response", Namespace = 
"http://api.facebook.com/1.0/";, IsNullable = false)]
+       public class AlbumsResponse
+       {
+               [XmlElement ("album")]
+               public Album[] album_array;
+
+               [XmlIgnore ()]
+               public Album[] Albums
+               {
+                       get { return album_array ?? new Album[0]; }
+               }
+
+               [XmlAttribute ("list")]
+               public bool List;
+       }
+
+       [XmlRoot ("photos_get_response", Namespace = 
"http://api.facebook.com/1.0/";, IsNullable = false)]
+       public class PhotosResponse
+       {
+               [XmlElement ("photo")]
+               public Photo[] photo_array;
+
+               [XmlIgnore ()]
+               public Photo[] Photos
+               {
+                       get { return photo_array ?? new Photo[0]; }
+               }
+
+               [XmlAttribute ("list")]
+               public bool List;
+       }
+
+       [XmlRoot ("photos_getTags_response", Namespace = 
"http://api.facebook.com/1.0/";, IsNullable = false)]
+       public class PhotoTagsResponse
+       {
+               [XmlElement ("photo_tag")]
+               public Tag[] tag_array;
+
+               public Tag[] Tags
+               {
+                       get { return tag_array ?? new Tag[0]; }
+               }
+
+               [XmlAttribute ("list")]
+               public bool List;
+       }
+}

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to