tasque r146 - in trunk: . src/Backends/Hiveminder src/Backends/Hiveminder/service
- From: jjohnny svn gnome org
- To: svn-commits-list gnome org
- Subject: tasque r146 - in trunk: . src/Backends/Hiveminder src/Backends/Hiveminder/service
- Date: Wed, 15 Oct 2008 14:14:26 +0000 (UTC)
Author: jjohnny
Date: Wed Oct 15 14:14:26 2008
New Revision: 146
URL: http://svn.gnome.org/viewvc/tasque?rev=146&view=rev
Log:
Hiveminder Backend : Coding style & typo fixes
Modified:
trunk/ChangeLog
trunk/src/Backends/Hiveminder/HmBackend.cs
trunk/src/Backends/Hiveminder/HmPreferencesWidget.cs
trunk/src/Backends/Hiveminder/service/Hiveminder.cs
Modified: trunk/src/Backends/Hiveminder/HmBackend.cs
==============================================================================
--- trunk/src/Backends/Hiveminder/HmBackend.cs (original)
+++ trunk/src/Backends/Hiveminder/HmBackend.cs Wed Oct 15 14:14:26 2008
@@ -156,7 +156,7 @@
Gtk.TreeIter iter;
try {
string username, password;
- LoadCredentails (out username,out password);
+ LoadCredentials (out username,out password);
this.hm = new Hiveminder.Hiveminder(username, password);
configured = true;
} catch (HiveminderAuthException e) {
@@ -226,7 +226,7 @@
}
- public static bool LoadCredentails (out string username, out string password)
+ public static bool LoadCredentials (out string username, out string password)
{
try {
TextReader configFile = new StreamReader (new FileStream(credentialFile, FileMode.OpenOrCreate, FileAccess.Read));
Modified: trunk/src/Backends/Hiveminder/HmPreferencesWidget.cs
==============================================================================
--- trunk/src/Backends/Hiveminder/HmPreferencesWidget.cs (original)
+++ trunk/src/Backends/Hiveminder/HmPreferencesWidget.cs Wed Oct 15 14:14:26 2008
@@ -46,7 +46,7 @@
public HmPreferencesWidget () : base()
{
- HmBackend.LoadCredentails (out this.username, out this.password);
+ HmBackend.LoadCredentials (out this.username, out this.password);
//Fixme Please ! I look UGLY!
VBox mainVBox = new VBox(false, 12);
Modified: trunk/src/Backends/Hiveminder/service/Hiveminder.cs
==============================================================================
--- trunk/src/Backends/Hiveminder/service/Hiveminder.cs (original)
+++ trunk/src/Backends/Hiveminder/service/Hiveminder.cs Wed Oct 15 14:14:26 2008
@@ -41,11 +41,11 @@
public Hiveminder (string username, string password)
{
string cookieValue;
- cookieValue = this.login(username, password);
+ cookieValue = this.Login(username, password);
this.COOKIE_HIVEMINDER_SID = new Cookie ("JIFTY_SID_HIVEMINDER", cookieValue, "/", "hiveminder.com");
}
- public string cookieValue
+ public string CookieValue
{
get { return COOKIE_HIVEMINDER_SID.Value; }
}
@@ -59,7 +59,7 @@
/// <param name="password">
/// A <see cref="System.String"/>
/// </param>
- public string login (string username, string password)
+ public string Login (string username, string password)
{
string postURL = "/__jifty/webservices/xml";
//TODO : Fix this.
@@ -80,14 +80,9 @@
Console.WriteLine (resp.StatusCode);
//Look for JIFTY_SID_HIVEMINDER
- foreach (Cookie cook in resp.Cookies)
- {
- if (cook.Name == "JIFTY_SID_HIVEMINDER") {
- this.COOKIE_HIVEMINDER_SID = cook;
- }
- }
+ this.COOKIE_HIVEMINDER_SID = resp.Cookies["JIFTY_SID_HIVEMINDER"];
- checkLoginStatus();
+ CheckLoginStatus();
return this.COOKIE_HIVEMINDER_SID.Value;
}
@@ -97,10 +92,10 @@
/// <returns>
/// A <see cref="System.Boolean"/>
/// </returns>
- private bool checkLoginStatus ()
+ private bool CheckLoginStatus ()
{
string responseString;
- responseString = this.command ("/=/version/");
+ responseString = this.Command ("/=/version/");
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml (responseString);
@@ -113,7 +108,7 @@
return true;
}
- public string command (string command, string method)
+ public string Command (string command, string method)
{
HttpWebRequest req = (HttpWebRequest)WebRequest.Create (BaseURL + command + ".xml");
Console.WriteLine (BaseURL+command);
@@ -130,9 +125,9 @@
return responseString;
}
- public string command (string command)
+ public string Command (string command)
{
- return this.command (command, "GET");
+ return this.Command (command, "GET");
}
/// <summary>
@@ -143,7 +138,7 @@
string responseString;
uint i =0;
- responseString = this.command ("/=/search/BTDT.Model.Task/");
+ responseString = this.Command ("/=/search/BTDT.Model.Task/");
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml (responseString);
@@ -161,7 +156,7 @@
string responseString;
uint i =0;
- responseString = this.command ("/=/action/BTDT.Action.SearchGroup/", "POST");
+ responseString = this.Command ("/=/action/BTDT.Action.SearchGroup/", "POST");
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml (responseString);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]