diff --git a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java index 57b0d7ac2..8d9781628 100644 --- a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java @@ -399,6 +399,80 @@ ContactIcqImpl createVolatileContact(Screenname screenname) return ssContactList.createVolatileContact(screenname); } + /** + * Creates and returns a unresolved contact from the specified + * address and persistentData. The method will not try + * to establish a network connection and resolve the newly created Contact + * against the server. The protocol provider may will later try and resolve + * the contact. When this happens the corresponding event would notify + * interested subscription listeners. + * + * @param address an identifier of the contact that we'll be creating. + * @param persistentData a String returned Contact's getPersistentData() + * method during a previous run and that has been persistently stored + * locally. + * @param parentGroup the group that the unresolved contact should belong to. + * @return the unresolved Contact created from the specified + * address and persistentData + */ + public Contact createUnresolvedContact(String address, + String persistentData, + ContactGroup parentGroup) + { + /**@todo implement createUnresolvedContact() */ + System.out.println("@todo implement createUnresolvedContact()"); + return null; + } + + /** + * Creates and returns a unresolved contact from the specified + * address and persistentData. The method will not try + * to establish a network connection and resolve the newly created Contact + * against the server. The protocol provider may will later try and resolve + * the contact. When this happens the corresponding event would notify + * interested subscription listeners. + * + * @param address an identifier of the contact that we'll be creating. + * @param persistentData a String returned Contact's getPersistentData() + * method during a previous run and that has been persistently stored + * locally. + * + * @return the unresolved Contact created from the specified + * address and persistentData + */ + public Contact createUnresolvedContact(String address, + String persistentData) + { + /**@todo implement createUnresolvedContact() */ + System.out.println("@todo implement createUnresolvedContact()"); + return null; + } + + + /** + * Creates and returns a unresolved contact group from the specified + * address and persistentData. The method will not try + * to establish a network connection and resolve the newly created + * ContactGroup against the server or the contact itself. The + * protocol provider will later resolve the contact group. When this happens + * the corresponding event would notify interested subscription listeners. + * + * @param groupUID an identifier, returned by ContactGroup's getGroupUID, + * that the protocol provider may use in order to create the group. + * @param persistentData a String returned ContactGroups's getPersistentData() + * method during a previous run and that has been persistently stored + * locally. + * @param parentGroup the group under which the new group is to be created + * or null if this is group directly underneath the root. + * @return the unresolved ContactGroup created from the specified + * uid and persistentData + */ + public ContactGroup createUnresolvedContactGroup(String groupUID, + String persistentData, ContactGroup parentGroup) + { + + return null; + } /** * Persistently adds a subscription for the presence status of the contact diff --git a/src/net/java/sip/communicator/impl/protocol/icq/RootContactGroupIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/RootContactGroupIcqImpl.java index 92dca5ed7..c101b1aba 100644 --- a/src/net/java/sip/communicator/impl/protocol/icq/RootContactGroupIcqImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/icq/RootContactGroupIcqImpl.java @@ -20,6 +20,7 @@ public class RootContactGroupIcqImpl { private String ROOT_CONTACT_GROUP_NAME = "ContactListRoot"; private List subGroups = new LinkedList(); + private boolean isResolved = false; /** * An empty list that we use when returning an iterator. @@ -261,4 +262,43 @@ public boolean isPersistent() return true; } + /** + * Returns null as no persistent data is required and the group name is + * sufficient for restoring the contact. + *
+ * @return null as no such data is needed. + */ + public String getPersistentData() + { + return null; + } + + /** + * Determines whether or not this group has been resolved against the + * server. Unresolved groups are used when initially loading a contact + * list that has been stored in a local file until the presence operation + * set has managed to retrieve all the contact list from the server and has + * properly mapped groups to their on-line buddies. + * @return true if the group has been resolved (mapped against a buddy) + * and false otherwise. + */ + public boolean isResolved() + { + return isResolved; + } + + /** + * Returns a String that uniquely represnets the group. In this we + * use the name of the group as an identifier. This may cause problems + * though, in clase the name is changed by some other application between + * consecutive runs of the sip-communicator. + * + * @return a String representing this group in a unique and persistent + * way. + */ + public String getUID() + { + return getGroupName(); + } + }