summaryrefslogtreecommitdiff
path: root/src/account-server/dalstorage.hpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-07-02 19:49:54 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-07-02 19:49:54 +0000
commite0ec0277143055e84ca0a5ebdf7e7a255f07c09a (patch)
tree1da65b334973b3b9924a76a63381543c63784677 /src/account-server/dalstorage.hpp
parent7020d891b341d577fed97659e80de293bf27b062 (diff)
downloadmanaserv-e0ec0277143055e84ca0a5ebdf7e7a255f07c09a.tar.gz
manaserv-e0ec0277143055e84ca0a5ebdf7e7a255f07c09a.tar.bz2
manaserv-e0ec0277143055e84ca0a5ebdf7e7a255f07c09a.tar.xz
manaserv-e0ec0277143055e84ca0a5ebdf7e7a255f07c09a.zip
Cleaned prototypes and factored out duplicate code.
Diffstat (limited to 'src/account-server/dalstorage.hpp')
-rw-r--r--src/account-server/dalstorage.hpp32
1 files changed, 24 insertions, 8 deletions
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<dal::DataProvider> mDb; /**< the data provider */
};