libiac (IAC, Internal Application Communication) provides various interfaces to make the service oriented communication between applications much easier than using low-level D-Bus routines ever before.
libiac depends on the following libraries:
l GLib It is the low-level core library that forms the basis of GTK+ and GNOME. It provides data structure handling for C, portability wrappers, and interfaces for such runtime functionality as an event loop, threads, dynamic loading, and an object system.
l DBus D-Bus is a message bus system, a simple way for applications to talk to one another. In addition to interprocess communication, D-Bus helps coordinate process lifecycle; it makes it simple and reliable to code a "single instance" application or daemon, and to launch applications and daemons on demand when their services are needed.
This chapter addresses the things that you as a programmer should know about libiac when developing it and use it implement your own address book applications. It helps to understand its architecture and implementation. Armed with this knowledge, you will be better equipped to make this library run with higher performance, avoids potential pitfalls such as deadlocks or unexpected errors and even import any new features on your needs. You will see how libiac works in relation to your code and you can be more confident that you are attacking the problem from the right direction.
Before we get started discussing the principle data structures, let's have a basic view on the architecture of libiac.

Figure 2.1a Framework of Internal Application Communication

Figure 2.1b Process of IAC framework
As we can see Figure 2.1a, enablers provides a non-graphic method to share the services between different kinds of applications. But application running in the system would still like to query a graphic service or other services that enablers cannot cover. In this case, we need another approach to share services.
In IAC, one application need to launcher another application and query that application to show a proper user interface for the further interaction with users. Application launcher acts as an important role in this situation. In figure 2.1b, when contacts applications want a service of message application, it firstly queries application launcher to launching message application. After application launcher finishes launching work, it will return a result to contacts application to tell whether destination application is launched or not. Finally, the real service invocation happens.
At the moment, all service supplied by application in the system is listed in table 2.1:
Table 2.1: List of IAC services
|
Application |
Name |
Service Object |
Action Entry |
|
SoundServer |
SS |
app.ss.service |
location |
|
|
SS |
app.ss.service |
mute |
|
|
SS |
app.ss.service |
stop |
|
|
SS |
app.ss.service |
volume |
|
|
SS |
app.ss.service |
remute |
|
|
SS |
app.ss.service |
pause |
|
|
SS |
app.ss.service |
continue |
|
AddressBook |
ABook |
app.addressbook.service |
voice_find |
|
|
ABook |
app.addressbook.service |
mul_select |
|
|
ABook |
app.addressbook.service |
add_contact |
|
SMS |
SMS |
app.sms.service |
send_sms |
|
Dialer |
Voc |
lips.voice.service |
invoke_calling |
|
|
Voc |
lips.voice.service |
num_return |
|
|
Voc |
lips.voice.service |
dial |
To query an IAC service, an application needs to follow steps shown in figure 2.2:

Figure 2.2 Steps to query service
Application should firstly get a unique IAC context which can be retrieved anywhere. Then application uses iac_start_service() call by passing IAC handler as the first parameter to query launcher to start destination application. It should be noticed that iac_start_service() will block the application for a second, so the application should consider the user interface display for this short period. After application gets a confirmation from launcher without any error, it should use iac_execute_service() or iac_execute_service_async() to invoke service in a synchronous or an asynchronous way.
If an application wants to publish any new service through interface provided by IAC, it should also get a unique IAC context firstly same as when it wants to query a service. Then use iac_register_service() to register a service followed by calling iac_register_listener() to register call-back for specific action entry.
Currently, the name used to query launcher to launch application is described in Name field in a .desktop.