diff options
author | Diva Canto | 2010-01-02 09:54:46 -0800 |
---|---|---|
committer | Diva Canto | 2010-01-02 09:54:46 -0800 |
commit | dbb16bf2db533d54d3be11a6a878909e237e3924 (patch) | |
tree | 2e2d112b4d5c56b94cdc8e263c673ed01be180f3 /OpenSim/Services/Interfaces/IAvatarService.cs | |
parent | The Library Service is now working. UserProfileCacheService.LibraryRoot is ob... (diff) | |
download | opensim-SC-dbb16bf2db533d54d3be11a6a878909e237e3924.zip opensim-SC-dbb16bf2db533d54d3be11a6a878909e237e3924.tar.gz opensim-SC-dbb16bf2db533d54d3be11a6a878909e237e3924.tar.bz2 opensim-SC-dbb16bf2db533d54d3be11a6a878909e237e3924.tar.xz |
* Forgotten ILibraryService from yesterday
* New IAvatarService -- first pass
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/Interfaces/IAvatarService.cs | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs new file mode 100644 index 0000000..7324c74 --- /dev/null +++ b/OpenSim/Services/Interfaces/IAvatarService.cs | |||
@@ -0,0 +1,94 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | |||
31 | using OpenSim.Framework; | ||
32 | |||
33 | using OpenMetaverse; | ||
34 | |||
35 | namespace OpenSim.Services.Interfaces | ||
36 | { | ||
37 | public interface IAvatarService | ||
38 | { | ||
39 | /// <summary> | ||
40 | /// Called by the login service | ||
41 | /// </summary> | ||
42 | /// <param name="userID"></param> | ||
43 | /// <returns></returns> | ||
44 | IAvatarData GetAvatar(UUID userID); | ||
45 | |||
46 | /// <summary> | ||
47 | /// Called by everyone who can change the avatar data (so, regions) | ||
48 | /// </summary> | ||
49 | /// <param name="userID"></param> | ||
50 | /// <param name="avatar"></param> | ||
51 | /// <returns></returns> | ||
52 | bool SetAvatar(UUID userID, IAvatarData avatar); | ||
53 | |||
54 | /// <summary> | ||
55 | /// Not sure if it's needed | ||
56 | /// </summary> | ||
57 | /// <param name="userID"></param> | ||
58 | /// <returns></returns> | ||
59 | bool ResetAvatar(UUID userID); | ||
60 | |||
61 | /// <summary> | ||
62 | /// These 3 methods raison d'etre: | ||
63 | /// No need to send the entire avatar data (SetAvatar) for changing attachments | ||
64 | /// </summary> | ||
65 | /// <param name="userID"></param> | ||
66 | /// <param name="attach"></param> | ||
67 | /// <returns></returns> | ||
68 | bool SetAttachment(UUID userID, AttachmentData attach); | ||
69 | bool SetAttachments(UUID userID, List<AttachmentData> attachs); | ||
70 | bool Dettach(UUID userID, UUID id); | ||
71 | } | ||
72 | |||
73 | /// <summary> | ||
74 | /// Each region/client that uses avatars will have a data structure | ||
75 | /// of this type representing the avatars. | ||
76 | /// </summary> | ||
77 | public interface IAvatarData | ||
78 | { | ||
79 | // Not sure what to do with the non-attachment data | ||
80 | // That data is highly dependent on the implementation of avatars | ||
81 | // and I doubt it can be abstracted into this interface. | ||
82 | // Maybe it will never be here. Maybe that data needs to | ||
83 | // be processed by a module instead of being processed in | ||
84 | // the Scenes core code. | ||
85 | |||
86 | AttachmentData GetAttachment(int attachPoint); | ||
87 | List<AttachmentData> GetAttachments(); | ||
88 | int GetAttachmentPoint(UUID id); | ||
89 | |||
90 | bool SetAttachment(AttachmentData attach); | ||
91 | bool SetAttachments(List<AttachmentData> attachs); | ||
92 | bool Dettach(UUID id); | ||
93 | } | ||
94 | } | ||