project_files/frontlib/net/netconn_internal.h
changeset 7275 15f722e0b96f
parent 7273 8eed495fd8da
child 7314 6171f0bad318
--- a/project_files/frontlib/net/netconn_internal.h	Mon Jun 25 15:21:18 2012 +0200
+++ b/project_files/frontlib/net/netconn_internal.h	Wed Jun 27 18:02:45 2012 +0200
@@ -20,14 +20,21 @@
 struct _flib_netconn {
 	flib_netbase *netBase;
 	char *playerName;
+	char *dataDirPath;
+
+	int netconnState;			// One of the NETCONN_STATE constants
+	bool isAdmin;				// Player is server administrator
+
 	flib_cfg_meta *metaCfg;
-	flib_roomlist *roomList;
+	flib_roomlist roomList;
 
-	int netconnState;	// One of the NETCONN_STATE constants
-
-	bool isAdmin;			// Player is server administrator
-	bool isChief;			// Player can modify the current room
-	flib_map *map;			// Map settings in the current room.
+	bool isChief;				// Player can modify the current room
+	flib_map *map;
+	flib_teamlist pendingTeamlist;
+	flib_teamlist teamlist;
+	flib_cfg *scheme;
+	char *script;
+	flib_weaponset *weaponset;
 
 	void (*onMessageCb)(void *context, int msgtype, const char *msg);
 	void *onMessageCtx;
@@ -38,13 +45,13 @@
 	void (*onDisconnectedCb)(void *context, int reason, const char *message);
 	void *onDisconnectedCtx;
 
-	void (*onRoomAddCb)(void *context, const flib_roomlist_room *room);
+	void (*onRoomAddCb)(void *context, const flib_room *room);
 	void *onRoomAddCtx;
 
 	void (*onRoomDeleteCb)(void *context, const char *name);
 	void *onRoomDeleteCtx;
 
-	void (*onRoomUpdateCb)(void *context, const char *oldName, const flib_roomlist_room *room);
+	void (*onRoomUpdateCb)(void *context, const char *oldName, const flib_room *room);
 	void *onRoomUpdateCtx;
 
 	void (*onChatCb)(void *context, const char *nick, const char *msg);
@@ -95,10 +102,10 @@
 	void (*onHogCountChangedCb)(void *context, const char *teamName, int hogs);
 	void *onHogCountChangedCtx;
 
-	void (*onTeamColorChangedCb)(void *context, const char *teamName, uint32_t colorRGB);
+	void (*onTeamColorChangedCb)(void *context, const char *teamName, int colorIndex);
 	void *onTeamColorChangedCtx;
 
-	void (*onEngineMessageCb)(void *context, const char *message, int size);
+	void (*onEngineMessageCb)(void *context, const uint8_t *message, size_t size);
 	void *onEngineMessageCtx;
 
 	void (*onCfgSchemeCb)(void *context, flib_cfg *scheme);
@@ -123,6 +130,11 @@
 	bool destroyRequested;
 };
 
-void clearCallbacks(flib_netconn *conn);
+void netconn_clearCallbacks(flib_netconn *conn);
+void netconn_leaveRoom(flib_netconn *conn);
+void netconn_setMap(flib_netconn *conn, const flib_map *map);
+void netconn_setWeaponset(flib_netconn *conn, const flib_weaponset *weaponset);
+void netconn_setScript(flib_netconn *conn, const char *script);
+void netconn_setScheme(flib_netconn *conn, const flib_cfg *scheme);
 
 #endif