From 84a3e2f6bcb4da4ab156e39d79f0f8a36c2a0e90 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 18 Apr 2015 14:32:27 +0200 Subject: added placeholders for directories added user app and content (empty for now) added storage and sqlite script --- src/content.hpp | 1 + src/strusCms.cpp | 5 ++++- src/strusCms.hpp | 3 +++ src/user.cpp | 21 +++++++++++++++++++++ src/user.hpp | 16 +++++++++------- src/user_content.hpp | 13 +++++++++++++ 6 files changed, 51 insertions(+), 8 deletions(-) create mode 100644 src/user.cpp create mode 100644 src/user_content.hpp (limited to 'src') diff --git a/src/content.hpp b/src/content.hpp index 13cc61d..ad8753d 100644 --- a/src/content.hpp +++ b/src/content.hpp @@ -3,5 +3,6 @@ #include "master_content.hpp" #include "intro_content.hpp" +#include "user_content.hpp" #endif diff --git a/src/strusCms.cpp b/src/strusCms.cpp index 64cc235..db715f4 100644 --- a/src/strusCms.cpp +++ b/src/strusCms.cpp @@ -8,12 +8,15 @@ namespace apps { strusCms::strusCms( cppcms::service &srv ) : cppcms::application( srv ), - intro( *this ) + conn( settings( ).get( "strusCms.db_connection" ) ), + intro( *this ), + user( *this ) { locale_name = "en"; script = settings( ).get( "strusCms.script" ); add( intro ); + add( user ); mapper( ).root( "/strusCms" ); } diff --git a/src/strusCms.hpp b/src/strusCms.hpp index db7f0d9..539833e 100644 --- a/src/strusCms.hpp +++ b/src/strusCms.hpp @@ -4,6 +4,7 @@ #include #include "intro.hpp" +#include "user.hpp" namespace apps { @@ -15,8 +16,10 @@ class strusCms : public cppcms::application { private: std::string script; std::string locale_name; + std::string conn; apps::intro intro; + apps::user user; }; } diff --git a/src/user.cpp b/src/user.cpp new file mode 100644 index 0000000..746e123 --- /dev/null +++ b/src/user.cpp @@ -0,0 +1,21 @@ +#include "content.hpp" +#include "user.hpp" +#include "strusCms.hpp" + +#include +#include + +namespace apps { + +user::user( strusCms &cms ) + : master( cms ) +{ + cms.dispatcher( ).assign( "/login", &user::login, this ); + cms.mapper( ).assign( "/login" ); +} + +void user::login( ) +{ +} + +} diff --git a/src/user.hpp b/src/user.hpp index 99a0894..041585e 100644 --- a/src/user.hpp +++ b/src/user.hpp @@ -1,14 +1,16 @@ -#ifndef USER_CONTENT_HPP -#define USER_CONTENT_HPP +#ifndef USER_HPP +#define USER_HPP -#include +#include "master.hpp" -#include +namespace apps { -namespace content { +class user : public master { + public: + user( strusCms &cms ); -struct user : public cppcms::base_content { - std::string title; + private: + void login( ); }; } diff --git a/src/user_content.hpp b/src/user_content.hpp new file mode 100644 index 0000000..cac0755 --- /dev/null +++ b/src/user_content.hpp @@ -0,0 +1,13 @@ +#ifndef USER_CONTENT_HPP +#define USER_CONTENT_HPP + +#include "master.hpp" + +namespace content { + +struct user : public master { +}; + +} + +#endif -- cgit v1.2.3-54-g00ecf