Module development advice

Max Englander <[email protected]> Sun, 4 Nov 2007 20:14:31 -0800 (PST)
Newsgroups gmane.network.irc.irssi.devel
Message-ID <[email protected]>
--0-695614007-1194236071=:57237
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

 Hi all, first time poster, please forgive ignorance.

I'm writing an irssi module which allows users to interface with music pl=
ayers on Win* machines, by remotely calling and servicing a program calle=
d AMIP (a module which can integrate with Winamp, iTunes, foobar2k, etc..=
.).

So far, I have written a module which allows song and playlist informatio=
n to be retrieved and printed in irssi, using added commands like '/mymod=
ule np', '/mymodule nextsong', '/mymodule showplaylist 3 10'.=20

However, I want to develop a statusbar which shows information of the use=
rs' choice. For example, a user could have the statusbar display "$player=
 $artist $title $album $bitrate $time_remaining/$total_time", or any othe=
r combination of the many variables exposed and available through my C mo=
dule, as well as defining text formatting (bold, colors, etc.). The user =
would set the information they desire to be displayed in the status bar t=
hrough a setting, such as 'mymodule_sbstr' (e.g., 'mymodule_sbstr =3D "%B=
$0%n[%1 - %2]"), and could define if the statusbar hides when a song is s=
topped/paused with 'mymodule_hide_on_pause', 'mymodule_hide_one_stop'...

I am looking for advice on different ways to implement such a statusbar; =
thus far I have a few ideas.
(1) Implement completely in C.
    (*) Not sure if/how this could be done.
(2) Implement in C and perl.
    (*) Perl script would use '/mymodule getvariable $<variable>'
    (*) Would retrieve result through signal emitted by C module.
(3) C and perl, expose part of module through XS.
    (*) Allow perl to get information through 'Irssi::MyModule'.
    (*) Allow perl to execute commands like 'mymodule_getvar( var );'

Any comments appreciated.
Max Englander.

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around=20
http://mail.yahoo.com=20
--0-695614007-1194236071=:57237
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

 Hi all, first time poster, please forgive ignorance.<br><br>I'm writing =
an irssi module which allows users to interface with music players on Win=
* machines, by remotely calling and servicing a program called AMIP (a mo=
dule which can integrate with Winamp, iTunes, foobar2k, etc...).<br><br>S=
o far, I have written a module which allows song and playlist information=
 to be retrieved and printed in irssi, using added commands like '/mymodu=
le np', '/mymodule nextsong', '/mymodule showplaylist 3 10'. <br><br>Howe=
ver, I want to develop a statusbar which shows information of the users' =
choice. For example, a user could have the statusbar display "$player $ar=
tist $title $album $bitrate $time_remaining/$total_time", or any other co=
mbination of the many variables exposed and available through my C module=
, as well as defining text formatting (bold, colors, etc.). The user woul=
d set the information they desire to be displayed in the status bar throu=
gh a setting, such as 'mymodule_sbstr'
 (e.g., 'mymodule_sbstr =3D "%B$0%n[%1 - %2]"), and could define if the s=
tatusbar hides when a song is stopped/paused with 'mymodule_hide_on_pause=
', 'mymodule_hide_one_stop'...<br><br>I am looking for advice on differen=
t ways to implement such a statusbar; thus far I have a few ideas.<br>(1)=
 Implement completely in C.<br>&nbsp;&nbsp;&nbsp; (*) Not sure if/how thi=
s could be done.<br>(2) Implement in C and perl.<br>&nbsp;&nbsp;&nbsp; (*=
) Perl script would use '/mymodule getvariable $&lt;variable&gt;'<br>&nbs=
p;&nbsp;&nbsp; (*) Would retrieve result through signal emitted by C modu=
le.<br>(3) C and perl, expose part of module through XS.<br>&nbsp;&nbsp;&=
nbsp; (*) Allow perl to get information through 'Irssi::MyModule'.<br>&nb=
sp;&nbsp;&nbsp; (*) Allow perl to execute commands like 'mymodule_getvar(=
 var );'<br><br>Any comments appreciated.<br>Max Englander.<br><p>&#32;__=
________________________________________________<br>Do You Yahoo!?<br>Tir=
ed of spam?  Yahoo! Mail has the best
 spam protection around <br>http://mail.yahoo.com=20
--0-695614007-1194236071=:57237--