corrade-vassal – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 vero 1 /*
2 * Copyright (c) 2006-2014, openmetaverse.org
3 * All rights reserved.
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 *
8 * - Redistributions of source code must retain the above copyright notice, this
9 * list of conditions and the following disclaimer.
10 * - Neither the name of the openmetaverse.org nor the names
11 * of its contributors may be used to endorse or promote products derived from
12 * this software without specific prior written permission.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
18 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24 * POSSIBILITY OF SUCH DAMAGE.
25 */
26  
27 using System;
28  
29 namespace OpenMetaverse
30 {
31 /// <summary>
32 /// Main class to expose grid functionality to clients. All of the
33 /// classes needed for sending and receiving data are accessible through
34 /// this class.
35 /// </summary>
36 /// <example>
37 /// <code>
38 /// // Example minimum code required to instantiate class and
39 /// // connect to a simulator.
40 /// using System;
41 /// using System.Collections.Generic;
42 /// using System.Text;
43 /// using OpenMetaverse;
44 ///
45 /// namespace FirstBot
46 /// {
47 /// class Bot
48 /// {
49 /// public static GridClient Client;
50 /// static void Main(string[] args)
51 /// {
52 /// Client = new GridClient(); // instantiates the GridClient class
53 /// // to the global Client object
54 /// // Login to Simulator
55 /// Client.Network.Login("FirstName", "LastName", "Password", "FirstBot", "1.0");
56 /// // Wait for a Keypress
57 /// Console.ReadLine();
58 /// // Logout of simulator
59 /// Client.Network.Logout();
60 /// }
61 /// }
62 /// }
63 /// </code>
64 /// </example>
65 public class GridClient
66 {
67 /// <summary>Networking subsystem</summary>
68 public NetworkManager Network;
69 /// <summary>Settings class including constant values and changeable
70 /// parameters for everything</summary>
71 public Settings Settings;
72 /// <summary>Parcel (subdivided simulator lots) subsystem</summary>
73 public ParcelManager Parcels;
74 /// <summary>Our own avatars subsystem</summary>
75 public AgentManager Self;
76 /// <summary>Other avatars subsystem</summary>
77 public AvatarManager Avatars;
78 /// <summary>Estate subsystem</summary>
79 public EstateTools Estate;
80 /// <summary>Friends list subsystem</summary>
81 public FriendsManager Friends;
82 /// <summary>Grid (aka simulator group) subsystem</summary>
83 public GridManager Grid;
84 /// <summary>Object subsystem</summary>
85 public ObjectManager Objects;
86 /// <summary>Group subsystem</summary>
87 public GroupManager Groups;
88 /// <summary>Asset subsystem</summary>
89 public AssetManager Assets;
90 /// <summary>Appearance subsystem</summary>
91 public AppearanceManager Appearance;
92 /// <summary>Inventory subsystem</summary>
93 public InventoryManager Inventory;
94 /// <summary>Directory searches including classifieds, people, land
95 /// sales, etc</summary>
96 public DirectoryManager Directory;
97 /// <summary>Handles land, wind, and cloud heightmaps</summary>
98 public TerrainManager Terrain;
99 /// <summary>Handles sound-related networking</summary>
100 public SoundManager Sound;
101 /// <summary>Throttling total bandwidth usage, or allocating bandwidth
102 /// for specific data stream types</summary>
103 public AgentThrottle Throttle;
104  
105 public Stats.UtilizationStatistics Stats;
106 /// <summary>
107 /// Default constructor
108 /// </summary>
109 public GridClient()
110 {
111 // Initialise SmartThreadPool when using mono
112 if (Type.GetType("Mono.Runtime") != null)
113 {
114 WorkPool.Init(true);
115 }
116  
117 // These are order-dependant
118 Network = new NetworkManager(this);
119 Settings = new Settings(this);
120 Parcels = new ParcelManager(this);
121 Self = new AgentManager(this);
122 Avatars = new AvatarManager(this);
123 Estate = new EstateTools(this);
124 Friends = new FriendsManager(this);
125 Grid = new GridManager(this);
126 Objects = new ObjectManager(this);
127 Groups = new GroupManager(this);
128 Assets = new AssetManager(this);
129 Appearance = new AppearanceManager(this);
130 Inventory = new InventoryManager(this);
131 Directory = new DirectoryManager(this);
132 Terrain = new TerrainManager(this);
133 Sound = new SoundManager(this);
134 Throttle = new AgentThrottle(this);
135 Stats = new OpenMetaverse.Stats.UtilizationStatistics();
136 }
137  
138 /// <summary>
139 /// Return the full name of this instance
140 /// </summary>
141 /// <returns>Client avatars full name</returns>
142 public override string ToString()
143 {
144 return Self.Name;
145 }
146 }
147 }