[sip-comm-dev] Creating a message summary tab

Yana Stamcheva yana at sip-communicator.org
Sun Nov 11 22:26:36 CET 2007


Hi Bernhard,

Bernhard Glatt wrote:
> Hi Yana,
> 
> don't worry about response time and thanks for your answer!
> I had already a look at the plugin how-to, and I think this part is very 
> clear since the description is very good.

Nice to hear that.

> What I'm not really sure for now is how to fill my tab with the messages 
> transmitted. I assume using the ProtocolProviderService is the best way, 
>  sending all incoming and outgoing messages to my tab and to the 
> messaging window of course (where I write and receive my messages 
> normally). But how can I use the ProtocolProviderService to send each 
> instant message also to my tab? Furthermore I have to know which service 
> (msn, jabber,...) the message belongs to and its buddy. Only then I can 
> create different tables within my tab for each messaging session.
> Perhaps you are wondering about my questions, but at the moment the 
> ProtocolProviderService seems like a blackbox to me :-)

You're on the right track. Actually it is the 
OperationSetBasicInstantMessaging, which will give you access to instant 
messages. OperationSet-s are meant to provide different services for a 
protocol provider and this is the service that deals with instant messaging.

The first thing you need to do is obtain all already registered protocol 
providers. You could have a how this is done in 
net.java.sip.communicator.impl.gui.main.login.LoginManager.java. It's in 
  runLogin that all this happens. Then for each protocol provider you 
should get the OperationSetBasicInstantMessaging by calling the 
getOperationSet method. Afterwards you could add to it your 
MessageListener and you'll obtain all events you need. All the events 
will give you information about the involved contact, from which you 
could obtain also information about the protocol, etc.

You should also think to listen for newly added accounts (respectively 
protocol providers), have a look in the same LoginManager 
(ServiceListener.serviceChanged)

Hope this helps.

Cheers,
Yana

> 
> Thanks for the help in the meantime,
> Bernhard
> 
> Yana Stamcheva schrieb:
>> Hi Bernhard,
>>
>> first, sorry for the late reply.
>>
>> If I understand well what you mean, you could use the GUI plugin 
>> functionality in order to make your tab. You could have a look on the 
>> following "how to": 
>> http://www.sip-communicator.org/index.php/Documentation/HowToWriteGuiPlugins 
>>
>>
>> And also, there's a simple example plugin in 
>> net.java.sip.communicator.plugin package.
>>
>> If you would like your tab to appear in the main tabbed pane, the 
>> container, where you should add it is CONTAINER_MAIN_TABBED_PANE (it's 
>> defined in the UIService). Make sure to make an update and take the 
>> last version of SIP Communicator, as I have just added this container 
>> to the supported plugin containers:)
>>
>> Hope this helps,
>> Yana
>>
>> Glatt Bernhard (Student Com07) wrote:
>>> Hi SC-community,
>>> as a university exam project we would like to implement a new tab for 
>>> the SC, visualizing the last few messages transmitted in all current 
>>> open messaging sessions.
>>>
>>> More exactly, for each instant message session a new small window is 
>>> open by default. When more such windows are open, one could loose the 
>>> overview, specially to see what has been written lastly in one 
>>> session. Our goal would be to create a new tab in the main window of 
>>> sip-communicator, which displays a single table for each open 
>>> messaging session, that contains the last few messages transmitted 
>>> (sent and received) for that session. The tables are positioned one 
>>> under the other, and should give a better overview about all your 
>>> messaging. Of course each table shows also the type of service used 
>>> (icon for msn, yahoo, etc) and the contact's name.
>>>
>>> I've read through the documentation of SC, and had a look at the 
>>> source code.
>>> As I understood a good approach would be developing a plugin 
>>> containing all parts related to this project. So the tab and its 
>>> content creation can be called there. Everything should be related to 
>>> the protocol provider service, but it's not really clear to me yet, 
>>> how we should use it exactly.
>>> My question is if someone could give us advices or hints how to 
>>> implement the tab functionality the best way!
>>>
>>> Thanks a lot in advance,
>>> enjoy your work,
>>> Bernhard Glatt
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe at sip-communicator.dev.java.net
>>> For additional commands, e-mail: dev-help at sip-communicator.dev.java.net
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe at sip-communicator.dev.java.net
>> For additional commands, e-mail: dev-help at sip-communicator.dev.java.net
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe at sip-communicator.dev.java.net
> For additional commands, e-mail: dev-help at sip-communicator.dev.java.net
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe at sip-communicator.dev.java.net
For additional commands, e-mail: dev-help at sip-communicator.dev.java.net





More information about the dev mailing list