summaryrefslogtreecommitdiff
path: root/source4/lib/appweb/ejs-2.0/ejs/system/ejsSystemApp.c
blob: e2f1ceb363b4d06c266c638face59d3846f424bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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
 */