From e0ec0277143055e84ca0a5ebdf7e7a255f07c09a Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Mon, 2 Jul 2007 19:49:54 +0000 Subject: Cleaned prototypes and factored out duplicate code. --- src/account-server/dalstorage.hpp | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'src/account-server/dalstorage.hpp') diff --git a/src/account-server/dalstorage.hpp b/src/account-server/dalstorage.hpp index a99bc5d2..b84b1aa7 100644 --- a/src/account-server/dalstorage.hpp +++ b/src/account-server/dalstorage.hpp @@ -47,15 +47,13 @@ class DALStorage: public Storage /** * Connect to the database and initialize it if necessary. */ - void - open(void); + void open(); /** * Disconnect from the database. */ - void - close(void); + void close(); /** @@ -209,14 +207,13 @@ class DALStorage: public Storage /** * Constructor. */ - DALStorage(void); + DALStorage(); /** * Destructor. */ - ~DALStorage(void) - throw(); + ~DALStorage(); /** @@ -245,7 +242,26 @@ class DALStorage: public Storage const std::string& sql); - private: + /** + * Gets an account by using a SQL query string. + * + * @param query the query for the account + * + * @return the account found by the query + */ + AccountPtr getAccountBySQL(std::string const &query); + + + /** + * Gets a character by character name. + * + * @param query the query for the character + * + * @return the character found by the query + */ + CharacterPtr getCharacterBySQL(const std::string &query); + + std::auto_ptr mDb; /**< the data provider */ }; -- cgit v1.2.3-60-g2f50