C API Interface

icewarp_api.h - header file to call functions from api.dll
                on Windows or libapi.so on Linux
api_test.c    - simple test which prints version string.


Notes for using API on Linux
----------------------------

When running application which uses libapi.so, these environment
variables must be passed to application:

For IceWarp Server version 10.1.x and higher:
IWS_INSTALL_DIR - path to IceWarp Server installation directory

Application using API library, should run under same user as IceWarp Server,
or application user should be added to group under which IceWarp Server runs.
This ensures that API library can correctly read and process all files related
to IceWarp Server.

Another possibility is to use function icewarp_apiobjectcall_persistent, which
utilizes control for API execution.

libapi.so depends on libpcmem_nat.so, which is library distributed with IceWarp
that resides in lib or lib64 subdirectory of installation directory. You will 
need to set LD_LIBRARY_PATH to point to this library.

Also you may need to set LD_LIBRARY_PATH to directory with library libapi.so.

When you want to get or set object property via icewarp_apiobjectcall or 
icewarp_apiobjectcall_persistent functions, you need to prepend the property 
name with Get_ or Set_ prefix. So for example to set RemoteHost property 
of Mailer object, call "function" Set_RemoteHost.
