Documentation of Implementation of libEtPan!
--------------------------------------------


Index
-----

1. User interface independant
1.1. Utilities
1. User interface independant
1.1. Utilities
1.2. libEtPan! drivers
1.3. Message rendering
1.4. Specific protocol calls
1.4.1. Specific calls for IMAP
1.4.2. Specific calls for NNTP
1.5. Message security
1.6. Thread manager
1.7. Perl scripting
1.7.1. Common perl functions
1.7.2. Wrapper for ncurses functions
1.8. Configuration
1.8.1. Common tools
1.8.2. Common parser
1.8.3. Address book configuration
1.8.4. Account configuration
1.8.5. Color configuration
1.8.6. Global options
1.8.7. Key configuration
1.8.8. MIME configuration
1.8.9. S/MIME configuration
1.8.10. storage configuration
1.8.11. vfolder configuration
1.8.12. all configuration

2. User interface
2.1. Application and sub applications
2.1.1. Management of sub applications
2.1.2. Management of threads
2.2. Log console
2.3. Input sub applications
2.3.1. Common implementation
2.3.2. Address input
2.3.3. IMAP mailbox input
2.3.4. NNTP newsgroup name input
2.3.5. filename input
2.3.6. header field name input
2.3.7. common input
2.4. Text viewers
2.4.1. Common implementation
2.4.2. Help viewer
2.4.3. Message content viewer
2.4.4. MIME part content viewer
2.4.5. external MIME part viewer
2.5. Headers edition
2.5.1. Common implementation
2.5.2. Initial headers composition
2.5.3. Headers edition (in MIME editor)
2.6. MIME structure viewer
2.6.1. Common implementation
2.6.2. MIME structure editor
2.6.3. MIME structure viewer
2.7. Message list viewer
2.8. Folder list view
2.8.1. Common implementation
2.8.2. Folder list view
2.8.3. Folder selection
2.9. Message composition and sending
2.10. Configuration User Interface
2.10.1. Common input
2.10.2. Account configuration
2.10.2.1. account selection
2.10.2.2. account properties edition
2.10.3. Folder configuration
2.10.3.1. Folder tree configuration
2.10.3.2. Folder properties edition
2.10.4. Storage configuration
2.10.4.1. Storage selection
2.10.4.2. Storage properties edition
2.10.5. Global options configuration
2.11. Search dialog

3. Compatibility problems


1. User interface independant
-----------------------------

This describe the part independant of user interface (or almost).


1.1. Utilities
--------------

etpan-errors.h

You can find error codes in the given file.


etpan-imf-helper-types.h
etpan-imf-helper.[ch]

Utility functions related to IMF part of libEtPan!


etpan-mime-tools.[ch]

Utility functions related to MIME part of libEtPan!


etpan-tools.[ch]

other functions


1.2. libEtPan! drivers
----------------------

etpan-message-data-driver.[ch]

for messages which content is given by a string
(Available in libEtPan! 0.30).
When the driver is available in libEtPan!, this is just a wrapper.


etpan-mime-message-driver.[ch]

for messages which content is given by a MIME structure
(Available in libEtPan! 0.30).
When the driver is available in libEtPan!, this is just a wrapper.


1.3. Message rendering
----------------------

etpan-msg-renderer-types.h
etpan-msg-renderer.[ch]


1.4. Specific protocol calls
----------------------------

1.4.1. Specific calls for IMAP
----------------------------

etpan-imap-types.h
etpan-imap.[ch]

For list of mailboxes, creation, selection of mailboxes.


1.4.2. Specific calls for NNTP
------------------------------

etpan-nntp-types.h
etpan-nntp.[ch]

For list of newsgroups (with a cache for this list).


1.5. Message security
---------------------

* interface for security driver

etpan-security-types.h
etpan-security.[ch]

Modification on MIME message for render or for sending.


* OpenPGP driver

etpan-pgp.[ch]


* S/MIME driver

etpan-smime.[ch]


1.6. Thread manager
-------------------

etpan-msg-params-types.h
etpan-msg-params.[ch]

Message related information. Indication on whether node is open or not,
reference counters on message.


etpan-thread-manager-types.h
etpan-thread-manager.[ch]

threaded libEtPan! operations.


1.7. Perl scripting
-------------------

1.7.1. Common perl functions
----------------------------

etpan-perl-types.h
etpan-perl.[ch]

(This is planned)


1.7.2. Wrapper for ncurses functions
------------------------------------

etpan-ncurses.[ch]

useful for parts where #include <ncurses.h> makes conflicts
(for example with perl).


1.8. Configuration
------------------

1.8.1. Common tools
-------------------

etpan-cfg-common-types.h
etpan-cfg-common.[ch]


1.8.2. Common parser
--------------------

etpan-db-read-types.h
etpan-db-read.[ch]

etPan has its own (text) configuration file format.


1.8.3. Address book configuration
---------------------------------

etpan-cfg-abook-types.h
etpan-cfg-abook.[ch]


1.8.4. Account configuration
----------------------------

etpan-cfg-account-types.h
etpan-cfg-account.[ch]


1.8.5. Color configuration
--------------------------

etpan-cfg-color-types.h
etpan-cfg-color.[ch]


1.8.6. Global options
---------------------

etpan-cfg-global-types.h
etpan-cfg-global.[ch]

following options :
- poll delay, network timeout
- sendmail path, editor path
- reply quote limit
- charsets


1.8.7. Key configuration
------------------------

etpan-cfg-key-types.h
etpan-cfg-key.[ch]

(not yet used)


1.8.8. MIME configuration
-------------------------

etpan-cfg-mime-types.h
etpan-cfg-mime.[ch]

for MIME part viewer, you can select a program for external
MIME rendering and MIME viewer.


1.8.9. S/MIME configuration
---------------------------

etpan-cfg-smime-types.h
etpan-cfg-smime.[ch]

You will set certificate with corresponding recipient or sender.


1.8.10. storage configuration
-----------------------------

etpan-cfg-storage-types.h
etpan-cfg-storage.[ch]

List of storages.


1.8.11. vfolder configuration
-----------------------------

etpan-cfg-vfolder-types.h
etpan-cfg-vfolder.[ch]

virtual folders tree.


1.8.12. all configuration
-------------------------

etpan-config-types.h
etpan-config.[ch]

Initialization and uninitialization of all configuration.


2. User interface
-----------------

2.1. Application and sub applications
-------------------------------------

2.1.1. Management of sub applications
-------------------------------------

etpan.c

initialization of etPan!, you can find main() here.


etpan-app-subapp.[ch]
etpan-app.[ch]

management of sub applications


etpan-subapp-types.h
etpan-subapp.[ch]

sub application interface


2.1.2. Management of threads
----------------------------

etpan-subapp-thread-types.h
etpan-subapp-thread.[ch]

Callback and cancel handling in sub applications.


2.2. Log console
----------------

etpan-console-app.[ch]

This is for bottom messages display.


2.3. Input sub applications
---------------------------

2.3.1. Common implementation
----------------------------

etpan-input-common-types.h
etpan-input-common.[ch]


2.3.2. Address input
--------------------

etpan-address-input.[ch]

Input of a list of addresses with completion using the address book.


2.3.3. IMAP mailbox input
-------------------------

etpan-imap-input.[ch]

Input of an IMAP mailbox with completion, querying the server.


2.3.4. NNTP newsgroup name input
--------------------------------

etpan-nntp-input.[ch]

Input of a newsgroup name with completion, querying the server.


2.3.5. filename input
---------------------

etpan-filename-input.[ch]

Input of a filename with completion.


2.3.6. header field name input
------------------------------

etpan-header-input.[ch]

Input of a header name with completion on some standard headers.


2.3.7. common input
-------------------

etpan-search-input.[ch]

This is currently called etpan-search-input.[ch] because this was
first used for search.


2.4. Text viewers
-----------------

2.4.1. Common implementation
----------------------------

etpan-viewer-common-types.h
etpan-viewer-common.[ch]


2.4.2. Help viewer
------------------

etpan-help-viewer.[ch]


2.4.3. Message content viewer
-----------------------------

etpan-msg-viewer-app.[ch]


2.4.4. MIME part content viewer
-------------------------------

etpan-part-viewer-app-types.h
etpan-part-viewer-app.[ch]


2.4.5. external MIME part viewer
--------------------------------

etpan-mime-viewer.[ch]


2.5. Headers edition
--------------------

2.5.1. Common implementation
----------------------------

etpan-header-common-types.h
etpan-header-common.[ch]


2.5.2. Initial headers composition
----------------------------------

etpan-compose-app.[ch]


2.5.3. Headers edition (in MIME editor)
---------------------------------------

etpan-header-editor-app-types.h
etpan-header-editor-app.[ch]


2.6. MIME structure viewer
--------------------------

2.6.1. Common implementation
----------------------------

etpan-mime-common-types.h
etpan-mime-common.[ch]

MIME interface shared implementation.


etpan-mime-params-types.h
etpan-mime-params.[ch]

indication on whether node is open or not, security encryption, etc.


2.6.2. MIME structure editor
----------------------------

etpan-mime-edit-app.[ch]


2.6.3. MIME structure viewer
----------------------------

etpan-mime-list-app.[ch]


2.7. Message list viewer
------------------------

etpan-msg-list-app.[ch]


2.8. Folder list view
---------------------

2.8.1. Common implementation
----------------------------

etpan-folder-common-types.h
etpan-folder-common.[ch]


etpan-folder-params-types.h
etpan-folder-params.[ch]

status of folder, indication on whether node is open or not, etc.


2.8.2. Folder list view
-----------------------

etpan-folder-list-app.[ch]


2.8.3. Folder selection
-----------------------

etpan-folder-sel-app-types.h
etpan-folder-sel-app.[ch]


2.9. Message composition and sending
------------------------------------

etpan-msg-new-types.h
etpan-msg-new.[ch]

start composition for new messages


etpan-msg-reply.[ch]

replying or forwarding messages


etpan-msg-supersedes.[ch]

cancelling, superseding, bouncing messages or reediting messages.


2.10. Configuration User Interface
----------------------------------

2.10.1. Common input
--------------------

etpan-cfg-edit-common.[ch]

Helper for input dialog in configuration user interface.


2.10.2. Account configuration
-----------------------------

2.10.2.1. account selection
---------------------------

etpan-account-common-types.h
etpan-account-common.[ch]
etpan-account-sel-types.h
etpan-account-sel.[ch]


2.10.2.2. account properties edition
------------------------------------

etpan-account-edit-types.h
etpan-account-edit.[ch]


2.10.3. Folder configuration
----------------------------

2.10.3.1. Folder tree configuration
-----------------------------------

etpan-folder-conf-types.h
etpan-folder-conf.[ch]


2.10.3.2. Folder properties edition
-----------------------------------

etpan-folder-edit-types.h
etpan-folder-edit.[ch]


2.10.4. Storage configuration
-----------------------------

2.10.4.1. Storage selection
---------------------------

etpan-storage-common-types.h
etpan-storage-common.[ch]
etpan-storage-sel-types.h
etpan-storage-sel.[ch]


2.10.4.2. Storage properties edition
------------------------------------

etpan-storage-edit-types.h
etpan-storage-edit.[ch]


2.10.5. Global options configuration
------------------------------------

etpan-cfg-global-edit-types.h
etpan-cfg-global-edit.[ch]


2.11. Search dialog
-------------------

etpan-search.[ch]


3. Compatibility problems
-------------------------

3.1. Mac OS X
-------------

- On this system, include of <sys/select.h> is not supported standalone,
  we have first, to include <sys/time.h>, <sys/types.h> and <unistd.h>.

- sem_init() is not implemented. Then we use sem_open() to emulate this.

