[Adium-devl] StudiVZ Plugin

derDoc derdoc at googlemail.com
Thu Feb 26 04:41:02 UTC 2009


Hello everybody,

I am implementing a Plugin for the chat of the German Facebook-esque
site studivz as per ticket #10433.
The only way that I could get it working right now, is by using the
Nimbuzz jabber gateway.
So I just subclassed 'ESJabberService' like the GTalk service and it works.
I also wrote a profile fetcher that logs into the website and fetches
the profile of people when they come online, and match their realname
and pic out of the returned site.
For that matcher I use the RegexKit framework, and sadly it seems that
copying it into the Contents/Frameworks/ folder of the plugin does not
work since the dynloader cannot find it.
I get a bunch of errors:

<errors>
    2009-02-25 19:50:45.857 Adium[54664:10b] Error loading
/Users/derDoc/Library/Application Support/Adium
2.0/PlugIns/AdiumTestPlugin.AdiumPlugin/Contents/MacOS/AdiumTestPlugin: 
dlopen(/Users/derDoc/Library/Application Support/Adium
2.0/PlugIns/AdiumTestPlugin.AdiumPlugin/Contents/MacOS/AdiumTestPlugin,
265): Library not loaded:
@executable_path/../Frameworks/RegexKit.framework/Versions/A/RegexKit
  Referenced from: /Users/derDoc/Library/Application Support/Adium
2.0/PlugIns/AdiumTestPlugin.AdiumPlugin/Contents/MacOS/AdiumTestPlugin
  Reason: image not found
2009-02-25 19:50:45.858 Adium[54664:10b] Failed to obtain principal
class from plugin "AdiumTestPlugin.AdiumPlugin"
("/Users/derDoc/Library/Application Support/Adium
2.0/PlugIns/AdiumTestPlugin.AdiumPlugin")! infoDictionary: {
    AIMinimumAdiumVersionRequirement = "1.3";
    CFBundleDevelopmentRegion = English;
    CFBundleExecutable = AdiumTestPlugin;
    CFBundleExecutablePath = "/Users/derDoc/Library/Application
Support/Adium
2.0/PlugIns/AdiumTestPlugin.AdiumPlugin/Contents/MacOS/AdiumTestPlugin";
    CFBundleIdentifier = "com.yourcompany.yourcocoabundle";
    CFBundleInfoDictionaryVersion = "6.0";
    CFBundleInfoPlistURL = Contents/Info.plist --
file://localhost/Users/derDoc/Library/Application%20Support/Adium%202.0/PlugIns/AdiumTestPlugin.AdiumPlugin/;
    CFBundleName = AdiumTestPlugin;
    CFBundleNumericVersion = 16809984;
    CFBundlePackageType = BNDL;
    CFBundleSignature = AdiM;
    CFBundleVersion = "1.0";
    NSBundleInitialPath = "/Users/derDoc/Library/Application
Support/Adium 2.0/PlugIns/AdiumTestPlugin.AdiumPlugin";
    NSBundleResolvedPath = "/Users/derDoc/Library/Application
Support/Adium 2.0/PlugIns/AdiumTestPlugin.AdiumPlugin";
    NSPrincipalClass = ABMyTestPlugin;
}
2009-02-25 19:50:45.859 Adium[54664:10b] Failed to initialize Plugin
"AdiumTestPlugin.AdiumPlugin" ("/Users/derDoc/Library/Application
Support/Adium 2.0/PlugIns/AdiumTestPlugin.AdiumPlugin")!
</errors>

Obviously, copying the regexkit.fw into /Frameworks/ of Adium.app or
into /Library/Frameworks amends the loading but does not solve the
problem. Is there something that could be done about that?
And if there is nothing to be done, what method of string matching
should I use, since I understand that NSPredicate does not give you
subpattern matching.
Probably just include regex.h and use a thin wrapper like this one:
http://homepage.mac.com/jrc/contrib/.


I also have a quesion about setting the contact's name and pic.
Right now I send the updateContact:toAlias: message to the Account to
set its alias. But I guess, what I should be doing is setting its real
name, or UID, right - well as long as the real jabber UID is still
intact somewhere.
Well, I guess that all gets obsolete as soon as XEP-0172 works in purple
(ref. #11692).

For the pic I send setUserIconData: to the AIListContact. I guess, thats
the right way to do it, is it?

-Vitus

-- 
Vitus Lorenz-Meyer
M.S. in Computer Science from University of Texas at El Paso, USA
Dipl.-Inform. (C.S.) @ Technical University at Braunschweig, Germany

----
confuzius says:
if one wants to truely pwn, one must pwn in all games !!

www.lorenz-meyer.de		Family Community v0.1 alpha





More information about the devel mailing list