diff options
author | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2011-01-07 20:07:54 +0000 |
---|---|---|
committer | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2011-01-07 20:07:54 +0000 |
commit | 09d688c00a58854d5f0eb066f752feea061e135e (patch) | |
tree | fa993c6183e806d49ab6e82e13501bc41f7fe9f1 /src/native/addrbook/macosx | |
parent | 72bc56dbb32f2e311a9250ad561c9e3feef2e066 (diff) | |
download | jitsi-09d688c00a58854d5f0eb066f752feea061e135e.zip jitsi-09d688c00a58854d5f0eb066f752feea061e135e.tar.gz jitsi-09d688c00a58854d5f0eb066f752feea061e135e.tar.bz2 |
Displays kABOrganizationProperty as the displayName of SourceContact for companies fetched from the Address Book of Mac OS X.
Diffstat (limited to 'src/native/addrbook/macosx')
2 files changed, 40 insertions, 0 deletions
diff --git a/src/native/addrbook/macosx/net_java_sip_communicator_plugin_addrbook_macosx_MacOSXAddrBookContactQuery.h b/src/native/addrbook/macosx/net_java_sip_communicator_plugin_addrbook_macosx_MacOSXAddrBookContactQuery.h index c4d410e..695b64d 100644 --- a/src/native/addrbook/macosx/net_java_sip_communicator_plugin_addrbook_macosx_MacOSXAddrBookContactQuery.h +++ b/src/native/addrbook/macosx/net_java_sip_communicator_plugin_addrbook_macosx_MacOSXAddrBookContactQuery.h @@ -121,6 +121,22 @@ JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_plugin_addrbook_macosx_Ma /*
* Class: net_java_sip_communicator_plugin_addrbook_macosx_MacOSXAddrBookContactQuery
+ * Method: kABOrganizationProperty
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_plugin_addrbook_macosx_MacOSXAddrBookContactQuery_kABOrganizationProperty
+ (JNIEnv *, jclass);
+
+/*
+ * Class: net_java_sip_communicator_plugin_addrbook_macosx_MacOSXAddrBookContactQuery
+ * Method: kABPersonFlags
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_net_java_sip_communicator_plugin_addrbook_macosx_MacOSXAddrBookContactQuery_kABPersonFlags
+ (JNIEnv *, jclass);
+
+/*
+ * Class: net_java_sip_communicator_plugin_addrbook_macosx_MacOSXAddrBookContactQuery
* Method: kABPhoneProperty
* Signature: ()J
*/
diff --git a/src/native/addrbook/macosx/net_java_sip_communicator_plugin_addrbook_macosx_MacOSXAddrBookContactQuery.m b/src/native/addrbook/macosx/net_java_sip_communicator_plugin_addrbook_macosx_MacOSXAddrBookContactQuery.m index 23a2e50..f21aabe 100644 --- a/src/native/addrbook/macosx/net_java_sip_communicator_plugin_addrbook_macosx_MacOSXAddrBookContactQuery.m +++ b/src/native/addrbook/macosx/net_java_sip_communicator_plugin_addrbook_macosx_MacOSXAddrBookContactQuery.m @@ -121,6 +121,8 @@ DEFINE_ABPERSON_PROPERTY_GETTER(kABMiddleNameProperty) DEFINE_ABPERSON_PROPERTY_GETTER(kABMiddleNamePhoneticProperty)
DEFINE_ABPERSON_PROPERTY_GETTER(kABMSNInstantProperty)
DEFINE_ABPERSON_PROPERTY_GETTER(kABNicknameProperty)
+DEFINE_ABPERSON_PROPERTY_GETTER(kABOrganizationProperty)
+DEFINE_ABPERSON_PROPERTY_GETTER(kABPersonFlags)
DEFINE_ABPERSON_PROPERTY_GETTER(kABPhoneProperty)
DEFINE_ABPERSON_PROPERTY_GETTER(kABYahooInstantProperty)
@@ -166,6 +168,28 @@ MacOSXAddrBookContactQuery_idToJObject }
}
}
+ else if ([o isKindOfClass:[NSNumber class]])
+ {
+ jclass longClass = (*jniEnv)->FindClass(jniEnv, "java/lang/Long");
+
+ jo = NULL;
+ if (longClass)
+ {
+ jmethodID longMethodID
+ = (*jniEnv)->GetMethodID(
+ jniEnv,
+ longClass, "<init>", "(J)V");
+
+ if (longMethodID)
+ {
+ jo
+ = (*jniEnv)->NewObject(
+ jniEnv,
+ longClass, longMethodID,
+ (jlong) ([((NSNumber *) o) longValue]));
+ }
+ }
+ }
else
jo = NULL;
if (jo)
|