diff options
author | Yana Stamcheva <yana@jitsi.org> | 2012-09-17 11:10:29 +0000 |
---|---|---|
committer | Yana Stamcheva <yana@jitsi.org> | 2012-09-17 11:10:29 +0000 |
commit | ee908cba050cbde15384d3b0cb13357fcb0c5b41 (patch) | |
tree | 2d894ff083076e4a4306fe58aaeabfa8f2ad8810 /src/net/java/sip/communicator/service/contactsource | |
parent | 4f194782e3b22e1e9f3e7b710b5d5b2b36cc6ff7 (diff) | |
download | jitsi-ee908cba050cbde15384d3b0cb13357fcb0c5b41.zip jitsi-ee908cba050cbde15384d3b0cb13357fcb0c5b41.tar.gz jitsi-ee908cba050cbde15384d3b0cb13357fcb0c5b41.tar.bz2 |
Adds phonenumbers and search to transfer and conference invite dialogs. Improves the chat invite dialog by adding a search field on the top of the source contact list.
Diffstat (limited to 'src/net/java/sip/communicator/service/contactsource')
4 files changed, 59 insertions, 10 deletions
diff --git a/src/net/java/sip/communicator/service/contactsource/AsyncContactQuery.java b/src/net/java/sip/communicator/service/contactsource/AsyncContactQuery.java index 20b06bb..aed89b3 100644 --- a/src/net/java/sip/communicator/service/contactsource/AsyncContactQuery.java +++ b/src/net/java/sip/communicator/service/contactsource/AsyncContactQuery.java @@ -88,6 +88,7 @@ public abstract class AsyncContactQuery<T extends ContactSourceService> }
if (changed)
fireContactReceived(sourceContact);
+
return changed;
}
diff --git a/src/net/java/sip/communicator/service/contactsource/ContactDetail.java b/src/net/java/sip/communicator/service/contactsource/ContactDetail.java index 0de7e69..23e7092 100644 --- a/src/net/java/sip/communicator/service/contactsource/ContactDetail.java +++ b/src/net/java/sip/communicator/service/contactsource/ContactDetail.java @@ -315,6 +315,7 @@ public class ContactDetail * Returns a list of all supported <tt>OperationSet</tt> classes, which * would indicate what are the supported actions by this contact * (e.g. write a message, make a call, etc.) + * * @return a list of all supported <tt>OperationSet</tt> classes */ public List<Class<? extends OperationSet>> getSupportedOperationSets() diff --git a/src/net/java/sip/communicator/service/contactsource/ContactSourceService.java b/src/net/java/sip/communicator/service/contactsource/ContactSourceService.java index 35001c8..0077c47 100644 --- a/src/net/java/sip/communicator/service/contactsource/ContactSourceService.java +++ b/src/net/java/sip/communicator/service/contactsource/ContactSourceService.java @@ -16,26 +16,37 @@ package net.java.sip.communicator.service.contactsource; public interface ContactSourceService { /** - * Constants to identify <tt>ContactSource</tt> in call history. + * Type of a default source. */ - public static final String CALL_HISTORY = "CallHistory"; + public static final int DEFAULT_TYPE = 0; /** - * Returns the identifier of this contact source. Some of the common - * identifiers are defined here (For example the CALL_HISTORY identifier - * should be returned by all call history implementations of this interface) - * @return the identifier of this contact source + * Type of a search source. Queried only when searches are performed. */ - public String getIdentifier(); + public static final int SEARCH_TYPE = 1; + + /** + * Type of a history source. Queries only when history should be shown. + */ + public static final int HISTORY_TYPE = 2; + + /** + * Returns the type of this contact source. + * + * @return the type of this contact source + */ + public int getType(); /** * Returns a user-friendly string that identifies this contact source. + * * @return the display name of this contact source */ public String getDisplayName(); /** * Queries this search source for the given <tt>queryString</tt>. + * * @param queryString the string to search for * @return the created query */ @@ -50,4 +61,11 @@ public interface ContactSourceService */ public ContactQuery queryContactSource(String queryString, int contactCount); + + /** + * Returns the index of the contact source in the result list. + * + * @return the index of the contact source in the result list + */ + public int getIndex(); } diff --git a/src/net/java/sip/communicator/service/contactsource/GenericSourceContact.java b/src/net/java/sip/communicator/service/contactsource/GenericSourceContact.java index 4214c16..f2897ab 100644 --- a/src/net/java/sip/communicator/service/contactsource/GenericSourceContact.java +++ b/src/net/java/sip/communicator/service/contactsource/GenericSourceContact.java @@ -38,6 +38,16 @@ public class GenericSourceContact private final String displayName;
/**
+ * The display details of this contact.
+ */
+ private String displayDetails;
+
+ /**
+ * The presence status of this contact.
+ */
+ private PresenceStatus presenceStatus;
+
+ /**
* The image/avatar of this <tt>SourceContact</tt>
*/
private byte[] image;
@@ -139,8 +149,17 @@ public class GenericSourceContact */
public String getDisplayDetails()
{
- // TODO Auto-generated method stub
- return null;
+ return displayDetails;
+ }
+
+ /**
+ * Sets the display details of this <tt>SourceContact</tt>.
+ *
+ * @param displayDetails the display details of this <tt>SourceContact</tt>
+ */
+ public String setDisplayDetails(String displayDetails)
+ {
+ return this.displayDetails = displayDetails;
}
/**
@@ -200,6 +219,16 @@ public class GenericSourceContact */
public PresenceStatus getPresenceStatus()
{
- return null;
+ return presenceStatus;
+ }
+
+ /**
+ * Sets the status of the source contact.
+ *
+ * @param presenceStatus the status of this contact
+ */
+ public void setPresenceStatus(PresenceStatus presenceStatus)
+ {
+ this.presenceStatus = presenceStatus;
}
}
|