[sc1.0-cvs] CVS update: /sip-communicator-1-0-draft/src/net/java/sip/communicator/impl/protocol/icq/

emcho at dev.java.net emcho at dev.java.net
Fri Feb 3 17:26:30 CET 2006


User: emcho   
Date: 2006/02/03 08:26:30

Log:
 Added a reference to the creating provider

File Changes:

Directory: /sip-communicator-1-0-draft/src/net/java/sip/communicator/impl/protocol/icq/
=======================================================================================

File [changed]: ContactIcqImpl.java
Url: https://sip-communicator-1-0-draft.dev.java.net/source/browse/sip-communicator-1-0-draft/src/net/java/sip/communicator/impl/protocol/icq/ContactIcqImpl.java?r1=1.1&r2=1.2
Delta lines:  +22 -12
---------------------
--- ContactIcqImpl.java	28 Jan 2006 14:41:10 -0000	1.1
+++ ContactIcqImpl.java	3 Feb 2006 16:26:28 -0000	1.2
@@ -16,26 +16,17 @@
     private boolean isLocal = false;
     private byte[] image = null;
     private PresenceStatus icqStatus = IcqStatusEnum.OFFLINE;
+    private ServerStoredContactListIcqImpl ssclCallback = null;
 
     /**
      * Creates an IcqContactImpl
      * @param buddy the JoustSIM object that we will be encapsulating.
-     * @param isLocal specifies whether this is the representation of the local
-     * contact (i.e. the user we are using to sign on icq)
      */
-    ContactIcqImpl(Buddy buddy, boolean isLocal)
+    ContactIcqImpl(Buddy buddy, ServerStoredContactListIcqImpl ssclCallback)
     {
         this.joustSimBuddy = buddy;
         this.isLocal = isLocal;
-    }
-
-    /**
-     * Creates an IcqContactImpl for a non local contact
-     * @param buddy FullUserInfo
-     */
-    ContactIcqImpl(Buddy buddy)
-    {
-        this(buddy, false );
+        this.ssclCallback = ssclCallback;
     }
 
     /**
@@ -151,6 +142,25 @@
         return icqStatus;
     }
 
+    /**
+     * Returns a String that could be used by any user interacting modules for
+     * referring to this contact. An alias is not necessarily unique but is
+     * often more human readable than an address (or id).
+     * @return a String that can be used for referring to this contact when
+     * interacting with the user.
+     */
+    public String getAlias()
+    {
+        return joustSimBuddy.getAlias();
+    }
 
+    /**
+     * Returns a reference to the protocol provider that created the contact.
+     * @return a refererence to an instance of the ProtocolProviderService
+     */
+    public ProtocolProviderService getProtocolProvider()
+    {
+        return ssclCallback.getParentProvider();
+    }
 
 }




---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe at sip-communicator-1-0-draft.dev.java.net
For additional commands, e-mail: cvs-help at sip-communicator-1-0-draft.dev.java.net





More information about the commits mailing list