Miranda COM Interface

I've tried to post a feature request/discussion on the Miranda forum, but my thread managed to get zero replies, not even some sarcasm :P

Many programs (among them AveDesk) could make great use of a COM interface to a messaging application - a widely used and supporting multiple protocols and accounts... what can I write to draw interest? if anyone has something to say.... here's the thread. Don't really know what to write myself :slant: it seems like I cannot write interesting posts... :(

#426565

For what it's worth, I think your post at the miranda forums is clear, clean and concise, not to mention highly relevant. There's really nothing worse than a zero-reply thread. If it makes you feel any better I'd be happy to add a sarcastic comment over there, hehe.

#426605

Take a look at MirandaRPC

Provides other processes functions to call in order to retrieve information from a Miranda-IM instance.

#426732

@dave: thanks for the comprehension :)

@jim: that project is undocumented, really old, and no source is available :(

I'm starting to think I'll have to write one myself, so I got the miranda source and headers. I was thinking, what could be a useful interface to access miranda ?

Moreover, I've never been writing (complex) COM objects, so I don't know how far can I go, what kind of structures I can send and receive to requesting applications, etc...

Things that should be present:

stasus: set and get, global and per-protocol

contact list: list of users / with filters ?

users:

- informations (nick, away message, protocol), status, avatar (filename, as saved by miranda)

- functions: open a message dialog, send a file...

any comments or ideas ? :)

#427199

Well its always cruel to inject a COM interface into a project that has man-decades of code.

Things I failed so far:

- Foobar2000:

Got a template up and running from abandoned sample code. Got as far as the scarcely documented interiors. Fetched a track name and miserably failed to get a grip of how to translate their homebrewn utf-8 to COM utf-16, gave up.

Thankfully, this has been handled from one of its insiders.

Got zero support from the devs.

- gaim:

Miserably failed to compile under win32.

Miserably failed to crosscompile under Linux.

Didn't even dare to ask the devs, after reading their flamewars ;)

Your best choice would be somehow to attract the attention of one of Miranda's core developers.

#427389

if you have failed, what could a mere mortal like me achieve ?

Miranda has a nice message passing architecture, so writing a plugin is not that complicated. What I less know how to write is actually the COM part :-) The lastest versions are native unicode, hope I can handle that.

#427415

- gaim:

Miserably failed to compile under win32.

Miserably failed to crosscompile under Linux.

Didn't even dare to ask the devs, after reading their flamewars ;)

Your best choice would be somehow to attract the attention of one of Miranda's core developers.

If it makes you feel better, gaim is dead.

@dreadnaut, try some different way of asking maybe. (irc, mailing lists, etc)

And if it makes you feel better, I found a thread very similar to yours.

#427611

If it makes you feel better, gaim is dead.

How is Gaim dead? They just released Gaim2 BETA4...

#427746

Finally, it's working :cool:

I have a Miranda plugin exporting a COM interface. Now I'll have to study the Miranda internals and find a good interface to its services.

of course, thanks to Andreas and Phil for the support and good jokes :D

#430623

here we are, I have a beta version out there.

It seems to work.... but:

  • Unicode will soon drive me crazy
  • COM will soon drive me crazy
  • if I implement COM events, Delphi inflates my dll to a whopping 400KB from 140KB. Is that normal, or should I switch to a slimmer language, or forget about predefined libraries ?
  • it will take time to understand the evil Miranda internals and implement everything :P

#433508

COM events are pure dispinterfaces (read: extremely late bound). Maybe Delphi has to wrap a lot of elaborate code around that. Since you only need a smallish subset, define your events in IDL and fire them manually using IDispatch (I guess you are not implementing other objects events but issuing some of your own)

To acquire full blown COM event forwarding to scripts, you'll need to manually implement:

- IProvideClassInfo2

- IEnumConnectionPoints

- IConnectionPoint

- IEnumConnectionPointContainer

- IEnumConnections

I would rather suggest using VC6 and ATL instead.

Some of these may not be required for issuing events to simple vbScripts running in AveScripter, your mileage may vary ;)

hth,

herd

#433599