Re: Adding a new protocol
Eion Robb <[email protected]> Wed, 15 May 2019 19:03:09 +1200
| Newsgroups | gmane.comp.gnome.gaim.devel |
|---|---|
| Message-ID | <CAFt0mkojaTOh2vzJC5sG4-V7U8xkqjXpZ-Whur+A=PTD-yBebw@mail.gmail.com> |
--===============4521460763653666732== Content-Type: multipart/alternative; boundary="0000000000008ff92b0588e7be96" --0000000000008ff92b0588e7be96 Content-Type: text/plain; charset="UTF-8" Hi there! Always exciting to see someone new want to take a stab at writing a protocol plugin :) What protocol were you thinking of writing for? There's a skeleton prpl in-tree called nullprpl.c (for 3.x.y https://bitbucket.org/pidgin/main/src/default/libpurple/protocols/null/ or for 2.x.y https://bitbucket.org/pidgin/main/src/release-2.x.y/libpurple/protocols/null/ ) that has a basic example of hooking into the libpurple plugin system. Grim also has an excellent example of a 3.x.y plugin at https://bitbucket.org/rw_grim/skeleton-libpurple/src/default/ For a 2.x.y plugin, you can also try looking at https://github.com/EionRobb/purple-plugins-prpl which is a horrible plugin but gives an example of the bare minimums required. I strongly recommend editing an existing plugin, removing all the code that's not relevant to your protocol, and then replacing it with your new code. Feel free to pop by in #pidgin on Freenode, or on one of the Discord/XMPP/Matrix channels to say hi and bounce ideas past us :) Cheers, Eion On Wed, 15 May 2019 at 15:56, [email protected] < [email protected]> wrote: > Hello, > > Is there documentation on how to add a new protocol? Maybe a skeleton or a > very simple one? Any language (C, Python, Lua ...) will do. > > I've tried to see some of the already existing protocols (both internal > and third-party) but find it hard to isolate the pidgin specifics from > those of the protocol. I'd rather start from a small example and move from > there. > > Thanks. > _______________________________________________ > Devel mailing list > [email protected] > https://pidgin.im/cgi-bin/mailman/listinfo/devel --0000000000008ff92b0588e7be96 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div di= r=3D"ltr">Hi there!<div><br></div><div>Always exciting to see someone new w= ant to take a stab at writing a protocol plugin :)</div><div>What protocol = were you thinking of writing for?</div><div><br></div><div>There's a sk= eleton prpl in-tree called nullprpl.c (for 3.x.y <a href=3D"https://bitbuck= et.org/pidgin/main/src/default/libpurple/protocols/null/">https://bitbucket= .org/pidgin/main/src/default/libpurple/protocols/null/</a> or for 2.x.y=C2= =A0<a href=3D"https://bitbucket.org/pidgin/main/src/release-2.x.y/libpurple= /protocols/null/">https://bitbucket.org/pidgin/main/src/release-2.x.y/libpu= rple/protocols/null/</a>=C2=A0) that has a basic example of hooking into th= e libpurple plugin system.</div><div><br></div><div>Grim also has an excell= ent example of a 3.x.y plugin at=C2=A0<a href=3D"https://bitbucket.org/rw_g= rim/skeleton-libpurple/src/default/">https://bitbucket.org/rw_grim/skeleton= -libpurple/src/default/</a></div><div><br></div><div>For a 2.x.y plugin, yo= u can also try looking at=C2=A0<a href=3D"https://github.com/EionRobb/purpl= e-plugins-prpl">https://github.com/EionRobb/purple-plugins-prpl</a> which i= s a horrible plugin but gives an example of the bare minimums required.</di= v><div><br></div><div>I strongly recommend editing an existing plugin, remo= ving all the code that's not relevant to your protocol, and then replac= ing it with your new code.</div><div><br></div><div>Feel free to pop by in = #pidgin on Freenode, or on one of the Discord/XMPP/Matrix channels to say h= i and bounce ideas past us :)</div><div><br></div><div>Cheers,</div><div>Ei= on</div></div></div></div></div></div><br><div class=3D"gmail_quote"><div d= ir=3D"ltr" class=3D"gmail_attr">On Wed, 15 May 2019 at 15:56, <a href=3D"ma= ilto:[email protected]">[email protected]</a> <<a = href=3D"mailto:[email protected]">[email protected]</= a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0p= x 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><d= iv><div class=3D"gmail-m_-2659106548504294684yahoo-style-wrap" style=3D"fon= t-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13= px"><div>Hello,</div><div><br></div><div>Is there documentation on how to a= dd a new protocol? Maybe a skeleton or a very simple one? Any language (C, = Python, Lua ...) will do.<br></div><div><br></div><div>I've tried to se= e some of the already existing protocols (both internal and third-party) bu= t find it hard to isolate the pidgin specifics from those of the protocol. = I'd rather start from a small example and move from there.<br></div><di= v><br></div><div>Thanks.<br></div></div></div>_____________________________= __________________<br> Devel mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a><br= > <a href=3D"https://pidgin.im/cgi-bin/mailman/listinfo/devel" rel=3D"norefer= rer" target=3D"_blank">https://pidgin.im/cgi-bin/mailman/listinfo/devel</a>= </blockquote></div> --0000000000008ff92b0588e7be96-- --===============4521460763653666732== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KRGV2ZWwgbWFp bGluZyBsaXN0CkRldmVsQHBpZGdpbi5pbQpodHRwczovL3BpZGdpbi5pbS9jZ2ktYmluL21haWxt YW4vbGlzdGluZm8vZGV2ZWw= --===============4521460763653666732==--