#ifndef __stgitf_h_
#define __stgitf_h_

//#include <stgerr.h>

#if __cplusplus
extern "C"
{
#endif/*__cplusplus*/
	
#define CERTS_MAX_NUM 2
#define PKEYS_MAX_NUM 2
	
    struct bin_data_t 
	{
		unsigned int size;
		unsigned char* data;
	};
	
    typedef struct vh_info_t
    {
		unsigned int m_user_id;
		unsigned int m_group_id;
		const char* m_homedir;
		struct bin_data_t m_cert;
		struct bin_data_t m_cacert;
    } vh_info_t;

	/**
	Finds virtual host data by specified host name. Host data is replied in oinfo output parameter. Be careful of using output vh_info_t instance. 
	Variable length members are resided in per thread buffer so as any next function call will reallocate it. If the host data is not found or some 
	error occurred, function replies zero. In this case function keeps error information in the per thread buffer. Last error description can be 
	obtained by get_vh_last_error function call.
	vHost	: name of virtual host to find information for
	oinfo	: vh_info_t pointer where information is replied.
	*/
	int find_vh_info(const char* vhName, struct  vh_info_t* oinfo);


	struct user_info_t 
	{
		unsigned int m_user_id;			//The user ID
		unsigned int m_group_id;		//The user default group ID
		const char* m_login;			//The user login name - the string a user would type in when logging into the operating system.
		const char* m_passwd;			//The user password - password encrypted string
		const char* m_gecos;			//'General Electric Comprehensive Operating System' - typically used to record some general information about the user
		const char* m_homedir;			//The path to the user's home directory
		const char* m_shell;			//The shell program that is started every time the user logs into the system.
		long int m_last_change;			//Unix time (seconds since Jan 1, 1970) of the last change
		long int m_min_ndays;			//Minimum number of days between changes.
		long int m_max_ndays;			//Maximum number of days between changes.
		long int m_warn_ndays;			//Number of days to warn user to change the password.
		long int m_inact_ndays;			//Number of days the account may be inactive.
		long int m_expire_ndays;		//Number of days since 1970-01-01 until account expires.
		unsigned long m_flags;			//Reserved flags cell 
	};

#if __cplusplus
};/* extern "C" */
#endif/*__cplusplus*/

#endif//__stgitf_h_
