Planeshift
clientstatuslogger.h
Go to the documentation of this file.
1 /*
2  * clientstatuslogger.h - Author: Dewitt Colclough <dewitt@twcny.rr.com>
3  *
4  * Copyright (C) 2004 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5  *
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation (version 2 of the License)
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  */
21 #ifndef __CLIENTSTATUSLOGGER_H__
22 #define __CLIENTSTATUSLOGGER_H__
23 
24 #include <iutil/document.h>
25 
26 class Client;
27 
32 {
33 public:
34  void LogClientInfo(Client* client);
35 
36  ClientStatusLogger(iDocumentNode* statusNode);
37 private:
38  csRef<iDocumentNode> statusRootNode;
39  csTicks startTime;
40 
41  void AddBasicNode(iDocumentNode* parent, const char* fieldName, const char* text);
42  void AddBasicNode(iDocumentNode* parent, const char* fieldName, int data);
43  csPtr<iDocumentNode> AddContainerNode(iDocumentNode* parent, const char* fieldName);
44 
45  void LogBasicInfo(Client* client, iDocumentNode* node);
46  void LogConnectionInfo(Client* client, iDocumentNode* node);
47  void LogGuildInfo(Client* client, iDocumentNode* node);
48 
50 };
51 
52 #endif
53 
This class collects data of a netclient.
Definition: client.h:95
void LogClientInfo(Client *client)
write client status info to doc
Logs client status to document.