OSDN Git Service

Update copyright year
[radegast/radegast.git] / Radegast / Netcom / RadegastNetcom / NetComEvents.cs
1 // 
2 // Radegast Metaverse Client
3 // Copyright (c) 2009-2014, Radegast Development Team
4 // All rights reserved.
5 // 
6 // Redistribution and use in source and binary forms, with or without
7 // modification, are permitted provided that the following conditions are met:
8 // 
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.
17 // 
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.
28 //
29 // $Id$
30 //
31 using System;
32 using OpenMetaverse;
33
34 namespace Radegast.Netcom
35 {
36     public partial class RadegastNetcom
37     {
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);
47
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;
61
62         protected virtual void OnClientLoggingIn(OverrideEventArgs e)
63         {
64             if (ClientLoggingIn != null) ClientLoggingIn(this, e);
65         }
66
67         protected virtual void OnClientLoginStatus(LoginProgressEventArgs e)
68         {
69             if (ClientLoginStatus != null) ClientLoginStatus(this, e);
70         }
71
72         protected virtual void OnClientLoggingOut(OverrideEventArgs e)
73         {
74             if (ClientLoggingOut != null) ClientLoggingOut(this, e);
75         }
76
77         protected virtual void OnClientLoggedOut(EventArgs e)
78         {
79             if (ClientLoggedOut != null) ClientLoggedOut(this, e);
80         }
81
82         protected virtual void OnClientDisconnected(DisconnectedEventArgs e)
83         {
84             if (ClientDisconnected != null) ClientDisconnected(this, e);
85         }
86
87         protected virtual void OnChatReceived(ChatEventArgs e)
88         {
89             if (ChatReceived != null) ChatReceived(this, e);
90         }
91
92         protected virtual void OnChatSent(ChatSentEventArgs e)
93         {
94             if (ChatSent != null) ChatSent(this, e);
95         }
96
97         protected virtual void OnInstantMessageReceived(InstantMessageEventArgs e)
98         {
99             if (InstantMessageReceived != null) InstantMessageReceived(this, e);
100         }
101
102         protected virtual void OnInstantMessageSent(InstantMessageSentEventArgs e)
103         {
104             if (InstantMessageSent != null) InstantMessageSent(this, e);
105         }
106
107         protected virtual void OnTeleporting(TeleportingEventArgs e)
108         {
109             if (Teleporting != null) Teleporting(this, e);
110         }
111
112         protected virtual void OnTeleportStatusChanged(TeleportEventArgs e)
113         {
114             if (TeleportStatusChanged != null) TeleportStatusChanged(this, e);
115         }
116
117         protected virtual void OnAlertMessageReceived(AlertMessageEventArgs e)
118         {
119             if (AlertMessageReceived != null) AlertMessageReceived(this, e);
120         }
121
122         protected virtual void OnMoneyBalanceUpdated(BalanceEventArgs e)
123         {
124             if (MoneyBalanceUpdated != null) MoneyBalanceUpdated(this, e);
125         }
126     }
127 }