]> git.somenet.org - irc/pjirc-ng.git/blob - src/main/java/irc/ServerListener.java
Pjirc 2.2.1 as available on the net, reformatted and made it compile.
[irc/pjirc-ng.git] / src / main / java / irc / ServerListener.java
1 /*****************************************************/\r
2 /*          This java file is a part of the          */\r
3 /*                                                   */\r
4 /*           -  Plouf's Java IRC Client  -           */\r
5 /*                                                   */\r
6 /*   Copyright (C)  2002 - 2004 Philippe Detournay   */\r
7 /*                                                   */\r
8 /*         All contacts : theplouf@yahoo.com         */\r
9 /*                                                   */\r
10 /*  PJIRC is free software; you can redistribute     */\r
11 /*  it and/or modify it under the terms of the GNU   */\r
12 /*  General Public License as published by the       */\r
13 /*  Free Software Foundation; version 2 or later of  */\r
14 /*  the License.                                     */\r
15 /*                                                   */\r
16 /*  PJIRC is distributed in the hope that it will    */\r
17 /*  be useful, but WITHOUT ANY WARRANTY; without     */\r
18 /*  even the implied warranty of MERCHANTABILITY or  */\r
19 /*  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU   */\r
20 /*  General Public License for more details.         */\r
21 /*                                                   */\r
22 /*  You should have received a copy of the GNU       */\r
23 /*  General Public License along with PJIRC; if      */\r
24 /*  not, write to the Free Software Foundation,      */\r
25 /*  Inc., 59 Temple Place, Suite 330, Boston,        */\r
26 /*  MA  02111-1307  USA                              */\r
27 /*                                                   */\r
28 /*****************************************************/\r
29 \r
30 package irc;\r
31 \r
32 /**\r
33  * Server listener.\r
34  */\r
35 public interface ServerListener {\r
36         /**\r
37          * The server has connected.\r
38          * \r
39          * @param s\r
40          *          the server.\r
41          */\r
42         public void serverConnected(Server s);\r
43 \r
44         /**\r
45          * The server has disconnected.\r
46          * \r
47          * @param s\r
48          *          the server.\r
49          */\r
50         public void serverDisconnected(Server s);\r
51 \r
52         /**\r
53          * The server has left.\r
54          * \r
55          * @param s\r
56          *          the server.\r
57          */\r
58         public void serverLeft(Server s);\r
59 \r
60         /**\r
61          * The nickname(s) provided to this server for registration cannot be used for\r
62          * any reason.\r
63          * \r
64          * @param s\r
65          *          the server.\r
66          * @return an array of alternative nicknames.\r
67          */\r
68         public String[] cannotUseRequestedNicknames(Server s);\r
69 \r
70         /**\r
71          * A new source has been created.\r
72          * \r
73          * @param source\r
74          *          the created source.\r
75          * @param server\r
76          *          the server.\r
77          * @param bring\r
78          *          true if the newly created source must have immediate focus.\r
79          */\r
80         public void sourceCreated(Source source, Server server, Boolean bring);\r
81 \r
82         /**\r
83          * An existing source has been removed.\r
84          * \r
85          * @param source\r
86          *          the removed source.\r
87          * @param server\r
88          *          the server.\r
89          */\r
90         public void sourceRemoved(Source source, Server server);\r
91 \r
92         /**\r
93          * Send a special request from the server. This is a generic-purpose event and\r
94          * possible requests should be defined by server implementations.\r
95          * \r
96          * @param request\r
97          *          the request.\r
98          * @param server\r
99          *          the server.\r
100          * @param params\r
101          *          request parameters.\r
102          * @return request result.\r
103          */\r
104         public Object specialServerRequest(String request, Server server, Object[] params);\r
105 }\r