Revision: 41615
http://brlcad.svn.sourceforge.net/brlcad/?rev=41615&view=rev
Author: davidloman
Date: 2010-12-15 16:02:44 +0000 (Wed, 15 Dec 2010)
Log Message:
-----------
Implemented the ability to logout/remove accounts
Modified Paths:
--------------
rt^3/trunk/include/Account.h
rt^3/trunk/src/GS/AccountManager.cxx
Modified: rt^3/trunk/include/Account.h
===================================================================
--- rt^3/trunk/include/Account.h 2010-12-15 14:54:35 UTC (rev 41614)
+++ rt^3/trunk/include/Account.h 2010-12-15 16:02:44 UTC (rev 41615)
@@ -17,7 +17,7 @@
* License along with this file; see the file named COPYING for more
* information.
*/
-/** @file Account.cxx
+/** @file Account.h
*
* Class that represents a user's account information.
*
Modified: rt^3/trunk/src/GS/AccountManager.cxx
===================================================================
--- rt^3/trunk/src/GS/AccountManager.cxx 2010-12-15 14:54:35 UTC (rev
41614)
+++ rt^3/trunk/src/GS/AccountManager.cxx 2010-12-15 16:02:44 UTC (rev
41615)
@@ -56,7 +56,7 @@
quint32
AccountManager::validateLoginCreds(QString uname, QString passwd)
{
- //TODO put in REAL account validation here.
+ /* TODO put in REAL account validation here. */
if (uname == "Guest" && passwd == "Guest") {
return 0;
}
@@ -76,7 +76,7 @@
return 5;
}
if (uname == "Roger" && passwd == "Kint") {
- return 6; static quint32 nextID;
+ return 6;
}
return -1;
@@ -98,6 +98,11 @@
return acc;
}
+void
+AccountManager::logout(Account* a) {
+ this->remAccount(a);
+}
+
Account*
AccountManager::newAccount(QString uname, Portal* p, quint32 id)
{
@@ -126,6 +131,13 @@
return a;
}
+void
+AccountManager::remAccount(Account* a) {
+ this->accountListLock.lock();
+ this->accounts->removeAll(a); /* TODO Removes matches to mem address
only, upgrade this logic. */
+ this->accountListLock.unlock();
+}
+
// Local Variables: ***
// mode: C++ ***
// tab-width: 8 ***
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits