2 // Radegast Metaverse Client
3 // Copyright (c) 2009-2014, Radegast Development Team
4 // All rights reserved.
6 // Redistribution and use in source and binary forms, with or without
7 // modification, are permitted provided that the following conditions are met:
9 // * Redistributions of source code must retain the above copyright notice,
10 // this list of conditions and the following disclaimer.
11 // * Redistributions in binary form must reproduce the above copyright
12 // notice, this list of conditions and the following disclaimer in the
13 // documentation and/or other materials provided with the distribution.
14 // * Neither the name of the application "Radegast", nor the names of its
15 // contributors may be used to endorse or promote products derived from
16 // this software without specific prior written permission.
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26 // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 namespace Radegast.Netcom
36 public partial class RadegastNetcom
38 // For the NetcomSync stuff
39 private delegate void OnClientLoginRaise(LoginProgressEventArgs e);
40 private delegate void OnClientLogoutRaise(EventArgs e);
41 private delegate void OnClientDisconnectRaise(DisconnectedEventArgs e);
42 private delegate void OnChatRaise(ChatEventArgs e);
43 private delegate void OnInstantMessageRaise(InstantMessageEventArgs e);
44 private delegate void OnAlertMessageRaise(AlertMessageEventArgs e);
45 private delegate void OnMoneyBalanceRaise(BalanceEventArgs e);
46 private delegate void OnTeleportStatusRaise(TeleportEventArgs e);
48 public event EventHandler<OverrideEventArgs> ClientLoggingIn;
49 public event EventHandler<LoginProgressEventArgs> ClientLoginStatus;
50 public event EventHandler<OverrideEventArgs> ClientLoggingOut;
51 public event EventHandler ClientLoggedOut;
52 public event EventHandler<DisconnectedEventArgs> ClientDisconnected;
53 public event EventHandler<ChatEventArgs> ChatReceived;
54 public event EventHandler<ChatSentEventArgs> ChatSent;
55 public event EventHandler<InstantMessageEventArgs> InstantMessageReceived;
56 public event EventHandler<InstantMessageSentEventArgs> InstantMessageSent;
57 public event EventHandler<TeleportingEventArgs> Teleporting;
58 public event EventHandler<TeleportEventArgs> TeleportStatusChanged;
59 public event EventHandler<AlertMessageEventArgs> AlertMessageReceived;
60 public event EventHandler<BalanceEventArgs> MoneyBalanceUpdated;
62 protected virtual void OnClientLoggingIn(OverrideEventArgs e)
64 if (ClientLoggingIn != null) ClientLoggingIn(this, e);
67 protected virtual void OnClientLoginStatus(LoginProgressEventArgs e)
69 if (ClientLoginStatus != null) ClientLoginStatus(this, e);
72 protected virtual void OnClientLoggingOut(OverrideEventArgs e)
74 if (ClientLoggingOut != null) ClientLoggingOut(this, e);
77 protected virtual void OnClientLoggedOut(EventArgs e)
79 if (ClientLoggedOut != null) ClientLoggedOut(this, e);
82 protected virtual void OnClientDisconnected(DisconnectedEventArgs e)
84 if (ClientDisconnected != null) ClientDisconnected(this, e);
87 protected virtual void OnChatReceived(ChatEventArgs e)
89 if (ChatReceived != null) ChatReceived(this, e);
92 protected virtual void OnChatSent(ChatSentEventArgs e)
94 if (ChatSent != null) ChatSent(this, e);
97 protected virtual void OnInstantMessageReceived(InstantMessageEventArgs e)
99 if (InstantMessageReceived != null) InstantMessageReceived(this, e);
102 protected virtual void OnInstantMessageSent(InstantMessageSentEventArgs e)
104 if (InstantMessageSent != null) InstantMessageSent(this, e);
107 protected virtual void OnTeleporting(TeleportingEventArgs e)
109 if (Teleporting != null) Teleporting(this, e);
112 protected virtual void OnTeleportStatusChanged(TeleportEventArgs e)
114 if (TeleportStatusChanged != null) TeleportStatusChanged(this, e);
117 protected virtual void OnAlertMessageReceived(AlertMessageEventArgs e)
119 if (AlertMessageReceived != null) AlertMessageReceived(this, e);
122 protected virtual void OnMoneyBalanceUpdated(BalanceEventArgs e)
124 if (MoneyBalanceUpdated != null) MoneyBalanceUpdated(this, e);