GnuCashew ~ GnuCash Enabled Web
GCW
SessionGnuCashew.h
Go to the documentation of this file.
1 #line 2 "src/Dbo/SessionGnuCashew.h"
2 
3 #ifndef __DBO_SESSIONGNUCASHEW_H___
4 #define __DBO_SESSIONGNUCASHEW_H___
5 
6 #include "Users/Auth.h"
7 #include "AbstractSession.h"
8 
9 namespace GCW {
10  namespace Dbo {
11  namespace GnuCashew {
12 
13 /*!
14 ** \brief GnuCash Native Session
15 **
16 ** This session controller is designed to interface to a back-end
17 ** gnucash data structure, without modification.
18 **
19 */
20 class Session
22 {
23  public:
24 
25  Session() {}
26 
27  /*!
28  ** \brief Open a database
29  **
30  */
31  bool open( const std::string & _path );
32 
33  /*!
34  ** \brief Check GnuCashew Extensions
35  **
36  ** This examines the database tables to determine if the necessary
37  ** modifications have been made to the database to support the
38  ** GnuCashew Extensions.
39  **
40  */
42 
43  /*!
44  ** \brief Add GnuCashew Extensions
45  **
46  ** This makes the necessary modifications to the database to include
47  ** the extensions necessary to support the GnuCashew attributes.
48  **
49  ** This function can be called repeatedly, as it will check for the
50  ** presense of each attribute before it is added.
51  **
52  */
54 
55  bool gnucashIsOpen() const;
56  void openGnucash();
57  void closeGnucash();
58 
59  auto users()-> Wt::Auth::AbstractUserDatabase & { return *m_users; }
60  auto login()-> Wt::Auth::Login & { return m_login; }
61 
62  private:
63 
64  std::unique_ptr< GCW::Dbo::Users::UserDatabase > m_users;
65  Wt::Auth::Login m_login;
66 
67 }; // endclass Session
68 
69  } // endnamespace GnuCashew {
70  } // endnamespace Dbo {
71 } // endnamespace GCW {
72 
73 #endif // end#ifndef __SESSIONGNUCASHEW_H___
74 
75 
GnuCash Native Session.
bool addGnuCashewExtensions()
Add GnuCashew Extensions.
auto login() -> Wt::Auth::Login &
auto users() -> Wt::Auth::AbstractUserDatabase &
bool open(const std::string &_path)
Open a database.
std::unique_ptr< GCW::Dbo::Users::UserDatabase > m_users
bool hasGnuCashewExtensions()
Check GnuCashew Extensions.
Definition: App.h:17