summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2015-04-18 14:32:27 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2015-04-18 14:32:27 +0200
commit84a3e2f6bcb4da4ab156e39d79f0f8a36c2a0e90 (patch)
treea84f9620a087c3a2d924e5a14b404a88c0186d29 /src
parentde50c30a936b87d79f816790230856347b0dff7e (diff)
downloadaCms-84a3e2f6bcb4da4ab156e39d79f0f8a36c2a0e90.tar.gz
aCms-84a3e2f6bcb4da4ab156e39d79f0f8a36c2a0e90.tar.bz2
added placeholders for directories
added user app and content (empty for now) added storage and sqlite script
Diffstat (limited to 'src')
-rw-r--r--src/content.hpp1
-rw-r--r--src/strusCms.cpp5
-rw-r--r--src/strusCms.hpp3
-rw-r--r--src/user.cpp21
-rw-r--r--src/user.hpp16
-rw-r--r--src/user_content.hpp13
6 files changed, 51 insertions, 8 deletions
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<std::string>( "strusCms.db_connection" ) ),
+ intro( *this ),
+ user( *this )
{
locale_name = "en";
script = settings( ).get<std::string>( "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 <cppcms/application.h>
#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 <cppcms/url_dispatcher.h>
+#include <cppcms/url_mapper.h>
+
+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 <cppcms/view.h>
+#include "master.hpp"
-#include <string>
+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