Architecture

From CenterIM
Jump to: navigation, search

This page describes the basic architecture of CenterIM5.

Big picture

CenterIM5 is an object oriented program written in C++. It consists of several components that are shown at the picture below. Grey parts are external libraries, white parts represent components that are developed in this project. Libsigc++ provides a typesafe callback system, libtermkey is used as low level input processing library, ncurses allows to put characters on the screen, libpurple provides a communication backend, GLib is a general purpose library.

Cim5-components.png

CenterIM5 works internally exclusively with UTF-8. Input is converted from the current locale to UTF-8. This stems from the fact that glib (used by libpurple) expects UTF-8 encoded strings.

CppConsUI

CppConsUI is a TUI toolkit. The goal of this library is to provide easy-to-use widgets for building user interfaces.

Cim5-cppconsui.png

CenterIM

Top layer of CenterIM5 is a relatively simple glue between CppConsUI and libpurple. Libpurple is a C based instant messaging API. As such CenterIM5 represents core libpurple interfaces as objects. For example, libpurple has a conversation API. In CenterIM5, this is represented by the Conversation and Conversations classes.