TiFFEP Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
Important remark: a program can use the libTiFFEP (for its file&var abstraction capabilities) but not necessarily the TiFFEP (execution of plug-ins).
Some notions at first:
- TiFFEP points out the server whereas libTiFFEP points out the
library.
- a 'plug-in' designs here a client application which is in fact an
executable. This client can be either any program (text editor, group file
manager, ...) or a linking program (such as TiLP or any TiFFEP compliant
program).
Plugins can communicate themselves with other plugins through the libTiFFEP.
So that a plug-in can be executed by the TiFFEP, it must follow 2 rules:
- use the TiFFEP library of course,
- accept some parameters on its command line (see the next topic).
The library contains almost the whole code and functionnalities of the TiFFEP mechanism.
The server is very small. Its main goal is to listen EXEC requests and
treat them.
Then, it launched (execute it in fact) the required plugin.
For finding a plugin, the libTiFFEP use a centralized file which contain a list of plugin as well as service they can provide. This file is called the 'registry file'.
The libTiFFEP is easy to use. You have simply to use the library and
call 2 or 3 functions such as 'load_file', 'load_var_content_as_string'
and 'save_file' for creating a very simple text editor. Great, isn't it
?
tiffep_load_file_content(argv[1], &fi); var_data = (byte *)VARINFO_CONTENT(FILEINFO_VARINFO(fi)); var_size = VARINFO_VARSIZE(FILEINFO_VARINFO(fi)); fprintf(stdout, "Size of var: %i\n", var_size); tiffep_load_var_content_as_string(fi, &vs); fprintf(stdout, "String: <%s>\n", vs.str);; |
You can download the 'tiffep_text_editor' program with source code as
a simple example.
You will find also on the LPG
web site a repository of applications designed for the TiFFEP.
libtiffep.so / libtiffep.dll |
The library contains the code which manages registry, files, variables, sockets and so on. Most of the code is placed in this library.
<<< Previous Page | Home | Up | Next Page >>> |
TiFFEP Core Application Support | Threads |