Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-02-16 12:22:33 +0000
committerStijn Buys <ingar@osirion.org>2008-02-16 12:22:33 +0000
commitd6ee7ec642cc6b3097c8d321a1a00630e24027d1 (patch)
tree35f56e5168cc3e12724898b9efb81b4b2938f575 /src/core/application.h
parent715d0c3952a3a1d59b64074e472d0a9a3b414351 (diff)
initial client-to-server connection
Diffstat (limited to 'src/core/application.h')
-rw-r--r--src/core/application.h36
1 files changed, 29 insertions, 7 deletions
diff --git a/src/core/application.h b/src/core/application.h
index 9a531de..5bdc6ef 100644
--- a/src/core/application.h
+++ b/src/core/application.h
@@ -9,6 +9,8 @@
#include "core/cvar.h"
#include "core/netserver.h"
+#include "core/netconnection.h"
+#include "core/gameinterface.h"
namespace core
{
@@ -16,6 +18,12 @@ namespace core
/// cvar to indicate dedicated server status
extern Cvar sv_dedicated;
+/// cvar to indicate private server status
+/**
+ * A private server is a client with server cababilities.
+ */
+extern Cvar sv_private;
+
/// core interface for the client and server Application classes
class Application
{
@@ -35,26 +43,40 @@ public:
/// run a core frame
virtual void frame(float seconds);
- /// a pointer to the current console instance
+ /// a pointer to the current application instance
static Application *instance();
/// quit the application
virtual void quit(int status);
- /// load the game module
- void connect();
+ /// start the server or connect to remote host
+ void connect(std::string const &host);
/// disconnect from the game module
void disconnect();
- /// time the core has been running, in seconds
- float current_time;
+ /// time the has been connected, in seconds
+ float time() const;
- /// global application object
- static Application *application_instance;
+ /// preloaded game object
+ GameInterface *gameinterface_preload;
+
+ /// true if the core is connected to a game module or a remote server
+ bool connected() const;
/// network server instance
NetServer *netserver;
+
+ /// network client to server connection
+ NetConnection netconnection;
+
+ /// global application object
+ static Application *application_instance;
+
+private:
+ /// time the core has been running
+ float game_time;
+
};