Resolve "Toggle Free Look with Hotkey"
[ryzomcore.git] / ryzom / server / src / input_output_service / ios_pd.cpp
blobf2abed5aae170e663634ba151fb54a5865a395a9
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 #include "stdpch.h"
20 #include "ios_pd.h"
22 namespace IOSPD
25 RY_PDS::CPDSLib PDSLib;
26 void init(uint32 overrideDbId)
28 // Init CreateTeam log message and parameters
29 PDSLib.initLog(0);
30 PDSLib.initLogParam(0, 0, 8);
31 // Init DeleteTeam log message and parameters
32 PDSLib.initLog(1);
33 PDSLib.initLogParam(1, 0, 8);
34 // Init PlayerJoinsTeam log message and parameters
35 PDSLib.initLog(2);
36 PDSLib.initLogParam(2, 0, 8);
37 PDSLib.initLogParam(2, 1, 8);
38 // Init PlayerLeavesTeam log message and parameters
39 PDSLib.initLog(3);
40 PDSLib.initLogParam(3, 0, 8);
41 PDSLib.initLogParam(3, 1, 8);
42 std::string xmlDescription;
43 xmlDescription += "<?xml version='1.0'?>\n";
44 xmlDescription += "<dbdescription version='0.0'>\n";
45 xmlDescription += "<db name='IOSPD' types='15' classes='0'>\n";
46 xmlDescription += "<typedef name='bool' id='0' size='1' storage='bool' type='type'/>\n";
47 xmlDescription += "<typedef name='char' id='1' size='1' storage='char' type='type'/>\n";
48 xmlDescription += "<typedef name='ucchar' id='2' size='2' storage='ucchar' type='type'/>\n";
49 xmlDescription += "<typedef name='uint8' id='3' size='1' storage='uint8' type='type'/>\n";
50 xmlDescription += "<typedef name='sint8' id='4' size='1' storage='sint8' type='type'/>\n";
51 xmlDescription += "<typedef name='uint16' id='5' size='2' storage='uint16' type='type'/>\n";
52 xmlDescription += "<typedef name='sint16' id='6' size='2' storage='sint16' type='type'/>\n";
53 xmlDescription += "<typedef name='uint32' id='7' size='4' storage='uint32' type='type'/>\n";
54 xmlDescription += "<typedef name='sint32' id='8' size='4' storage='sint32' type='type'/>\n";
55 xmlDescription += "<typedef name='uint64' id='9' size='8' storage='uint64' type='type'/>\n";
56 xmlDescription += "<typedef name='sint64' id='10' size='8' storage='sint64' type='type'/>\n";
57 xmlDescription += "<typedef name='float' id='11' size='4' storage='float' type='type'/>\n";
58 xmlDescription += "<typedef name='double' id='12' size='8' storage='double' type='type'/>\n";
59 xmlDescription += "<typedef name='CEntityId' id='13' size='8' storage='CEntityId' type='type'/>\n";
60 xmlDescription += "<typedef name='CSheetId' id='14' size='4' storage='CSheetId' type='type'/>\n";
61 xmlDescription += "<logmsg id='0' context='false'>\n";
62 xmlDescription += "<param id='0' typeid='13'/>\n";
63 xmlDescription += "<msg>Player team $0 created</msg>\n";
64 xmlDescription += "</logmsg>\n";
65 xmlDescription += "<logmsg id='1' context='false'>\n";
66 xmlDescription += "<param id='0' typeid='13'/>\n";
67 xmlDescription += "<msg>Player team $0 deleted</msg>\n";
68 xmlDescription += "</logmsg>\n";
69 xmlDescription += "<logmsg id='2' context='false'>\n";
70 xmlDescription += "<param id='0' typeid='13'/>\n";
71 xmlDescription += "<param id='1' typeid='13'/>\n";
72 xmlDescription += "<msg>Player $0 joins team $1</msg>\n";
73 xmlDescription += "</logmsg>\n";
74 xmlDescription += "<logmsg id='3' context='false'>\n";
75 xmlDescription += "<param id='0' typeid='13'/>\n";
76 xmlDescription += "<param id='1' typeid='13'/>\n";
77 xmlDescription += "<msg>Player $0 leaves team $1</msg>\n";
78 xmlDescription += "</logmsg>\n";
79 xmlDescription += "</db>\n";
80 xmlDescription += "</dbdescription>\n";
81 PDSLib.init(xmlDescription, overrideDbId);
84 bool ready()
86 return PDSLib.PDSReady();
89 void update()
91 PDSLib.update();
94 void logChat(const ucstring& sentence, const NLMISC::CEntityId& from, const std::vector<NLMISC::CEntityId>& to)
96 PDSLib.logChat(sentence, from, to);
99 void logTell(const ucstring& sentence, const NLMISC::CEntityId& from, const NLMISC::CEntityId& to)
101 std::vector<NLMISC::CEntityId> ids;
102 ids.push_back(to);
103 PDSLib.logChat(sentence, from, ids);
106 void release()
108 PDSLib.release();
112 } // End of IOSPD