added additional event types

cusax-fix
Emil Ivov 21 years ago
parent 81840b76b3
commit 1fceebfa0f

@ -22,17 +22,31 @@ public class MetaContactEvent
private int eventID = -1;
/**
* Indicates that the MetaContactEvent instance was triggered by
* Indicates that the MetaContactEvent instance was triggered by
* adding a MetaContact.
*/
public static final int METACONTACT_ADDED = 1;
public static final int META_CONTACT_ADDED = 1;
/**
* Indicates that the MetaContactEvent instance was triggered by the
* removal of an existing MetaContact.
*/
public static final int METACONTACT_REMOVED = 2;
public static final int META_CONTACT_REMOVED = 2;
/**
* Indicates that the MetaContactEvent instance was triggered by the
* removal of a protocol specific contact from an existing MetaContact.
*/
public static final int PROTO_CONTACT_REMOVED = 3;
/**
* Indicates that the MetaContactEvent instance was triggered by the
* addition of a protocol specific contact to an existing MetaContact.
*/
public static final int PROTO_CONTACT_ADDED = 4;
private ProtocolProviderService sourceProvider = null;
private MetaContactGroup parentGroup = null;
@ -41,7 +55,7 @@ public class MetaContactEvent
* @param source the MetaContact instance that is added to the MetaContactList
* @param provider the ProtocolProviderService instance where this event
* occurred
* @param parentGroup the MetaContactGroup underwhich the corresponding
* @param parentGroup the MetaContactGroup underwhich the corresponding
* MetaContact is located
* @param eventID one of the METACONTACT_XXX static fields indicating the
* nature of the event.
@ -76,7 +90,7 @@ public MetaContact getSourceContact()
}
/**
* Returns the MetaContactGroup that the MetaContact belongs to.
* Returns the MetaContactGroup that the MetaContact belongs to.
* @return the MetaContactGroup that the MetaContact belongs to.
*/
public MetaContactGroup getParentGroup()

@ -21,19 +21,43 @@ public class MetaContactGroupEvent
private int eventID = -1;
/**
* Indicates that the MetaContactGroupEvent instance was triggered by
* Indicates that the MetaContactGroupEvent instance was triggered by
* adding a MetaContactGroup.
*/
public static final int METACONTACT_GROUP_ADDED = 1;
public static final int META_CONTACT_GROUP_ADDED = 1;
/**
* Indicates that the MetaContactGroupEvent instance was triggered by the
* removal of an existing MetaContactGroup.
*/
public static final int METACONTACT_GROUP_REMOVED = 2;
public static final int META_CONTACT_GROUP_REMOVED = 2;
/**
* Indicates that the MetaContactGroupEvent instance was triggered by the
* removal of a protocol specific ContactGroup in the source
* MetaContactGroup.
*/
public static final int CONTACT_GROUP_REMOVED_FROM_META_GROUP = 3;
/**
* Indicates that the MetaContactGroupEvent instance was triggered by the
* renaming of a protocol specific ContactGroup in the source
* MetaContactGroup. Note that this does not in any way mean that the
* name of the MetaContactGroup itslef has changed. <tt>MetaContactGroup</tt>s
* contain multiple protocol groups and their name cannot change each time
* one of them is renamed.
*/
public static final int CONTACT_GROUP_RENAMED_IN_META_GROUP = 3;
/**
* Indicates that the MetaContactGroupEvent instance was triggered by the
* renaming of an existing MetaContactGroup.
*/
public static final int META_CONTACT_GROUP_RENAMED = 4;
private ProtocolProviderService sourceProvider = null;
/**
* Creates a new MetaContactGroup event according to the specified parameters.
* @param source the MetaContactGroup instance that is added to the MetaContactList
@ -47,7 +71,7 @@ public MetaContactGroupEvent( MetaContactGroup source,
int eventID)
{
super(source);
this.sourceProvider = provider;
this.sourceProvider = provider;
this.eventID = eventID;
}
@ -64,11 +88,11 @@ public ProtocolProviderService getSourceProvider()
* Returns the source MetaContactGroup.
* @return the source MetaContactGroup.
*/
public MetaContactGroup getSourceContactGroup()
public MetaContactGroup getSourceMetaContactGroup()
{
return (MetaContactGroup)getSource();
}
/**
* Returns a String representation of this MetaContactGroupEvent
*
@ -79,9 +103,9 @@ public String toString()
{
StringBuffer buff
= new StringBuffer("MetaContactGroupEvent-[ GroupName=");
buff.append(getSourceContactGroup().getGroupName());
buff.append(getSourceMetaContactGroup().getGroupName());
buff.append(", eventID=").append(getEventID());
return buff.toString();
}

Loading…
Cancel
Save