#ifndef SERVER
-dec_server_record_t * init_dec_server( int port)
+dec_server_record_t * OPJ_CALLCONV init_dec_server( int port)
{
dec_server_record_t *record = (dec_server_record_t *)opj_malloc( sizeof(dec_server_record_t));
return record;
}
-void terminate_dec_server( dec_server_record_t **rec)
+void OPJ_CALLCONV terminate_dec_server( dec_server_record_t **rec)
{
delete_cachelist( &(*rec)->cachelist);
opj_free( (*rec)->jpipstream);
opj_free( *rec);
}
-client_t accept_connection( dec_server_record_t *rec)
+client_t OPJ_CALLCONV accept_connection( dec_server_record_t *rec)
{
client_t client;
return client;
}
-bool handle_clientreq( client_t client, dec_server_record_t *rec)
+bool OPJ_CALLCONV handle_clientreq( client_t client, dec_server_record_t *rec)
{
bool quit = false;
msgtype_t msgtype = identify_clientmsg( client);
}
-jpip_dec_param_t * init_jpipdecoder( bool jp2)
+jpip_dec_param_t * OPJ_CALLCONV init_jpipdecoder( bool jp2)
{
jpip_dec_param_t *dec;
}
-bool fread_jpip( const char fname[], jpip_dec_param_t *dec)
+bool OPJ_CALLCONV fread_jpip( const char fname[], jpip_dec_param_t *dec)
{
int infd;
return true;
}
-void decode_jpip( jpip_dec_param_t *dec)
+void OPJ_CALLCONV decode_jpip( jpip_dec_param_t *dec)
{
parse_JPIPstream( dec->jpipstream, dec->jpiplen, 0, dec->msgqueue);
dec->jp2kstream = recons_j2k( dec->msgqueue, dec->jpipstream, dec->msgqueue->first->csn, 0, 0, &dec->jp2klen);
}
-bool fwrite_jp2k( const char fname[], jpip_dec_param_t *dec)
+bool OPJ_CALLCONV fwrite_jp2k( const char fname[], jpip_dec_param_t *dec)
{
int outfd;
return true;
}
-void output_log( bool messages, bool metadata, bool ihdrbox, jpip_dec_param_t *dec)
+void OPJ_CALLCONV output_log( bool messages, bool metadata, bool ihdrbox, jpip_dec_param_t *dec)
{
if( messages)
print_msgqueue( dec->msgqueue);
}
}
-void destroy_jpipdecoder( jpip_dec_param_t **dec)
+void OPJ_CALLCONV destroy_jpipdecoder( jpip_dec_param_t **dec)
{
opj_free( (*dec)->jpipstream);
delete_msgqueue( &(*dec)->msgqueue);
opj_free( *dec);
}
-index_t * get_index_from_JP2file( int fd)
+index_t * OPJ_CALLCONV get_index_from_JP2file( int fd)
{
char *data;
return parse_jp2file( fd);
}
-void destroy_index( index_t **idx)
+void OPJ_CALLCONV destroy_index( index_t **idx)
{
delete_index( idx);
}
-void output_index( index_t *index)
+void OPJ_CALLCONV output_index( index_t *index)
{
print_index( *index);
}
* @param[in] port opening tcp port (valid No. 49152-65535)
* @return intialized decoding server record pointer
*/
-dec_server_record_t * init_dec_server( int port);
+OPJ_API dec_server_record_t * OPJ_CALLCONV init_dec_server( int port);
/**
* Terminate the image decoding server
*
* @param[in] rec address of deleting decoding server static record pointer
*/
-void terminate_dec_server( dec_server_record_t **rec);
+OPJ_API void OPJ_CALLCONV terminate_dec_server( dec_server_record_t **rec);
/**
* Accept client connection
* @param[in] rec decoding server static record pointer
* @return client socket ID, -1 if failed
*/
-client_t accept_connection( dec_server_record_t *rec);
+OPJ_API client_t OPJ_CALLCONV accept_connection( dec_server_record_t *rec);
/**
* Handle client request
* @param[in] rec decoding server static record pointer
* @return true if succeed
*/
-bool handle_clientreq( client_t client, dec_server_record_t *rec);
+OPJ_API bool OPJ_CALLCONV handle_clientreq( client_t client, dec_server_record_t *rec);
#endif /*SERVER*/
* @param[in] jp2 true in case of jp2 file encoding, else j2k file encoding
* @return JPIP decoding parameters pointer
*/
-jpip_dec_param_t * init_jpipdecoder( bool jp2);
+OPJ_API jpip_dec_param_t * OPJ_CALLCONV init_jpipdecoder( bool jp2);
/**
* Destroy jpip decoding parameters
*
* @param[in] dec address of JPIP decoding parameters pointer
*/
-void destroy_jpipdecoder( jpip_dec_param_t **dec);
+OPJ_API void OPJ_CALLCONV destroy_jpipdecoder( jpip_dec_param_t **dec);
/**
* Read jpip codestream from a file
* @param[in] dec JPIP decoding parameters pointer
* @return true if succeed
*/
-bool fread_jpip( const char fname[], jpip_dec_param_t *dec);
+OPJ_API bool OPJ_CALLCONV fread_jpip( const char fname[], jpip_dec_param_t *dec);
/**
* Decode jpip codestream
*
* @param[in] dec JPIP decoding parameters pointer
*/
-void decode_jpip( jpip_dec_param_t *dec);
+OPJ_API void OPJ_CALLCONV decode_jpip( jpip_dec_param_t *dec);
/**
* Write J2K/JP2 codestream to a file
* @param[in] dec JPIP decoding parameters pointer
* @return true if succeed
*/
-bool fwrite_jp2k( const char fname[], jpip_dec_param_t *dec);
+OPJ_API bool OPJ_CALLCONV fwrite_jp2k( const char fname[], jpip_dec_param_t *dec);
/**
* Option; print out parameter values to stderr
* @param[in] ihdrbox true if image header data is to be printed out
* @param[in] dec JPIP decoding parameters pointer
*/
-void output_log( bool messages, bool metadata, bool ihdrbox, jpip_dec_param_t *dec);
+OPJ_API void OPJ_CALLCONV output_log( bool messages, bool metadata, bool ihdrbox, jpip_dec_param_t *dec);
/*
* test the format of index (cidx) box in JP2 file
* @param[in] fd file descriptor of the JP2 file
* @return pointer to the generated structure of index parameters
*/
-index_t * get_index_from_JP2file( int fd);
+OPJ_API index_t * OPJ_CALLCONV get_index_from_JP2file( int fd);
/**
* Destroy index parameters
*
* @param[in,out] idx addressof the index pointer
*/
-void destroy_index( index_t **idx);
+OPJ_API void OPJ_CALLCONV destroy_index( index_t **idx);
/**
*
* @param[in] index index parameters
*/
-void output_index( index_t *index);
+OPJ_API void OPJ_CALLCONV output_index( index_t *index);
#endif /*SERVER*/