aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/java/sip')
-rw-r--r--src/net/java/sip/communicator/plugin/addrbook/macosx/MacOSXAddrBookContactSourceService.java20
-rw-r--r--src/net/java/sip/communicator/plugin/addrbook/msoutlook/MsOutlookAddrBookContactSourceService.java32
-rw-r--r--src/net/java/sip/communicator/plugin/addrbook/msoutlook/MsOutlookAddrBookSourceContact.java20
-rw-r--r--src/net/java/sip/communicator/service/contactsource/EditableContactSourceService.java14
4 files changed, 83 insertions, 3 deletions
diff --git a/src/net/java/sip/communicator/plugin/addrbook/macosx/MacOSXAddrBookContactSourceService.java b/src/net/java/sip/communicator/plugin/addrbook/macosx/MacOSXAddrBookContactSourceService.java
index 9331983..2187ac4 100644
--- a/src/net/java/sip/communicator/plugin/addrbook/macosx/MacOSXAddrBookContactSourceService.java
+++ b/src/net/java/sip/communicator/plugin/addrbook/macosx/MacOSXAddrBookContactSourceService.java
@@ -280,4 +280,24 @@ public class MacOSXAddrBookContactSourceService
return !AddrBookActivator.getConfigService().getBoolean(
PNAME_MACOSX_ADDR_BOOK_SEARCH_FIELD_DISABLED, false);
}
+
+ /**
+ * Returns the bitness of this contact source service.
+ *
+ * @return The bitness of this contact source service.
+ */
+ public int getBitness()
+ {
+ return -1;
+ }
+
+ /**
+ * Returns the version of this contact source service.
+ *
+ * @return The version of this contact source service.
+ */
+ public int getVersion()
+ {
+ return -1;
+ }
}
diff --git a/src/net/java/sip/communicator/plugin/addrbook/msoutlook/MsOutlookAddrBookContactSourceService.java b/src/net/java/sip/communicator/plugin/addrbook/msoutlook/MsOutlookAddrBookContactSourceService.java
index 59bbcb8..bbe6110 100644
--- a/src/net/java/sip/communicator/plugin/addrbook/msoutlook/MsOutlookAddrBookContactSourceService.java
+++ b/src/net/java/sip/communicator/plugin/addrbook/msoutlook/MsOutlookAddrBookContactSourceService.java
@@ -95,6 +95,14 @@ public class MsOutlookAddrBookContactSourceService
{
throw new RuntimeException(cnfe);
}
+
+ int bitness = getOutlookBitnessVersion();
+ int version = getOutlookVersion();
+ if(bitness != -1 && version != -1)
+ {
+ logger.info(
+ "Outlook " + version + "-x" + bitness + " is installed.");
+ }
}
/**
@@ -148,6 +156,10 @@ public class MsOutlookAddrBookContactSourceService
private static native void MAPIUninitialize();
+ public static native int getOutlookBitnessVersion();
+
+ public static native int getOutlookVersion();
+
/**
* Queries this <tt>ContactSourceService</tt> for <tt>SourceContact</tt>s
* which match a specific <tt>query</tt> <tt>Pattern</tt>.
@@ -487,4 +499,24 @@ public class MsOutlookAddrBookContactSourceService
return this.id.hashCode();
}
}
+
+ /**
+ * Returns the bitness of this contact source service.
+ *
+ * @return The bitness of this contact source service.
+ */
+ public int getBitness()
+ {
+ return getOutlookBitnessVersion();
+ }
+
+ /**
+ * Returns the version of this contact source service.
+ *
+ * @return The version of this contact source service.
+ */
+ public int getVersion()
+ {
+ return getOutlookVersion();
+ }
}
diff --git a/src/net/java/sip/communicator/plugin/addrbook/msoutlook/MsOutlookAddrBookSourceContact.java b/src/net/java/sip/communicator/plugin/addrbook/msoutlook/MsOutlookAddrBookSourceContact.java
index 7da1544..0b40576 100644
--- a/src/net/java/sip/communicator/plugin/addrbook/msoutlook/MsOutlookAddrBookSourceContact.java
+++ b/src/net/java/sip/communicator/plugin/addrbook/msoutlook/MsOutlookAddrBookSourceContact.java
@@ -37,6 +37,11 @@ public class MsOutlookAddrBookSourceContact
private Boolean locked = Boolean.FALSE;
/**
+ * The list of Outlook entry IDs we have already seen for this contact.
+ */
+ private Vector<String> ids = new Vector<String>(1, 1);
+
+ /**
* Initializes a new MsOutlookAddrBookSourceContact instance.
*
* @param contactSource The ContactSourceService which is creating the new
@@ -57,6 +62,8 @@ public class MsOutlookAddrBookSourceContact
this.setData(SourceContact.DATA_ID, id);
this.setDisplayDetails(organization);
+
+ this.ids.add(id);
}
/**
@@ -347,10 +354,17 @@ public class MsOutlookAddrBookSourceContact
*/
public boolean match(String id)
{
- String localId = this.getId();
+ if(!this.ids.contains(id))
+ {
+ String localId = this.getId();
+ if(!MsOutlookAddrBookContactQuery.compareEntryIds(id, localId))
+ {
+ return false;
+ }
+ this.ids.add(id);
+ }
- return (localId.equals(id)
- || MsOutlookAddrBookContactQuery.compareEntryIds(id, localId));
+ return true;
}
/**
diff --git a/src/net/java/sip/communicator/service/contactsource/EditableContactSourceService.java b/src/net/java/sip/communicator/service/contactsource/EditableContactSourceService.java
index 1734a40..db1265f 100644
--- a/src/net/java/sip/communicator/service/contactsource/EditableContactSourceService.java
+++ b/src/net/java/sip/communicator/service/contactsource/EditableContactSourceService.java
@@ -38,4 +38,18 @@ public interface EditableContactSourceService
* @param id The ID of the contact to remove.
*/
public void deleteContact(String id);
+
+ /**
+ * Returns the bitness of this contact source service.
+ *
+ * @return The bitness of this contact source service.
+ */
+ public int getBitness();
+
+ /**
+ * Returns the version of this contact source service.
+ *
+ * @return The version of this contact source service.
+ */
+ public int getVersion();
}