summaryrefslogtreecommitdiff
path: root/src/dalstorage.h
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2006-08-03 17:37:34 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2006-08-03 17:37:34 +0000
commit0c0966322b3018fa5fe3be3f52eef867da6ec779 (patch)
tree544a55ddf19a0f0cfb6499fe71540d952af5fe6e /src/dalstorage.h
parenteff04b5ddb0b00eeed191382aa9d55bf0f56c2a7 (diff)
downloadmanaserv-0c0966322b3018fa5fe3be3f52eef867da6ec779.tar.gz
manaserv-0c0966322b3018fa5fe3be3f52eef867da6ec779.tar.bz2
manaserv-0c0966322b3018fa5fe3be3f52eef867da6ec779.tar.xz
manaserv-0c0966322b3018fa5fe3be3f52eef867da6ec779.zip
Simplified and sped up account flushing: only modified accounts are flushed.
Diffstat (limited to 'src/dalstorage.h')
-rw-r--r--src/dalstorage.h61
1 files changed, 11 insertions, 50 deletions
diff --git a/src/dalstorage.h b/src/dalstorage.h
index c3848ed9..ec80a8cc 100644
--- a/src/dalstorage.h
+++ b/src/dalstorage.h
@@ -79,10 +79,16 @@ class DALStorage: public Storage
/**
* Delete an account.
*
- * @param userName the owner of the account.
+ * @param account the account to delete.
*/
- void
- delAccount(const std::string& userName);
+ void delAccount(AccountPtr const &account);
+
+ /**
+ * Flush and unload an account.
+ *
+ * @param account the account to unload.
+ */
+ void unloadAccount(AccountPtr const &account);
/**
* Get the list of Emails in the accounts list.
@@ -130,9 +136,8 @@ class DALStorage: public Storage
*
* @exception tmwserv::dal::DbSqlQueryExecFailure.
*/
- void
- flush(void);
-
+ void flushAll();
+ void flush(AccountPtr const &);
private:
/**
@@ -174,50 +179,6 @@ class DALStorage: public Storage
const std::string& sql);
- /**
- * Add an account to the database.
- *
- * @param account the account to add.
- *
- * @exeception tmwserv::dal::DbSqlQueryExecFailure.
- */
- void
- _addAccount(const AccountPtr& account);
-
-
- /**
- * Update an account from the database.
- *
- * @param account the account to update.
- *
- * @exception tmwserv::dal::DbSqlQueryExecFailure.
- */
- void
- _updAccount(const AccountPtr& account);
-
-
- /**
- * Delete an account and its associated data from the database.
- *
- * @param account the account to update.
- *
- * @exception tmwserv::dal::DbSqlQueryExecFailure.
- */
- void
- _delAccount(const AccountPtr& account);
-
-
- /**
- * Delete an account and its associated data from the database.
- *
- * @param userName the owner of the account.
- *
- * @exeception tmwserv::dal::DbSqlQueryExecFailure.
- */
- void
- _delAccount(const std::string& userName);
-
-
private:
std::auto_ptr<dal::DataProvider> mDb; /**< the data provider */
};