diff options
author | Adam Frisby | 2007-05-20 14:21:55 +0000 |
---|---|---|
committer | Adam Frisby | 2007-05-20 14:21:55 +0000 |
commit | 601beec8b36b5b069885bd2e74e0e3cbf601c49e (patch) | |
tree | 96e934da948f7bfa3893dba7a81c8dbb17d67948 /OpenGrid.Framework.Data.MySQL | |
parent | * Reverted libterrain update (diff) | |
download | opensim-SC_OLD-601beec8b36b5b069885bd2e74e0e3cbf601c49e.zip opensim-SC_OLD-601beec8b36b5b069885bd2e74e0e3cbf601c49e.tar.gz opensim-SC_OLD-601beec8b36b5b069885bd2e74e0e3cbf601c49e.tar.bz2 opensim-SC_OLD-601beec8b36b5b069885bd2e74e0e3cbf601c49e.tar.xz |
* Updated UserAgentData class, adding new properties, modifying existing ones datatypes.
* Added read-only support for new userserver to MySQL Data Interface. (TODO: Add write capabilities to the Agent table.)
* Added new regionMapTextureID support to MySQL Data server. (thanks MorphW!)
Diffstat (limited to 'OpenGrid.Framework.Data.MySQL')
-rw-r--r-- | OpenGrid.Framework.Data.MySQL/MySQLManager.cs | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/OpenGrid.Framework.Data.MySQL/MySQLManager.cs b/OpenGrid.Framework.Data.MySQL/MySQLManager.cs index e4622a8..a476e97 100644 --- a/OpenGrid.Framework.Data.MySQL/MySQLManager.cs +++ b/OpenGrid.Framework.Data.MySQL/MySQLManager.cs | |||
@@ -118,6 +118,87 @@ namespace OpenGrid.Framework.Data.MySQL | |||
118 | retval.regionUserURI = (string)reader["regionUserURI"]; | 118 | retval.regionUserURI = (string)reader["regionUserURI"]; |
119 | retval.regionUserRecvKey = (string)reader["regionUserRecvKey"]; | 119 | retval.regionUserRecvKey = (string)reader["regionUserRecvKey"]; |
120 | retval.regionUserSendKey = (string)reader["regionUserSendKey"]; | 120 | retval.regionUserSendKey = (string)reader["regionUserSendKey"]; |
121 | |||
122 | // World Map Addition | ||
123 | retval.regionMapTextureID = new libsecondlife.LLUUID((string)reader["regionMapTexture"]); | ||
124 | } | ||
125 | else | ||
126 | { | ||
127 | return null; | ||
128 | } | ||
129 | return retval; | ||
130 | } | ||
131 | |||
132 | public UserAgentData getAgentRow(IDataReader reader) | ||
133 | { | ||
134 | UserAgentData retval = new UserAgentData(); | ||
135 | |||
136 | if (reader.Read()) | ||
137 | { | ||
138 | // Agent IDs | ||
139 | retval.UUID = new libsecondlife.LLUUID((string)reader["UUID"]); | ||
140 | retval.sessionID = new libsecondlife.LLUUID((string)reader["sessionID"]); | ||
141 | retval.secureSessionID = new libsecondlife.LLUUID((string)reader["secureSessionID"]); | ||
142 | |||
143 | // Agent Who? | ||
144 | retval.agentIP = (string)reader["agentIP"]; | ||
145 | retval.agentPort = Convert.ToUInt32(reader["agentPort"].ToString()); | ||
146 | retval.agentOnline = Convert.ToBoolean(reader["agentOnline"].ToString()); | ||
147 | |||
148 | // Login/Logout times (UNIX Epoch) | ||
149 | retval.loginTime = Convert.ToInt32(reader["loginTime"].ToString()); | ||
150 | retval.logoutTime = Convert.ToInt32(reader["logoutTime"].ToString()); | ||
151 | |||
152 | // Current position | ||
153 | retval.currentRegion = (string)reader["currentRegion"]; | ||
154 | retval.currentHandle = Convert.ToUInt64(reader["currentHandle"].ToString()); | ||
155 | libsecondlife.LLVector3.TryParse((string)reader["currentPos"], out retval.currentPos); | ||
156 | } | ||
157 | else | ||
158 | { | ||
159 | return null; | ||
160 | } | ||
161 | return retval; | ||
162 | } | ||
163 | |||
164 | public UserProfileData getUserRow(IDataReader reader) | ||
165 | { | ||
166 | UserProfileData retval = new UserProfileData(); | ||
167 | |||
168 | if (reader.Read()) | ||
169 | { | ||
170 | retval.UUID = new libsecondlife.LLUUID((string)reader["UUID"]); | ||
171 | retval.username = (string)reader["username"]; | ||
172 | retval.surname = (string)reader["lastname"]; | ||
173 | |||
174 | retval.passwordHash = (string)reader["passwordHash"]; | ||
175 | retval.passwordSalt = (string)reader["passwordSalt"]; | ||
176 | |||
177 | retval.homeRegion = Convert.ToUInt64(reader["homeRegion"].ToString()); | ||
178 | retval.homeLocation = new libsecondlife.LLVector3( | ||
179 | Convert.ToSingle(reader["homeLocationX"].ToString()), | ||
180 | Convert.ToSingle(reader["homeLocationY"].ToString()), | ||
181 | Convert.ToSingle(reader["homeLocationZ"].ToString())); | ||
182 | retval.homeLookAt = new libsecondlife.LLVector3( | ||
183 | Convert.ToSingle(reader["homeLookAtX"].ToString()), | ||
184 | Convert.ToSingle(reader["homeLookAtY"].ToString()), | ||
185 | Convert.ToSingle(reader["homeLookAtZ"].ToString())); | ||
186 | |||
187 | retval.created = Convert.ToInt32(reader["created"].ToString()); | ||
188 | retval.lastLogin = Convert.ToInt32(reader["lastLogin"].ToString()); | ||
189 | |||
190 | retval.userInventoryURI = (string)reader["userInventoryURI"]; | ||
191 | retval.userAssetURI = (string)reader["userAssetURI"]; | ||
192 | |||
193 | retval.profileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString()); | ||
194 | retval.profileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString()); | ||
195 | |||
196 | retval.profileAboutText = (string)reader["profileAboutText"]; | ||
197 | retval.profileFirstText = (string)reader["profileFirstText"]; | ||
198 | |||
199 | retval.profileImage = new libsecondlife.LLUUID((string)reader["profileImage"]); | ||
200 | retval.profileFirstImage = new libsecondlife.LLUUID((string)reader["profileFirstImage"]); | ||
201 | |||
121 | } | 202 | } |
122 | else | 203 | else |
123 | { | 204 | { |