Bug 57201

Summary: please add skype to known protocols
Product: Telepathy Reporter: Gabriele Giacone <1o5g4r8o>
Component: hazeAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium CC: will
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: patch
add skype-x11 protocol

Description Gabriele Giacone 2012-11-16 16:54:49 UTC
Created attachment 70164 [details]
patch

Attached patch renames skype4pidgin (pidgin-skype in Debian) protocol from 'bigbrownchunx-skype-dbus' to 'skype' and makes it look for im-skype.png icons.

Thanks for considering.
Comment 1 Will Thompson 2012-11-17 18:22:00 UTC
I notice that the prpl exposes one of a variety of names:

#ifdef SKYPENET
»·······"prpl-bigbrownchunx-skypenet",
»·······"Skype (Network)",
#else
#ifdef SKYPE_DBUS
»·······"prpl-bigbrownchunx-skype-dbus", /* id */
»·······"Skype (D-Bus)",
#else
»·······"prpl-bigbrownchunx-skype", /* id */
»·······"Skype", /* name */
#endif
#endif

but I infer that the -dbus case is the common one?

Committed as <http://cgit.freedesktop.org/telepathy/telepathy-haze/commit/?id=3d4b6b4>; it'll be in 0.7.0 when that happens. Thanks!
Comment 2 Will Thompson 2012-11-17 18:23:23 UTC
(OOI does the prpl actually work in any useful way via Haze? I ask on behalf of bug 23856.)
Comment 3 Gabriele Giacone 2012-11-19 15:04:45 UTC
AFAIK only dbus (prpl-b-skype-dbus) and x11 (prpl-b-skype) api are maintained, skypenet one isn't.

https://developer.skype.com/desktop-api-reference#Transport

Both libpurple plugins exist and work with pidgin, hard saying which one is better.
I successfully tested both with t-haze too, but x11 one would need t-haze also load X11 libs.
Excluding rebuilding t-haze linked to such libs (unless you think it wouldn't be a big issue), the cleanest way I found to make it load both plugins is something like

-Exec=/usr/lib/telepathy/telepathy-haze
+Exec=/bin/sh -c 'LD_PRELOAD=/usr/lib/i386-linux-gnu/libX11.so /usr/lib/telepathy/telepathy-haze'

in .service file and duplicating protocol line:

+    { "skype-dbus", "prpl-bigbrownchunx-skype-dbus", NULL, "x-skype" },
+    { "skype-x11", "prpl-bigbrownchunx-skype", NULL, "x-skype" },


Would it be a real issue adding -lX11 for an optional libpurple plugin like this one?
If it would, any better ways than replacement in .service file?
Comment 4 Will Thompson 2012-11-19 15:30:21 UTC
(In reply to comment #3)
> AFAIK only dbus (prpl-b-skype-dbus) and x11 (prpl-b-skype) api are
> maintained, skypenet one isn't.
> 
> https://developer.skype.com/desktop-api-reference#Transport
> 
> Both libpurple plugins exist and work with pidgin, hard saying which one is
> better.
> I successfully tested both with t-haze too, but x11 one would need t-haze
> also load X11 libs.
> Excluding rebuilding t-haze linked to such libs (unless you think it
> wouldn't be a big issue), the cleanest way I found to make it load both
> plugins is something like
> 
> -Exec=/usr/lib/telepathy/telepathy-haze
> +Exec=/bin/sh -c 'LD_PRELOAD=/usr/lib/i386-linux-gnu/libX11.so
> /usr/lib/telepathy/telepathy-haze'
> 
> in .service file and duplicating protocol line:
> 
> +    { "skype-dbus", "prpl-bigbrownchunx-skype-dbus", NULL, "x-skype" },
> +    { "skype-x11", "prpl-bigbrownchunx-skype", NULL, "x-skype" },
> 
> 
> Would it be a real issue adding -lX11 for an optional libpurple plugin like
> this one?

I think haze packagers would be annoyed.

> If it would, any better ways than replacement in .service file?

Other prpls depend on shared libraries which haze doesn't link against and load fine. eg. the sametime plugin:

 % ldd /usr/lib/purple-2/libsametime.so | grep mean
	libmeanwhile.so.1 => /usr/lib/libmeanwhile.so.1 (0x00007f8eaf88e000)

so presumably if the skype prpl linked against libX11 it should work fine?
Comment 5 Gabriele Giacone 2012-11-20 01:05:27 UTC
Created attachment 70291 [details]
add skype-x11 protocol

(In reply to comment #4)
> so presumably if the skype prpl linked against libX11 it should work fine?

Correct, it works. Sorry for having assumed no changes on plugin side were needed.

About protocols, attached patch adds 'skype-x11' to the list and renames what first patch added to 'skype-dbus' (as mentioned in comment #3). Thanks.
Comment 6 Will Thompson 2012-11-21 16:47:01 UTC
(In reply to comment #5)
> Created attachment 70291 [details]
> add skype-x11 protocol
> 
> (In reply to comment #4)
> > so presumably if the skype prpl linked against libX11 it should work fine?
> 
> Correct, it works. Sorry for having assumed no changes on plugin side were
> needed.
> 
> About protocols, attached patch adds 'skype-x11' to the list and renames
> what first patch added to 'skype-dbus' (as mentioned in comment #3). Thanks.

http://cgit.freedesktop.org/telepathy/telepathy-haze/commit/?id=156316d1cfd2fb36311882a0ca0ed569893878da

Thanks!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.