[Uim] Reorganization of helper API

YamaKen yamaken at bp.iij4u.or.jp
Fri Aug 5 13:26:14 EEST 2005


At Wed, 3 Aug 2005 01:44:00 +0900,
tkng at xem.jp wrote:
> Following is a new message API proposal.

> int  uim_mbus_get_message_type(uim_mbus *mbus);
> void uim_mbus_set_message_type(uim_mbus *mbus, int type);
> void uim_mbus_add_message_type(uim_mbus *mbus, int type);
> void uim_mbus_remove_message_type(uim_mbus *mbus, int type);
> 
>   There are several message types. Message bus dispatches messages
>   according to the message type.

I guess that it is designed for filtering messages by type at
the server process, instead of reflecting all messages to all
processes as helper-server does. Is it correct?

If my recognition is correct, uim_mbus_add_message_type() and
uim_mbus_remove_message_type() can naturally be understood in
the filtering model. It configures that which types of messages
are delivered to the client process. But I can't guess role of
the rest two.

uim_mbus_get_message_type() seems strange since it can return
only one type. It conflicts with the multiple type capability
that the model implied by the add() and remove().


Ah, I've acquired a new guess by my words. The add() and
remove() is not intended to configure filtering state for each
connection, but to manage the set of type definition itself as
like define() and undefine(). Is it the truth?

I oppose the design if it is the truth since:

- a client must able to receive multiple types of messages
- message types should not be defined dynamically


Please let me know correct intention about the API.

> Now I'm assuming these four message types.
> 
>    * status:messages related on input status. Toolbar should receive this
>      type.
> 
>    * input:Input from other processes. The process which have focused
>      context (or lastly focused context) should receive this type.
> 
>    * setting:Change of settings. All processes except preference tool itself
>      should receive this type.
> 
>    * focus: Focus related message. The process which have focused
>      context (or lastly focused context) should receive this type.

-------------------------------
YamaKen  yamaken at bp.iij4u.or.jp



More information about the uim mailing list