summaryrefslogtreecommitdiff
path: root/source4/lib/appweb/ejs-2.0/ejs/system/ejsSystemApp.c
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2006-09-26 16:58:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:20:21 -0500
commit77e8402dd68079c0e245fc8826daf2c6ad334766 (patch)
tree64f65c7d3fb7f3aa970311f70e3f8bae4c0fc40c /source4/lib/appweb/ejs-2.0/ejs/system/ejsSystemApp.c
parent06de0f0b743056ba845de000339d4c3beb7cb845 (diff)
downloadsamba-77e8402dd68079c0e245fc8826daf2c6ad334766.tar.gz
samba-77e8402dd68079c0e245fc8826daf2c6ad334766.tar.bz2
samba-77e8402dd68079c0e245fc8826daf2c6ad334766.zip
r18925: Add current snapshot of the ejs-2.0 code. Tridge, will you be incorporating this?
(This used to be commit 917af234a8d517f82bd42256a940608a16b988f4)
Diffstat (limited to 'source4/lib/appweb/ejs-2.0/ejs/system/ejsSystemApp.c')
-rw-r--r--source4/lib/appweb/ejs-2.0/ejs/system/ejsSystemApp.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/source4/lib/appweb/ejs-2.0/ejs/system/ejsSystemApp.c b/source4/lib/appweb/ejs-2.0/ejs/system/ejsSystemApp.c
new file mode 100644
index 0000000000..e2f1ceb363
--- /dev/null
+++ b/source4/lib/appweb/ejs-2.0/ejs/system/ejsSystemApp.c
@@ -0,0 +1,49 @@
+/*
+ * @file ejsSystemApp.c
+ * @brief App class
+ */
+/********************************** Copyright *********************************/
+/*
+ * Copyright (c) Mbedthis Software Inc, 2005-2006. All Rights Reserved.
+ */
+/********************************** Includes **********************************/
+
+#include "ejs.h"
+
+/************************************ Code ************************************/
+
+int ejsDefineAppClass(Ejs *ep)
+{
+ EjsVar *appClass;
+
+ appClass = ejsDefineClass(ep, "System.App", "Object", 0);
+ if (appClass == 0) {
+ return MPR_ERR_CANT_INITIALIZE;
+ }
+
+ /*
+ * Define properties
+ */
+ ejsSetPropertyToString(ep, appClass, "name", BLD_PRODUCT);
+ ejsSetPropertyToString(ep, appClass, "title", BLD_NAME);
+ ejsSetPropertyToString(ep, appClass, "version", BLD_VERSION);
+
+ /*
+ * Command line arguments
+ */
+ ejsSetPropertyToNull(ep, appClass, "args");
+
+ return ejsObjHasErrors(appClass) ? MPR_ERR_CANT_INITIALIZE : 0;
+}
+
+/******************************************************************************/
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim:tw=78
+ * vim600: sw=4 ts=4 fdm=marker
+ * vim<600: sw=4 ts=4
+ */