1 /*------------------------------------------------------------------------------
2 * The contents of this file are subject to the Mozilla Public License Version
3 * 1.1 (the "License"); you may not use this file except in compliance with
4 * the License. You may obtain a copy of the License at
5 * http://www.mozilla.org/MPL/
6 * Software distributed under the License is distributed on an "AS IS" basis,
7 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
8 * the specific language governing rights and limitations under the License.
9 *
10 * The Original Code is levelonelabs.com code.
11 * The Initial Developer of the Original Code is Level One Labs. Portions
12 * created by the Initial Developer are Copyright (C) 2001 the Initial
13 * Developer. All Rights Reserved.
14 *
15 * Contributor(s):
16 * Scott Oster (ostersc@alum.rpi.edu)
17 * Steve Zingelwicz (sez@po.cwru.edu)
18 * William Gorman (willgorman@hotmail.com)
19 *
20 * Alternatively, the contents of this file may be used under the terms of
21 * either the GNU General Public License Version 2 or later (the "GPL"), or
22 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
23 * in which case the provisions of the GPL or the LGPL are applicable
24 * instead of those above. If you wish to allow use of your version of this
25 * file only under the terms of either the GPL or the LGPL, and not to allow
26 * others to use your version of this file under the terms of the NPL, indicate
27 * your decision by deleting the provisions above and replace them with the
28 * notice and other provisions required by the GPL or the LGPL. If you do not
29 * delete the provisions above, a recipient may use your version of this file
30 * under the terms of any one of the NPL, the GPL or the LGPL.
31 *----------------------------------------------------------------------------*/
32
33
34 package com.levelonelabs.aim;
35
36
37 import java.util.Iterator;
38 import java.util.List;
39
40
41 /***
42 * Interface for AIM connection provider
43 *
44 * @author Scott Oster
45 *
46 * @created January 1, 2002
47 */
48 public interface AIMSender {
49
50 public static final int PERMIT_ALL = 1;
51 public static final int DENY_ALL = 2;
52 public static final int PERMIT_SOME = 3;
53 public static final int DENY_SOME = 4;
54 public static final int PERMIT_BUDDIES = 5;
55
56 public static final String DEFAULT_GROUP = "TOC";
57
58 public void sendMessage(AIMBuddy buddy, String text);
59
60 public void sendWarning(AIMBuddy buddy);
61
62 public Iterator getBuddyNames();
63 public AIMBuddy getBuddy(String name);
64 public void addBuddy(AIMBuddy buddy);
65 public void addBuddies(List buddyList);
66 public void removeBuddy(AIMBuddy buddy);
67 public void removeBuddies(List buddyList);
68
69 public void banBuddy(AIMBuddy buddy);
70
71 public void addAIMListener(AIMListener listener);
72
73 public void signOn();
74 public void signOff();
75
76 public void setPermitMode(int mode);
77 public int getPermitMode();
78 public void denyBuddy(AIMBuddy buddy);
79 public void permitBuddy(AIMBuddy buddy);
80
81 public void setAvailable();
82 public void setUnavailable(String reason);
83 }