29 using System.Reflection;
33 using OpenSim.Server.Base;
34 using OpenSim.Services.Interfaces;
35 using OpenSim.Services.UserAccountService;
38 using OpenMetaverse.StructuredData;
39 using OpenSim.Framework;
41 namespace OpenSim.Services.ProfilesService
45 static readonly ILog m_log =
47 MethodBase.GetCurrentMethod().DeclaringType);
52 base(config, configName)
54 IConfig Config = config.Configs[configName];
57 m_log.Warn(
"[PROFILES SERVICE]: No configuration found!");
62 args =
new Object[] { config };
63 string accountService = Config.GetString(
"UserAccountService", String.Empty);
64 if (accountService !=
string.Empty)
67 args =
new Object[] { config };
73 OSDArray records = ProfilesData.GetClassifiedRecords(creatorId);
80 if(!ProfilesData.UpdateClassifiedRecord(ad, ref result))
90 if(ProfilesData.DeleteClassifiedRecord(recordId))
98 if(ProfilesData.GetClassifiedInfo(ref ad, ref result))
103 #endregion Classifieds
108 OSDArray records = ProfilesData.GetAvatarPicks(creatorId);
115 pick = ProfilesData.GetPickInfo(pick.CreatorId, pick.PickId);
122 return ProfilesData.UpdatePicksRecord(pick);
127 return ProfilesData.DeletePicksRecord(pickId);
134 return ProfilesData.GetAvatarNotes(ref note);
139 return ProfilesData.UpdateAvatarNotes(ref note, ref result);
143 #region Profile Properties
146 return ProfilesData.GetAvatarProperties(ref prop, ref result);
151 return ProfilesData.UpdateAvatarProperties(ref prop, ref result);
153 #endregion Profile Properties
158 return ProfilesData.UpdateAvatarInterests(prop, ref result);
163 #region User Preferences
166 if(
string.IsNullOrEmpty(pref.EMail))
173 account = userAccounts.GetUserAccount(UUID.Zero, pref.UserId);
174 if(
string.IsNullOrEmpty(account.
Email))
176 pref.EMail = string.Empty;
179 pref.EMail = account.Email;
183 m_log.Error (
"[PROFILES SERVICE]: UserAccountService Exception: Could not get user account");
184 result =
"UserAccountService settings error in UserProfileService!";
190 m_log.Error (
"[PROFILES SERVICE]: UserAccountService: Could not get user account");
191 result =
"UserAccountService settings error in UserProfileService!";
195 return ProfilesData.UpdateUserPreferences(ref pref, ref result);
200 if (!ProfilesData.GetUserPreferences(ref pref, ref result))
203 if(
string.IsNullOrEmpty(pref.EMail))
210 account = userAccounts.GetUserAccount(UUID.Zero, pref.UserId);
211 if(
string.IsNullOrEmpty(account.
Email))
213 pref.EMail = string.Empty;
217 pref.EMail = account.Email;
218 UserPreferencesUpdate(ref pref, ref result);
223 m_log.Error (
"[PROFILES SERVICE]: UserAccountService Exception: Could not get user account");
224 result =
"UserAccountService settings error in UserProfileService!";
230 m_log.Error (
"[PROFILES SERVICE]: UserAccountService: Could not get user account");
231 result =
"UserAccountService settings error in UserProfileService!";
236 if(
string.IsNullOrEmpty(pref.EMail))
237 pref.EMail =
"No Email Address On Record";
241 #endregion User Preferences
247 OSDArray records = ProfilesData.GetUserImageAssets(avatarId);
255 return ProfilesData.GetUserAppData(ref prop, ref result);
OSD AvatarPicksRequest(UUID creatorId)
bool RequestUserAppData(ref UserAppData prop, ref string result)
bool AvatarPropertiesRequest(ref UserProfileProperties prop, ref string result)
OpenMetaverse.StructuredData.OSDArray OSDArray
bool NotesUpdate(ref UserProfileNotes note, ref string result)
bool PickInfoRequest(ref UserProfilePick pick, ref string result)
UserAccountService(IConfigSource config)
bool ClassifiedDelete(UUID recordId)
bool SetUserAppData(UserAppData prop, ref string result)
bool UserPreferencesRequest(ref UserPreferences pref, ref string result)
bool AvatarInterestsUpdate(UserProfileProperties prop, ref string result)
bool UserPreferencesUpdate(ref UserPreferences pref, ref string result)
bool ClassifiedUpdate(UserClassifiedAdd ad, ref string result)
bool AvatarPropertiesUpdate(ref UserProfileProperties prop, ref string result)
OpenMetaverse.StructuredData.OSD OSD
bool PicksDelete(UUID pickId)
bool AvatarNotesRequest(ref UserProfileNotes note)
Interactive OpenSim region server
bool PicksUpdate(ref UserProfilePick pick, ref string result)
UserProfilesService(IConfigSource config, string configName)
OSD AvatarImageAssetsRequest(UUID avatarId)
OSD AvatarClassifiedsRequest(UUID creatorId)
bool ClassifiedInfoRequest(ref UserClassifiedAdd ad, ref string result)