1 | package nu.fw.jeti.events; |
---|
2 | |
---|
3 | import nu.fw.jeti.backend.roster.*; |
---|
4 | import nu.fw.jeti.jabber.*; |
---|
5 | import nu.fw.jeti.ui.models.RosterTreeModel; |
---|
6 | |
---|
7 | /** |
---|
8 | * The listener interface for receiving roster events. |
---|
9 | * This listener is used to inform the frontside roster of changes in the backside |
---|
10 | * see {@link RosterTreeModel} for a TreeModel implementation. |
---|
11 | * @author E.S. de Boer |
---|
12 | * @version 1.0 |
---|
13 | */ |
---|
14 | |
---|
15 | public interface RosterListener extends JETIListener |
---|
16 | { |
---|
17 | /** |
---|
18 | * Called on a complete roster refresh. |
---|
19 | * @param tree Tree containing the new roster. |
---|
20 | */ |
---|
21 | public void rosterReplaced(JIDStatusTree tree); |
---|
22 | |
---|
23 | /** |
---|
24 | * Called when a group has been added to the roster. |
---|
25 | * @param group The new group. |
---|
26 | * @param index the index of the new group in the tree. |
---|
27 | */ |
---|
28 | void groupAdded(JIDStatusGroup group,int index); |
---|
29 | |
---|
30 | /** |
---|
31 | * Called when a group has been deleted. |
---|
32 | * @param group The deleted group. |
---|
33 | * @param index The index of the group in the tree before deletion. |
---|
34 | */ |
---|
35 | void groupDeleted(JIDStatusGroup group,int index); |
---|
36 | |
---|
37 | |
---|
38 | /** |
---|
39 | * Called when a group has changed textual info. |
---|
40 | * @param group The deleted group. |
---|
41 | * @param index The index of the group in the tree. |
---|
42 | */ |
---|
43 | public void groupUpdated(final JIDStatusGroup group,int index); |
---|
44 | |
---|
45 | |
---|
46 | /** |
---|
47 | * Called when a primaryJidStatus has been added |
---|
48 | * @param jidGroup The group where the PrimaryJIDStatus is in. |
---|
49 | * @param primary The added primaryJIDStatus |
---|
50 | * @param index The index of the primaryJIDStatus in the group. |
---|
51 | */ |
---|
52 | void primaryAdded(JIDStatusGroup jidGroup,PrimaryJIDStatus primary,int index); |
---|
53 | |
---|
54 | /** |
---|
55 | * Called when a primaryJidStatus has been deleted. |
---|
56 | * @param jidGroup The group the primaryJIDStatus was in. |
---|
57 | * @param primary The deleted primaryJIDStatus. |
---|
58 | * @param index The index of the primaryJIDStaus in the group before deletion. |
---|
59 | */ |
---|
60 | void primaryDeleted(JIDStatusGroup jidGroup,PrimaryJIDStatus primary,int index); |
---|
61 | |
---|
62 | /** |
---|
63 | * Called when the primaryJidstatus has been changed |
---|
64 | * @param jidGroup The group the primaryJIDStatus is in. |
---|
65 | * @param primary The changed primaryJIDStatus |
---|
66 | * @param index The index of the primaryJIDStatus in the group |
---|
67 | */ |
---|
68 | //weg? only server uses this |
---|
69 | void primaryUpdated(JIDStatusGroup jidGroup,PrimaryJIDStatus primary,int index); |
---|
70 | |
---|
71 | /** |
---|
72 | * Called when a JIDStatus has been added. |
---|
73 | * @param jidGroup The group where the primaryJIDStatus, where this jidstatus has been added to, is in. |
---|
74 | * @param primary The primaryJIDStatus where this JIDStatus has been added to. |
---|
75 | * @param jidStatus The new JIDStatus |
---|
76 | * @param index The index of the new JIDStatus in the PrimaryJIDStatus. |
---|
77 | */ |
---|
78 | void jidStatusAdded(JIDStatusGroup jidGroup,PrimaryJIDStatus primary,JIDStatus jidStatus,int index); |
---|
79 | |
---|
80 | /** |
---|
81 | * Called when a JIDStatus has been deleted. |
---|
82 | * @param jidGroup The group where the primaryJIDStatus, where this jidstatus has been deleted from, is in. |
---|
83 | * @param primary The primaryJIDStatus where this JIDStatus has been deleted from. |
---|
84 | * @param jidStatus The deleted JIDStatus |
---|
85 | * @param index The index of jidStatus in the PrimaryJIDStatus before deletion. |
---|
86 | */ |
---|
87 | void jidStatusDeleted(JIDStatusGroup jidGroup,PrimaryJIDStatus primary,JIDStatus jidStatus,int index); |
---|
88 | |
---|
89 | //void jidStatusUpdated(JIDGroup2 jidGroup,JIDPrimaryStatus primary,JIDStatus2 jidStatus,int index); |
---|
90 | |
---|
91 | /** |
---|
92 | * Called when the JIDStatussen of a primaryJIDStatus are updated. |
---|
93 | * @param jidGroup The group where primary is in. |
---|
94 | * @param primary The primaryJIDStatus that has been updated. |
---|
95 | */ |
---|
96 | void jidStatussenUpdated(JIDStatusGroup jidGroup,PrimaryJIDStatus primary); |
---|
97 | |
---|
98 | } |
---|
99 | /* |
---|
100 | * Overrides for emacs |
---|
101 | * Local variables: |
---|
102 | * tab-width: 4 |
---|
103 | * End: |
---|
104 | */ |
---|