This page describes the basic CenterIM 5 architecture.
The 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.
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 is a TUI toolkit. The goal of this library is to provide easy-to-use widgets for building user interfaces.
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.