diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLAvatarData.cs (renamed from OpenSim/Services/UserService/UserService.cs) | 53 |
1 files changed, 22 insertions, 31 deletions
diff --git a/OpenSim/Services/UserService/UserService.cs b/OpenSim/Data/MySQL/MySQLAvatarData.cs index e8b9fc3..5611302 100644 --- a/OpenSim/Services/UserService/UserService.cs +++ b/OpenSim/Data/MySQL/MySQLAvatarData.cs | |||
@@ -26,51 +26,42 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Reflection; | ||
30 | using Nini.Config; | ||
31 | using OpenSim.Data; | ||
32 | using OpenSim.Services.Interfaces; | ||
33 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Data; | ||
31 | using System.Reflection; | ||
32 | using System.Threading; | ||
33 | using log4net; | ||
34 | using OpenMetaverse; | 34 | using OpenMetaverse; |
35 | using OpenSim.Framework; | ||
36 | using MySql.Data.MySqlClient; | ||
35 | 37 | ||
36 | namespace OpenSim.Services.UserAccountService | 38 | namespace OpenSim.Data.MySQL |
37 | { | 39 | { |
38 | public class UserAccountService : UserAccountServiceBase, IUserAccountService | 40 | /// <summary> |
41 | /// A MySQL Interface for the Grid Server | ||
42 | /// </summary> | ||
43 | public class MySQLAvatarData : MySQLGenericTableHandler<AvatarBaseData>, | ||
44 | IAvatarData | ||
39 | { | 45 | { |
40 | public UserAccountService(IConfigSource config) : base(config) | 46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
41 | { | ||
42 | } | ||
43 | 47 | ||
44 | public UserAccount GetUserAccount(UUID scopeID, string firstName, | 48 | public MySQLAvatarData(string connectionString, string realm) : |
45 | string lastName) | 49 | base(connectionString, realm, "Avatar") |
46 | { | 50 | { |
47 | return null; | ||
48 | } | 51 | } |
49 | 52 | ||
50 | public UserAccount GetUserAccount(UUID scopeID, UUID userID) | 53 | public bool Delete(UUID principalID, string name) |
51 | { | 54 | { |
52 | return null; | 55 | MySqlCommand cmd = new MySqlCommand(); |
53 | } | ||
54 | 56 | ||
55 | public bool SetHomePosition(UserAccount data, UUID regionID, UUID regionSecret) | 57 | cmd.CommandText = String.Format("delete from {0} where `PrincipalID` = ?PrincipalID and `Name` = ?Name", m_Realm); |
56 | { | 58 | cmd.Parameters.AddWithValue("?PrincipalID", principalID.ToString()); |
57 | return false; | 59 | cmd.Parameters.AddWithValue("?Name", name); |
58 | } | ||
59 | 60 | ||
60 | public bool SetUserAccount(UserAccount data, UUID principalID, string token) | 61 | if (ExecuteNonQuery(cmd) > 0) |
61 | { | 62 | return true; |
62 | return false; | ||
63 | } | ||
64 | 63 | ||
65 | public bool CreateUserAccount(UserAccount data, UUID principalID, string token) | ||
66 | { | ||
67 | return false; | 64 | return false; |
68 | } | 65 | } |
69 | |||
70 | public List<UserAccount> GetUserAccount(UUID scopeID, | ||
71 | string query) | ||
72 | { | ||
73 | return null; | ||
74 | } | ||
75 | } | 66 | } |
76 | } | 67 | } |