//
//  FBCListen.h
//  FrontBase
//
//  Created by Svend Bodilsen on 02/08/14.
//
//

#ifndef FBCListen__H
#define FBCListen__H

#ifndef FBVersion
#define FBVersion 7
#elif FBVersion != 7
#error "The headers for FBCAccess version have been mixed"
#endif

typedef struct FBCListen FBCListen;

#ifdef __cplusplus
extern "C" {
#endif

FBCListen* fbclListen
 ( const char*  url,                            // A file:// url for the database
   const char*  hostName,                       // The interface to listen on, NULL all interfaces
   unsigned int port,                           // The port number to listen on - 0 system selected
   unsigned int secure,                         // Make incoming connection encrypted
   unsigned int registerWithExec,               // Register withe the FBExec on the local host
   const char*  registerAs                      // Name to register - NULL the databasename is used
 );
FBCListen* fbclRetain  ( FBCListen* self );
void       fbclRelease ( FBCListen* self );

const char*  fbclURL         ( FBCListen* self );
unsigned int fbclPort        ( FBCListen* self );
const char*  fbclHostName    ( FBCListen* self );
int          fbclSecure      ( FBCListen* self );
const char*  fbclRegisterAs  ( FBCListen* self );
const char*  fbclPRegisterAs ( FBCListen* self );
   
#ifdef __cplusplus
}
#endif

#endif
