summaryrefslogtreecommitdiff
path: root/src/lib/openjpip
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2017-05-15 12:21:30 +0200
committerEven Rouault <even.rouault@spatialys.com>2017-05-15 12:21:30 +0200
commit3c2972f924857016bb454201c7e92f25de9105ee (patch)
treedee91c4c200c2e97c83fd4c46588bf923f23852c /src/lib/openjpip
parent28d2eabca79d06378843d1e94fecfb4a5e22178d (diff)
Reformat: apply reformattin on .h files (#128)
Diffstat (limited to 'src/lib/openjpip')
-rw-r--r--src/lib/openjpip/auxtrans_manager.h17
-rw-r--r--src/lib/openjpip/box_manager.h77
-rw-r--r--src/lib/openjpip/boxheader_manager.h23
-rw-r--r--src/lib/openjpip/byte_manager.h28
-rw-r--r--src/lib/openjpip/cache_manager.h56
-rw-r--r--src/lib/openjpip/cachemodel_manager.h42
-rw-r--r--src/lib/openjpip/channel_manager.h43
-rw-r--r--src/lib/openjpip/codestream_manager.h29
-rw-r--r--src/lib/openjpip/dec_clientmsg_handler.h29
-rw-r--r--src/lib/openjpip/faixbox_manager.h72
-rw-r--r--src/lib/openjpip/ihdrbox_manager.h19
-rw-r--r--src/lib/openjpip/imgreg_manager.h39
-rw-r--r--src/lib/openjpip/imgsock_manager.h30
-rw-r--r--src/lib/openjpip/index_manager.h120
-rw-r--r--src/lib/openjpip/j2kheader_manager.h11
-rw-r--r--src/lib/openjpip/jp2k_decoder.h8
-rw-r--r--src/lib/openjpip/jp2k_encoder.h17
-rw-r--r--src/lib/openjpip/jpip_parser.h49
-rw-r--r--src/lib/openjpip/jpipstream_manager.h11
-rw-r--r--src/lib/openjpip/manfbox_manager.h18
-rw-r--r--src/lib/openjpip/marker_manager.h25
-rw-r--r--src/lib/openjpip/metadata_manager.h54
-rw-r--r--src/lib/openjpip/mhixbox_manager.h40
-rw-r--r--src/lib/openjpip/msgqueue_manager.h73
-rw-r--r--src/lib/openjpip/openjpip.h119
-rw-r--r--src/lib/openjpip/placeholder_manager.h51
-rw-r--r--src/lib/openjpip/query_parser.h63
-rw-r--r--src/lib/openjpip/session_manager.h40
-rw-r--r--src/lib/openjpip/sock_manager.h17
-rw-r--r--src/lib/openjpip/target_manager.h57
30 files changed, 676 insertions, 601 deletions
diff --git a/src/lib/openjpip/auxtrans_manager.h b/src/lib/openjpip/auxtrans_manager.h
index e3e61451..ac553e12 100644
--- a/src/lib/openjpip/auxtrans_manager.h
+++ b/src/lib/openjpip/auxtrans_manager.h
@@ -35,11 +35,11 @@
#include "opj_includes.h"
/** auxiliary transport setting parameters*/
-typedef struct auxtrans_param{
- int tcpauxport; /**< tcp port*/
- int udpauxport; /**< udp port*/
- SOCKET tcplistensock; /**< listenning socket for aux tcp (-1 if not open)*/
- SOCKET udplistensock; /**< listenning socket for aux udp (-1 if not open)*/
+typedef struct auxtrans_param {
+ int tcpauxport; /**< tcp port*/
+ int udpauxport; /**< udp port*/
+ SOCKET tcplistensock; /**< listenning socket for aux tcp (-1 if not open)*/
+ SOCKET udplistensock; /**< listenning socket for aux udp (-1 if not open)*/
} auxtrans_param_t;
/**
@@ -49,14 +49,14 @@ typedef struct auxtrans_param{
* @param[in] udp_auxport opening udp auxiliary port ( 0 not to open, valid No. 49152-65535)
* @return intialized transport parameters
*/
-auxtrans_param_t init_aux_transport( int tcp_auxport, int udp_auxport);
+auxtrans_param_t init_aux_transport(int tcp_auxport, int udp_auxport);
/**
* Close auxiliary transport server of JPIP server
*
* @param[in] auxtrans closing transport server
*/
-void close_aux_transport( auxtrans_param_t auxtrans);
+void close_aux_transport(auxtrans_param_t auxtrans);
/**
* Send response data on aux transport
@@ -68,6 +68,7 @@ void close_aux_transport( auxtrans_param_t auxtrans);
* @param[in] length length of data
* @param[in] maxlenPerFrame maximum data length to send per frame
*/
-void send_responsedata_on_aux( OPJ_BOOL istcp, auxtrans_param_t auxtrans, const char cid[], void *data, OPJ_SIZE_T length, OPJ_SIZE_T maxlenPerFrame);
+void send_responsedata_on_aux(OPJ_BOOL istcp, auxtrans_param_t auxtrans,
+ const char cid[], void *data, OPJ_SIZE_T length, OPJ_SIZE_T maxlenPerFrame);
#endif /* !AUXTRANS_MANAGER_H_ */
diff --git a/src/lib/openjpip/box_manager.h b/src/lib/openjpip/box_manager.h
index d45d84e6..250ef640 100644
--- a/src/lib/openjpip/box_manager.h
+++ b/src/lib/openjpip/box_manager.h
@@ -28,26 +28,26 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef BOX_MANAGER_H_
-# define BOX_MANAGER_H_
+#ifndef BOX_MANAGER_H_
+# define BOX_MANAGER_H_
#include "byte_manager.h"
/** box parameters*/
-typedef struct box_param{
- int fd; /**< file descriptor*/
- OPJ_OFF_T offset; /**< byte position of the whole Box (LBox) in the file*/
- Byte_t headlen; /**< header length 8 or 16*/
- Byte8_t length; /**< length of the whole Box*/
- char type[4]; /**< type of information in the DBox*/
- struct box_param *next; /**< pointer to the next box*/
+typedef struct box_param {
+ int fd; /**< file descriptor*/
+ OPJ_OFF_T offset; /**< byte position of the whole Box (LBox) in the file*/
+ Byte_t headlen; /**< header length 8 or 16*/
+ Byte8_t length; /**< length of the whole Box*/
+ char type[4]; /**< type of information in the DBox*/
+ struct box_param *next; /**< pointer to the next box*/
} box_param_t;
/** Box list parameters*/
-typedef struct boxlist_param{
- box_param_t *first; /**< first box pointer of the list*/
- box_param_t *last; /**< last box pointer of the list*/
+typedef struct boxlist_param {
+ box_param_t *first; /**< first box pointer of the list*/
+ box_param_t *last; /**< last box pointer of the list*/
} boxlist_param_t;
@@ -66,7 +66,7 @@ boxlist_param_t * gene_boxlist(void);
* @param[in] length length of the decomposing region
* @return pointer to the generated boxlist
*/
-boxlist_param_t * get_boxstructure( int fd, OPJ_OFF_T offset, OPJ_SIZE_T length);
+boxlist_param_t * get_boxstructure(int fd, OPJ_OFF_T offset, OPJ_SIZE_T length);
/**
@@ -76,7 +76,7 @@ boxlist_param_t * get_boxstructure( int fd, OPJ_OFF_T offset, OPJ_SIZE_T length)
* @param[in] offset Box offset
* @return pointer to the structure of generate box parameters
*/
-box_param_t * gene_boxbyOffset( int fd, OPJ_OFF_T offset);
+box_param_t * gene_boxbyOffset(int fd, OPJ_OFF_T offset);
/**
@@ -86,29 +86,31 @@ box_param_t * gene_boxbyOffset( int fd, OPJ_OFF_T offset);
* @param[in] offset Box offset of the whole stream
* @return pointer to the structure of generate box parameters
*/
-box_param_t * gene_boxbyOffinStream( Byte_t *stream, OPJ_OFF_T offset);
+box_param_t * gene_boxbyOffinStream(Byte_t *stream, OPJ_OFF_T offset);
/**
* generate(search) box from JP2 file
*
* @param[in] fd file discriptor of the JP2 file
* @param[in] offset start Byte position of the search
- * @param[in] length Byte length of the search, if 0, size to the end of file
+ * @param[in] length Byte length of the search, if 0, size to the end of file
* @param[in] TBox Box Type
* @return pointer to the structure of generate/found box parameters
*/
-box_param_t * gene_boxbyType( int fd, OPJ_OFF_T offset, OPJ_SIZE_T length, const char TBox[]);
+box_param_t * gene_boxbyType(int fd, OPJ_OFF_T offset, OPJ_SIZE_T length,
+ const char TBox[]);
/**
* generate(search) box from code stream
*
* @param[in] stream code stream ( from the first byte)
* @param[in] offset start Byte position of the search
- * @param[in] length Byte length of the search, if 0, size to the end of file
+ * @param[in] length Byte length of the search, if 0, size to the end of file
* @param[in] TBox Box Type
* @return pointer to the structure of generate/found box parameters
*/
-box_param_t * gene_boxbyTypeinStream( Byte_t *stream, OPJ_OFF_T offset, OPJ_SIZE_T length, const char TBox[]);
+box_param_t * gene_boxbyTypeinStream(Byte_t *stream, OPJ_OFF_T offset,
+ OPJ_SIZE_T length, const char TBox[]);
/**
* generate child box from JP2 file at the given offset
@@ -117,7 +119,7 @@ box_param_t * gene_boxbyTypeinStream( Byte_t *stream, OPJ_OFF_T offset, OPJ_SIZE
* @param[in] offset offset from DBox first byte of superbox
* @return pointer to the structure of generate box parameters
*/
-box_param_t * gene_childboxbyOffset( box_param_t *superbox, OPJ_OFF_T offset);
+box_param_t * gene_childboxbyOffset(box_param_t *superbox, OPJ_OFF_T offset);
/**
* generate(search) box from JP2 file
@@ -127,7 +129,8 @@ box_param_t * gene_childboxbyOffset( box_param_t *superbox, OPJ_OFF_T offset);
* @param[in] TBox Box Type
* @return pointer to the structure of generate/found box parameters
*/
-box_param_t * gene_childboxbyType( box_param_t *superbox, OPJ_OFF_T offset, const char TBox[]);
+box_param_t * gene_childboxbyType(box_param_t *superbox, OPJ_OFF_T offset,
+ const char TBox[]);
/**
* get DBox offset
@@ -135,7 +138,7 @@ box_param_t * gene_childboxbyType( box_param_t *superbox, OPJ_OFF_T offset, cons
* @param[in] box box pointer
* @return DBox offset (byte position) in the file
*/
-OPJ_OFF_T get_DBoxoff( box_param_t *box);
+OPJ_OFF_T get_DBoxoff(box_param_t *box);
/**
@@ -144,7 +147,7 @@ OPJ_OFF_T get_DBoxoff( box_param_t *box);
* @param[in] box box pointer
* @return DBox length ( content length)
*/
-OPJ_SIZE_T get_DBoxlen( box_param_t *box);
+OPJ_SIZE_T get_DBoxlen(box_param_t *box);
/**
@@ -153,7 +156,7 @@ OPJ_SIZE_T get_DBoxlen( box_param_t *box);
* @param[in] box box pointer
* @return pointer to the fetched bytes
*/
-Byte_t * fetch_headbytes( box_param_t *box);
+Byte_t * fetch_headbytes(box_param_t *box);
/**
@@ -164,7 +167,7 @@ Byte_t * fetch_headbytes( box_param_t *box);
* @param[in] size Byte length
* @return pointer to the fetched data
*/
-Byte_t * fetch_DBoxbytes( box_param_t *box, OPJ_OFF_T offset, OPJ_SIZE_T size);
+Byte_t * fetch_DBoxbytes(box_param_t *box, OPJ_OFF_T offset, OPJ_SIZE_T size);
/**
* fetch DBox (Box Contents) 1-byte Byte codes in file stream
@@ -173,7 +176,7 @@ Byte_t * fetch_DBoxbytes( box_param_t *box, OPJ_OFF_T offset, OPJ_SIZE_T size);
* @param[in] offset start Byte position in DBox
* @return fetched code
*/
-Byte_t fetch_DBox1byte( box_param_t *box, OPJ_OFF_T offset);
+Byte_t fetch_DBox1byte(box_param_t *box, OPJ_OFF_T offset);
/**
* fetch DBox (Box Contents) 2-byte big endian Byte codes in file stream
@@ -182,7 +185,7 @@ Byte_t fetch_DBox1byte( box_param_t *box, OPJ_OFF_T offset);
* @param[in] offset start Byte position in DBox
* @return fetched code
*/
-Byte2_t fetch_DBox2bytebigendian( box_param_t *box, OPJ_OFF_T offset);
+Byte2_t fetch_DBox2bytebigendian(box_param_t *box, OPJ_OFF_T offset);
/**
* fetch DBox (Box Contents) 4-byte big endian Byte codes in file stream
@@ -191,7 +194,7 @@ Byte2_t fetch_DBox2bytebigendian( box_param_t *box, OPJ_OFF_T offset);
* @param[in] offset start Byte position in DBox
* @return fetched code
*/
-Byte4_t fetch_DBox4bytebigendian( box_param_t *box, OPJ_OFF_T offset);
+Byte4_t fetch_DBox4bytebigendian(box_param_t *box, OPJ_OFF_T offset);
/**
* fetch DBox (Box Contents) 8-byte big endian Byte codes in file stream
@@ -200,7 +203,7 @@ Byte4_t fetch_DBox4bytebigendian( box_param_t *box, OPJ_OFF_T offset);
* @param[in] offset start Byte position in DBox
* @return fetched code
*/
-Byte8_t fetch_DBox8bytebigendian( box_param_t *box, OPJ_OFF_T offset);
+Byte8_t fetch_DBox8bytebigendian(box_param_t *box, OPJ_OFF_T offset);
/**
@@ -210,14 +213,14 @@ Byte8_t fetch_DBox8bytebigendian( box_param_t *box, OPJ_OFF_T offset);
* @param[in] boxlist box list pointer
* @return found box pointer
*/
-box_param_t * search_box( const char type[], boxlist_param_t *boxlist);
+box_param_t * search_box(const char type[], boxlist_param_t *boxlist);
/**
* print box parameters
*
* @param[in] box box pointer
*/
-void print_box( box_param_t *box);
+void print_box(box_param_t *box);
/**
@@ -225,7 +228,7 @@ void print_box( box_param_t *box);
*
* @param[in] boxlist box list pointer
*/
-void print_allbox( boxlist_param_t *boxlist);
+void print_allbox(boxlist_param_t *boxlist);
/**
* delete a box in list
@@ -233,7 +236,7 @@ void print_allbox( boxlist_param_t *boxlist);
* @param[in,out] box address of the deleting box pointer
* @param[in] boxlist box list pointer
*/
-void delete_box_in_list( box_param_t **box, boxlist_param_t *boxlist);
+void delete_box_in_list(box_param_t **box, boxlist_param_t *boxlist);
/**
@@ -242,7 +245,7 @@ void delete_box_in_list( box_param_t **box, boxlist_param_t *boxlist);
* @param[in,out] type box type
* @param[in] boxlist box list pointer
*/
-void delete_box_in_list_by_type( const char type[], boxlist_param_t *boxlist);
+void delete_box_in_list_by_type(const char type[], boxlist_param_t *boxlist);
/**
@@ -250,7 +253,7 @@ void delete_box_in_list_by_type( const char type[], boxlist_param_t *boxlist);
*
* @param[in,out] boxlist address of the box list pointer
*/
-void delete_boxlist( boxlist_param_t **boxlist);
+void delete_boxlist(boxlist_param_t **boxlist);
/**
@@ -259,6 +262,6 @@ void delete_boxlist( boxlist_param_t **boxlist);
* @param[in] box box pointer
* @param[in] boxlist box list pointer
*/
-void insert_box_into_list( box_param_t *box, boxlist_param_t *boxlist);
+void insert_box_into_list(box_param_t *box, boxlist_param_t *boxlist);
-#endif /* !BOX_MANAGER_H_ */
+#endif /* !BOX_MANAGER_H_ */
diff --git a/src/lib/openjpip/boxheader_manager.h b/src/lib/openjpip/boxheader_manager.h
index 81e8288b..b43b447c 100644
--- a/src/lib/openjpip/boxheader_manager.h
+++ b/src/lib/openjpip/boxheader_manager.h
@@ -28,19 +28,19 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef BOXHEADER_MANAGER_H_
-# define BOXHEADER_MANAGER_H_
+#ifndef BOXHEADER_MANAGER_H_
+# define BOXHEADER_MANAGER_H_
#include "openjpeg.h"
#include "byte_manager.h"
#include "box_manager.h"
/** box header parameters*/
-typedef struct boxheader_param{
- Byte_t headlen; /**< header length 8 or 16*/
- Byte8_t length; /**< length of the reference Box*/
- char type[4]; /**< type of information in the DBox*/
- struct boxheader_param *next; /**< pointer to the next header box*/
+typedef struct boxheader_param {
+ Byte_t headlen; /**< header length 8 or 16*/
+ Byte8_t length; /**< length of the reference Box*/
+ char type[4]; /**< type of information in the DBox*/
+ struct boxheader_param *next; /**< pointer to the next header box*/
} boxheader_param_t;
@@ -51,7 +51,7 @@ typedef struct boxheader_param{
* @param[in] offset Box offset
* @return pointer to the structure of generate box header parameters
*/
-boxheader_param_t * gene_boxheader( int fd, OPJ_OFF_T offset);
+boxheader_param_t * gene_boxheader(int fd, OPJ_OFF_T offset);
/**
* generate a child box header at the given offset
@@ -60,13 +60,14 @@ boxheader_param_t * gene_boxheader( int fd, OPJ_OFF_T offset);
* @param[in] offset offset from DBox first byte of superbox
* @return pointer to the structure of generate box header parameters
*/
-boxheader_param_t * gene_childboxheader( box_param_t *superbox, OPJ_OFF_T offset);
+boxheader_param_t * gene_childboxheader(box_param_t *superbox,
+ OPJ_OFF_T offset);
/**
* print box header parameters
*
* @param[in] boxheader boxheader pointer
*/
-void print_boxheader( boxheader_param_t *boxheader);
+void print_boxheader(boxheader_param_t *boxheader);
-#endif /* !BOXHEADER_MANAGER_H_ */
+#endif /* !BOXHEADER_MANAGER_H_ */
diff --git a/src/lib/openjpip/byte_manager.h b/src/lib/openjpip/byte_manager.h
index 16091ece..57a7d501 100644
--- a/src/lib/openjpip/byte_manager.h
+++ b/src/lib/openjpip/byte_manager.h
@@ -28,8 +28,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef BYTE_MANAGER_H_
-#define BYTE_MANAGER_H_
+#ifndef BYTE_MANAGER_H_
+#define BYTE_MANAGER_H_
#include <stddef.h>
#include "openjpeg.h"
@@ -47,7 +47,7 @@ typedef uint64_t Byte8_t;
* @param[in] size Byte length
* @return pointer to the fetched data
*/
-Byte_t * fetch_bytes( int fd, OPJ_OFF_T offset, OPJ_SIZE_T size);
+Byte_t * fetch_bytes(int fd, OPJ_OFF_T offset, OPJ_SIZE_T size);
/**
@@ -57,7 +57,7 @@ Byte_t * fetch_bytes( int fd, OPJ_OFF_T offset, OPJ_SIZE_T size);
* @param[in] offset start Byte position
* @return fetched codes
*/
-Byte_t fetch_1byte( int fd, OPJ_OFF_T offset);
+Byte_t fetch_1byte(int fd, OPJ_OFF_T offset);
/**
* fetch a 2-byte big endian Byte codes in file stream
@@ -66,7 +66,7 @@ Byte_t fetch_1byte( int fd, OPJ_OFF_T offset);
* @param[in] offset start Byte position
* @return fetched codes
*/
-Byte2_t fetch_2bytebigendian( int fd, OPJ_OFF_T offset);
+Byte2_t fetch_2bytebigendian(int fd, OPJ_OFF_T offset);
/**
* fetch a 4-byte big endian Byte codes in file stream
@@ -75,7 +75,7 @@ Byte2_t fetch_2bytebigendian( int fd, OPJ_OFF_T offset);
* @param[in] offset start Byte position
* @return fetched codes
*/
-Byte4_t fetch_4bytebigendian( int fd, OPJ_OFF_T offset);
+Byte4_t fetch_4bytebigendian(int fd, OPJ_OFF_T offset);
/**
* fetch a 8-byte big endian Byte codes in file stream
@@ -84,7 +84,7 @@ Byte4_t fetch_4bytebigendian( int fd, OPJ_OFF_T offset);
* @param[in] offset start Byte position
* @return fetched codes
*/
-Byte8_t fetch_8bytebigendian( int fd, OPJ_OFF_T offset);
+Byte8_t fetch_8bytebigendian(int fd, OPJ_OFF_T offset);
/**
@@ -93,7 +93,7 @@ Byte8_t fetch_8bytebigendian( int fd, OPJ_OFF_T offset);
* @param[in] buf Byte codes
* @return resolved number
*/
-Byte2_t big2( Byte_t *buf);
+Byte2_t big2(Byte_t *buf);
/**
* convert 4-byte big endian Byte codes to number
@@ -101,7 +101,7 @@ Byte2_t big2( Byte_t *buf);
* @param[in] buf Byte codes
* @return resolved number
*/
-Byte4_t big4( Byte_t *buf);
+Byte4_t big4(Byte_t *buf);
/**
* convert 8-byte big endian Byte codes to number
@@ -109,15 +109,15 @@ Byte4_t big4( Byte_t *buf);
* @param[in] buf Byte codes
* @return resolved number
*/
-Byte8_t big8( Byte_t *buf);
+Byte8_t big8(Byte_t *buf);
/**
* modify 4Byte code in a codestream
- *
+ *
* @param[in] code code value
* @param[out] stream modifying codestream
*/
-void modify_4Bytecode( Byte4_t code, Byte_t *stream);
+void modify_4Bytecode(Byte4_t code, Byte_t *stream);
/**
* Get file size
@@ -125,6 +125,6 @@ void modify_4Bytecode( Byte4_t code, Byte_t *stream);
* @param[in] fd file discriptor
* @return file size
*/
-OPJ_OFF_T get_filesize( int fd);
+OPJ_OFF_T get_filesize(int fd);
-#endif /* !BYTE_MANAGER_H_ */
+#endif /* !BYTE_MANAGER_H_ */
diff --git a/src/lib/openjpip/cache_manager.h b/src/lib/openjpip/cache_manager.h
index 466fd7ea..64358326 100644
--- a/src/lib/openjpip/cache_manager.h
+++ b/src/lib/openjpip/cache_manager.h
@@ -28,28 +28,28 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef CACHE_MANAGER_H_
-# define CACHE_MANAGER_H_
+#ifndef CACHE_MANAGER_H_
+# define CACHE_MANAGER_H_
#include "metadata_manager.h"
#include "ihdrbox_manager.h"
/** cache parameters*/
-typedef struct cache_param{
- char *filename; /**< file name*/
- char *tid; /**< taregt identifier*/
- int csn; /**< codestream number*/
- char **cid; /**< dynamic array of channel identifiers*/
- int numOfcid; /**< number of cids*/
- metadatalist_param_t *metadatalist; /**< metadata-bin list*/
- ihdrbox_param_t *ihdrbox; /**< ihdrbox*/
- struct cache_param *next; /**< pointer to the next cache*/
+typedef struct cache_param {
+ char *filename; /**< file name*/
+ char *tid; /**< taregt identifier*/
+ int csn; /**< codestream number*/
+ char **cid; /**< dynamic array of channel identifiers*/
+ int numOfcid; /**< number of cids*/
+ metadatalist_param_t *metadatalist; /**< metadata-bin list*/
+ ihdrbox_param_t *ihdrbox; /**< ihdrbox*/
+ struct cache_param *next; /**< pointer to the next cache*/
} cache_param_t;
/**< cache list parameters*/
-typedef struct cachelist_param{
- cache_param_t *first; /**< first cache pointer of the list*/
- cache_param_t *last; /**< last cache pointer of the list*/
+typedef struct cachelist_param {
+ cache_param_t *first; /**< first cache pointer of the list*/
+ cache_param_t *last; /**< last cache pointer of the list*/
} cachelist_param_t;
@@ -76,14 +76,15 @@ void delete_cachelist(cachelist_param_t **cachelist);
* @param[in] cid channel identifier
* @return pointer to the generated cache
*/
-cache_param_t * gene_cache( const char *targetname, int csn, char *tid, char *cid);
+cache_param_t * gene_cache(const char *targetname, int csn, char *tid,
+ char *cid);
/**
* delete a cache
*
* @param[in] cache address of the cache pointer
*/
-void delete_cache( cache_param_t **cache);
+void delete_cache(cache_param_t **cache);
/**
* insert a cache into list
@@ -91,7 +92,7 @@ void delete_cache( cache_param_t **cache);
* @param[in] cache cache pointer
* @param[in] cachelist cache list pointer
*/
-void insert_cache_into_list( cache_param_t *cache, cachelist_param_t *cachelist);
+void insert_cache_into_list(cache_param_t *cache, cachelist_param_t *cachelist);
/**
@@ -101,7 +102,8 @@ void insert_cache_into_list( cache_param_t *cache, cachelist_param_t *cachelist)
* @param[in] cachelist cache list pointer
* @return found cache pointer
*/
-cache_param_t * search_cache( const char targetname[], cachelist_param_t *cachelist);
+cache_param_t * search_cache(const char targetname[],
+ cachelist_param_t *cachelist);
/**
@@ -111,7 +113,7 @@ cache_param_t * search_cache( const char targetname[], cachelist_param_t *cachel
* @param[in] cachelist cache list pointer
* @return found cache pointer
*/
-cache_param_t * search_cacheBycsn( int csn, cachelist_param_t *cachelist);
+cache_param_t * search_cacheBycsn(int csn, cachelist_param_t *cachelist);
/**
@@ -121,7 +123,8 @@ cache_param_t * search_cacheBycsn( int csn, cachelist_param_t *cachelist);
* @param[in] cachelist cache list pointer
* @return found cache pointer
*/
-cache_param_t * search_cacheBycid( const char cid[], cachelist_param_t *cachelist);
+cache_param_t * search_cacheBycid(const char cid[],
+ cachelist_param_t *cachelist);
/**
@@ -131,7 +134,8 @@ cache_param_t * search_cacheBycid( const char cid[], cachelist_param_t *cachelis
* @param[in] cachelist cache list pointer
* @return found cache pointer
*/
-cache_param_t * search_cacheBytid( const char tid[], cachelist_param_t *cachelist);
+cache_param_t * search_cacheBytid(const char tid[],
+ cachelist_param_t *cachelist);
/**
* add cid into a cache
@@ -139,7 +143,7 @@ cache_param_t * search_cacheBytid( const char tid[], cachelist_param_t *cachelis
* @param[in] cid channel identifier
* @param[in] cache cache pointer
*/
-void add_cachecid( const char *cid, cache_param_t *cache);
+void add_cachecid(const char *cid, cache_param_t *cache);
/**
@@ -148,7 +152,7 @@ void add_cachecid( const char *cid, cache_param_t *cache);
* @param[in] tid target identifier
* @param[in] cache cache pointer
*/
-void update_cachetid( const char *tid, cache_param_t *cache);
+void update_cachetid(const char *tid, cache_param_t *cache);
/**
@@ -157,7 +161,7 @@ void update_cachetid( const char *tid, cache_param_t *cache);
* @param[in] cid channel identifier
* @param[in] cachelist cachelist pointer
*/
-void remove_cachecid( const char *cid, cachelist_param_t *cachelist);
+void remove_cachecid(const char *cid, cachelist_param_t *cachelist);
/**
@@ -165,13 +169,13 @@ void remove_cachecid( const char *cid, cachelist_param_t *cachelist);
*
* @param[in] cache cache pointer
*/
-void print_cache( cache_param_t *cache);
+void print_cache(cache_param_t *cache);
/**
* print all cache parameters
*
* @param[in] cachelist cache list pointer
*/
-void print_allcache( cachelist_param_t *cachelist);
+void print_allcache(cachelist_param_t *cachelist);
#endif /* !CACHE_MANAGER_H_ */
diff --git a/src/lib/openjpip/cachemodel_manager.h b/src/lib/openjpip/cachemodel_manager.h
index 041f1ad9..4cf47856 100644
--- a/src/lib/openjpip/cachemodel_manager.h
+++ b/src/lib/openjpip/cachemodel_manager.h
@@ -28,26 +28,26 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef CACHEMODEL_MANAGER_H_
-# define CACHEMODEL_MANAGER_H_
+#ifndef CACHEMODEL_MANAGER_H_
+# define CACHEMODEL_MANAGER_H_
#include "target_manager.h"
/** Cache model parameters*/
-typedef struct cachemodel_param{
- target_param_t *target; /**< reference pointer to the target*/
- OPJ_BOOL jppstream; /**< return type, true: JPP-stream, false: JPT-stream*/
- OPJ_BOOL mhead_model; /**< main header model, if sent, 1, else 0*/
- OPJ_BOOL *tp_model; /**< dynamic array pointer of tile part model, if sent, 1, else 0*/
- OPJ_BOOL *th_model; /**< dynamic array pointer of tile header model*/
- OPJ_BOOL **pp_model; /**< dynamic array pointer of precint packet model*/
- struct cachemodel_param *next; /**< pointer to the next cache model*/
+typedef struct cachemodel_param {
+ target_param_t *target; /**< reference pointer to the target*/
+ OPJ_BOOL jppstream; /**< return type, true: JPP-stream, false: JPT-stream*/
+ OPJ_BOOL mhead_model; /**< main header model, if sent, 1, else 0*/
+ OPJ_BOOL *tp_model; /**< dynamic array pointer of tile part model, if sent, 1, else 0*/
+ OPJ_BOOL *th_model; /**< dynamic array pointer of tile header model*/
+ OPJ_BOOL **pp_model; /**< dynamic array pointer of precint packet model*/
+ struct cachemodel_param *next; /**< pointer to the next cache model*/
} cachemodel_param_t;
/** Cache model list parameters*/
-typedef struct cachemodellist_param{
- cachemodel_param_t *first; /**< first cache model pointer of the list*/
- cachemodel_param_t *last; /**< last cache model pointer of the list*/
+typedef struct cachemodellist_param {
+ cachemodel_param_t *first; /**< first cache model pointer of the list*/
+ cachemodel_param_t *last; /**< last cache model pointer of the list*/
} cachemodellist_param_t;
@@ -66,7 +66,8 @@ cachemodellist_param_t * gene_cachemodellist(void);
* @param[in] reqJPP if JPP-stream is desired true, JPT-stream false
* @return pointer to the generated cache model
*/
-cachemodel_param_t * gene_cachemodel( cachemodellist_param_t *cachemodellist, target_param_t *target, OPJ_BOOL reqJPP);
+cachemodel_param_t * gene_cachemodel(cachemodellist_param_t *cachemodellist,
+ target_param_t *target, OPJ_BOOL reqJPP);
/**
@@ -74,7 +75,7 @@ cachemodel_param_t * gene_cachemodel( cachemodellist_param_t *cachemodellist, ta
*
* @param[in] cachemodel cache model
*/
-void print_cachemodel( cachemodel_param_t cachemodel);
+void print_cachemodel(cachemodel_param_t cachemodel);
/**
@@ -84,7 +85,8 @@ void print_cachemodel( cachemodel_param_t cachemodel);
* @param[in] cachemodellist cache model list
* @return found cache model pointer
*/
-cachemodel_param_t * search_cachemodel( target_param_t *target, cachemodellist_param_t *cachemodellist);
+cachemodel_param_t * search_cachemodel(target_param_t *target,
+ cachemodellist_param_t *cachemodellist);
/**
@@ -93,7 +95,7 @@ cachemodel_param_t * search_cachemodel( target_param_t *target, cachemodellist_p
* @param[in] cachemodel cache model
* @return true if sent all, false otherwise
*/
-OPJ_BOOL is_allsent( cachemodel_param_t cachemodel);
+OPJ_BOOL is_allsent(cachemodel_param_t cachemodel);
/**
@@ -101,14 +103,14 @@ OPJ_BOOL is_allsent( cachemodel_param_t cachemodel);
*
* @param[in] cachemodel address of the cachemodel pointer
*/
-void delete_cachemodel( cachemodel_param_t **cachemodel);
+void delete_cachemodel(cachemodel_param_t **cachemodel);
/**
* delete cachemodel list
*
* @param[in,out] cachemodellist address of the cachemodel list pointer
*/
-void delete_cachemodellist( cachemodellist_param_t **cachemodellist);
+void delete_cachemodellist(cachemodellist_param_t **cachemodellist);
-#endif /* !CACHEMODEL_MANAGER_H_ */
+#endif /* !CACHEMODEL_MANAGER_H_ */
diff --git a/src/lib/openjpip/channel_manager.h b/src/lib/openjpip/channel_manager.h
index 52bfa5e5..6f981ad6 100644
--- a/src/lib/openjpip/channel_manager.h
+++ b/src/lib/openjpip/channel_manager.h
@@ -28,8 +28,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef CHANNEL_MANAGER_H_
-# define CHANNEL_MANAGER_H_
+#ifndef CHANNEL_MANAGER_H_
+# define CHANNEL_MANAGER_H_
#include <time.h>
#include "query_parser.h"
@@ -40,20 +40,20 @@
#define MAX_LENOFCID 30
/** Channel parameters*/
-typedef struct channel_param{
- cachemodel_param_t *cachemodel; /**< reference pointer to the cache model*/
- char cid[MAX_LENOFCID]; /**< channel identifier*/
- cnew_transport_t aux; /**< auxiliary transport*/
- /* - a record of the client's capabilities and preferences to the extent that the server queues requests*/
- time_t start_tm; /**< starting time*/
- struct channel_param *next; /**< pointer to the next channel*/
+typedef struct channel_param {
+ cachemodel_param_t *cachemodel; /**< reference pointer to the cache model*/
+ char cid[MAX_LENOFCID]; /**< channel identifier*/
+ cnew_transport_t aux; /**< auxiliary transport*/
+ /* - a record of the client's capabilities and preferences to the extent that the server queues requests*/
+ time_t start_tm; /**< starting time*/
+ struct channel_param *next; /**< pointer to the next channel*/
} channel_param_t;
/** Channel list parameters*/
-typedef struct channellist_param{
- channel_param_t *first; /**< first channel pointer of the list*/
- channel_param_t *last; /**< last channel pointer of the list*/
+typedef struct channellist_param {
+ channel_param_t *first; /**< first channel pointer of the list*/
+ channel_param_t *last; /**< last channel pointer of the list*/
} channellist_param_t;
@@ -74,7 +74,9 @@ channellist_param_t * gene_channellist(void);
* @param[in] channellist channel list pointer
* @return pointer to the generated channel
*/
-channel_param_t * gene_channel( query_param_t query_param, auxtrans_param_t auxtrans, cachemodel_param_t *cachemodel, channellist_param_t *channellist);
+channel_param_t * gene_channel(query_param_t query_param,
+ auxtrans_param_t auxtrans, cachemodel_param_t *cachemodel,
+ channellist_param_t *channellist);
/**
* set channel variable parameters
@@ -82,7 +84,8 @@ channel_param_t * gene_channel( query_param_t query_param, auxtrans_param_t auxt
* @param[in] query_param query parameters
* @param[in,out] channel pointer to the modifying channel
*/
-void set_channel_variable_param( query_param_t query_param, channel_param_t *channel);
+void set_channel_variable_param(query_param_t query_param,
+ channel_param_t *channel);
/**
* delete a channel
@@ -90,7 +93,8 @@ void set_channel_variable_param( query_param_t query_param, channel_param_t *cha
* @param[in] channel address of the deleting channel pointer
* @param[in,out] channellist channel list pointer
*/
-void delete_channel( channel_param_t **channel, channellist_param_t *channellist);
+void delete_channel(channel_param_t **channel,
+ channellist_param_t *channellist);
/**
@@ -98,7 +102,7 @@ void delete_channel( channel_param_t **channel, channellist_param_t *channellist
*
* @param[in,out] channellist address of the channel list pointer
*/
-void delete_channellist( channellist_param_t **channellist);
+void delete_channellist(channellist_param_t **channellist);
/**
@@ -106,7 +110,7 @@ void delete_channellist( channellist_param_t **channellist);
*
* @param[in] channellist channel list pointer
*/
-void print_allchannel( channellist_param_t *channellist);
+void print_allchannel(channellist_param_t *channellist);
/**
@@ -116,5 +120,6 @@ void print_allchannel( channellist_param_t *channellist);
* @param[in] channellist channel list pointer
* @return found channel pointer
*/
-channel_param_t * search_channel( const char cid[], channellist_param_t *channellist);
-#endif /* !CHANNEL_MANAGER_H_ */
+channel_param_t * search_channel(const char cid[],
+ channellist_param_t *channellist);
+#endif /* !CHANNEL_MANAGER_H_ */
diff --git a/src/lib/openjpip/codestream_manager.h b/src/lib/openjpip/codestream_manager.h
index 71f73b23..632294ae 100644
--- a/src/lib/openjpip/codestream_manager.h
+++ b/src/lib/openjpip/codestream_manager.h
@@ -28,16 +28,16 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef CODESTREAM_MANAGER_H_
-# define CODESTREAM_MANAGER_H_
+#ifndef CODESTREAM_MANAGER_H_
+# define CODESTREAM_MANAGER_H_
#include "byte_manager.h"
/** codestream parameters*/
-typedef struct codestream_param{
- int fd; /**< file descriptor*/
- OPJ_OFF_T offset; /**< byte position of DBox (Box Contents) in the file*/
- Byte8_t length; /**< content length*/
+typedef struct codestream_param {
+ int fd; /**< file descriptor*/
+ OPJ_OFF_T offset; /**< byte position of DBox (Box Contents) in the file*/
+ Byte8_t length; /**< content length*/
} codestream_param_t;
@@ -49,7 +49,7 @@ typedef struct codestream_param{
* @param[in] length codestream length
* @return structure of generated codestream parameters
*/
-codestream_param_t set_codestream( int fd, OPJ_OFF_T offset, OPJ_SIZE_T length);
+codestream_param_t set_codestream(int fd, OPJ_OFF_T offset, OPJ_SIZE_T length);
/**
@@ -60,7 +60,8 @@ codestream_param_t set_codestream( int fd, OPJ_OFF_T offset, OPJ_SIZE_T length);
* @param[in] size Byte length
* @return pointer to the fetched data
*/
-Byte_t * fetch_codestreambytes( codestream_param_t *cs, OPJ_OFF_T offset, OPJ_SIZE_T size);
+Byte_t * fetch_codestreambytes(codestream_param_t *cs, OPJ_OFF_T offset,
+ OPJ_SIZE_T size);
/**
* fetch Codestream 1-byte Byte code in file stream
@@ -69,7 +70,7 @@ Byte_t * fetch_codestreambytes( codestream_param_t *cs, OPJ_OFF_T offset, OPJ_SI
* @param[in] offset start Byte position in codestream
* @return fetched code
*/
-Byte_t fetch_codestream1byte( codestream_param_t *cs, OPJ_OFF_T offset);
+Byte_t fetch_codestream1byte(codestream_param_t *cs, OPJ_OFF_T offset);
/**
* fetch Codestream 2-byte big endian Byte codes in file stream
@@ -78,7 +79,8 @@ Byte_t fetch_codestream1byte( codestream_param_t *cs, OPJ_OFF_T offset);
* @param[in] offset start Byte position in codestream
* @return fetched code
*/
-Byte2_t fetch_codestream2bytebigendian( codestream_param_t *cs, OPJ_OFF_T offset);
+Byte2_t fetch_codestream2bytebigendian(codestream_param_t *cs,
+ OPJ_OFF_T offset);
/**
* fetch Codestream 4-byte big endian Byte codes in file stream
@@ -87,7 +89,8 @@ Byte2_t fetch_codestream2bytebigendian( codestream_param_t *cs, OPJ_OFF_T offset
* @param[in] offset start Byte position in codestream
* @return fetched code
*/
-Byte4_t fetch_codestream4bytebigendian( codestream_param_t *cs, OPJ_OFF_T offset);
+Byte4_t fetch_codestream4bytebigendian(codestream_param_t *cs,
+ OPJ_OFF_T offset);
/**
@@ -95,7 +98,7 @@ Byte4_t fetch_codestream4bytebigendian( codestream_param_t *cs, OPJ_OFF_T offset
*
* @param[in] cs codestream
*/
-void print_codestream( codestream_param_t cs);
+void print_codestream(codestream_param_t cs);
-#endif /* !CODESTREAM_MANAGER_H_ */
+#endif /* !CODESTREAM_MANAGER_H_ */
diff --git a/src/lib/openjpip/dec_clientmsg_handler.h b/src/lib/openjpip/dec_clientmsg_handler.h
index 48950db8..d04ea41f 100644
--- a/src/lib/openjpip/dec_clientmsg_handler.h
+++ b/src/lib/openjpip/dec_clientmsg_handler.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2014, Professor Benoit Macq
- * Copyright (c) 2010-2011, Kaori Hagihara
+ * Copyright (c) 2010-2011, Kaori Hagihara
* Copyright (c) 2011, Lucian Corlaciu, GSoC
* All rights reserved.
*
@@ -29,8 +29,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef DEC_CLIENTMSG_HANDLER_H_
-# define DEC_CLIENTMSG_HANDLER_H_
+#ifndef DEC_CLIENTMSG_HANDLER_H_
+# define DEC_CLIENTMSG_HANDLER_H_
#include "imgsock_manager.h"
#include "cache_manager.h"
@@ -46,7 +46,8 @@
* @param[in,out] streamlen address of stream length
* @param[in,out] msgqueue message queue pointer
*/
-void handle_JPIPstreamMSG( SOCKET connected_socket, cachelist_param_t *cachelist, Byte_t **jpipstream, OPJ_SIZE_T *streamlen, msgqueue_param_t *msgqueue);
+void handle_JPIPstreamMSG(SOCKET connected_socket, cachelist_param_t *cachelist,
+ Byte_t **jpipstream, OPJ_SIZE_T *streamlen, msgqueue_param_t *msgqueue);
/**
* handle PNM request message
@@ -56,7 +57,8 @@ void handle_JPIPstreamMSG( SOCKET connected_socket, cachelist_param_t *cachelist
* @param[in] msgqueue message queue pointer
* @param[in] cachelist cache list pointer
*/
-void handle_PNMreqMSG( SOCKET connected_socket, Byte_t *jpipstream, msgqueue_param_t *msgqueue, cachelist_param_t *cachelist);
+void handle_PNMreqMSG(SOCKET connected_socket, Byte_t *jpipstream,
+ msgqueue_param_t *msgqueue, cachelist_param_t *cachelist);
/**
* handle XML request message
@@ -65,7 +67,8 @@ void handle_PNMreqMSG( SOCKET connected_socket, Byte_t *jpipstream, msgqueue_par
* @param[in] jpipstream address of caching jpipstream pointer
* @param[in] cachelist cache list pointer
*/
-void handle_XMLreqMSG( SOCKET connected_socket, Byte_t *jpipstream, cachelist_param_t *cachelist);
+void handle_XMLreqMSG(SOCKET connected_socket, Byte_t *jpipstream,
+ cachelist_param_t *cachelist);
/**
* handle TargetID request message
@@ -73,7 +76,7 @@ void handle_XMLreqMSG( SOCKET connected_socket, Byte_t *jpipstream, cachelist_pa
* @param[in] connected_socket socket descriptor
* @param[in] cachelist cache list pointer
*/
-void handle_TIDreqMSG( SOCKET connected_socket, cachelist_param_t *cachelist);
+void handle_TIDreqMSG(SOCKET connected_socket, cachelist_param_t *cachelist);
/**
* handle ChannelID request message
@@ -81,7 +84,7 @@ void handle_TIDreqMSG( SOCKET connected_socket, cachelist_param_t *cachelist);
* @param[in] connected_socket socket descriptor
* @param[in] cachelist cache list pointer
*/
-void handle_CIDreqMSG( SOCKET connected_socket, cachelist_param_t *cachelist);
+void handle_CIDreqMSG(SOCKET connected_socket, cachelist_param_t *cachelist);
/**
* handle distroy ChannelID message
@@ -89,7 +92,7 @@ void handle_CIDreqMSG( SOCKET connected_socket, cachelist_param_t *cachelist);
* @param[in] connected_socket socket descriptor
* @param[in,out] cachelist cache list pointer
*/
-void handle_dstCIDreqMSG( SOCKET connected_socket, cachelist_param_t *cachelist);
+void handle_dstCIDreqMSG(SOCKET connected_socket, cachelist_param_t *cachelist);
/**
* handle SIZ request message
@@ -99,7 +102,8 @@ void handle_dstCIDreqMSG( SOCKET connected_socket, cachelist_param_t *cachelist)
* @param[in] msgqueue message queue pointer
* @param[in,out] cachelist cache list pointer
*/
-void handle_SIZreqMSG( SOCKET connected_socket, Byte_t *jpipstream, msgqueue_param_t *msgqueue, cachelist_param_t *cachelist);
+void handle_SIZreqMSG(SOCKET connected_socket, Byte_t *jpipstream,
+ msgqueue_param_t *msgqueue, cachelist_param_t *cachelist);
/**
* handle saving JP2 file request message
@@ -109,7 +113,8 @@ void handle_SIZreqMSG( SOCKET connected_socket, Byte_t *jpipstream, msgqueue_par
* @param[in] msgqueue message queue pointer
* @param[in] jpipstream address of caching jpipstream pointer
*/
-void handle_JP2saveMSG( SOCKET connected_socket, cachelist_param_t *cachelist, msgqueue_param_t *msgqueue, Byte_t *jpipstream);
+void handle_JP2saveMSG(SOCKET connected_socket, cachelist_param_t *cachelist,
+ msgqueue_param_t *msgqueue, Byte_t *jpipstream);
-#endif /* !DEC_CLIENTMSG_HANDLER_H_ */
+#endif /* !DEC_CLIENTMSG_HANDLER_H_ */
diff --git a/src/lib/openjpip/faixbox_manager.h b/src/lib/openjpip/faixbox_manager.h
index ec893c37..9b0ea76c 100644
--- a/src/lib/openjpip/faixbox_manager.h
+++ b/src/lib/openjpip/faixbox_manager.h
@@ -28,53 +28,55 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef FAIXBOX_MANAGER_H_
-# define FAIXBOX_MANAGER_H_
+#ifndef FAIXBOX_MANAGER_H_
+# define FAIXBOX_MANAGER_H_
#include "byte_manager.h"
#include "box_manager.h"
/** 4byte parameters of a faix element*/
-typedef struct faixelem4_param{
- Byte4_t off; /**< offset*/
- Byte4_t len; /**< length*/
+typedef struct faixelem4_param {
+ Byte4_t off; /**< offset*/
+ Byte4_t len; /**< length*/
} faixelem4_param_t;
/** 8byte parameters of a faix element*/
-typedef struct faixelem8_param{
- Byte8_t off; /**< offset*/
- Byte8_t len; /**< length*/
+typedef struct faixelem8_param {
+ Byte8_t off; /**< offset*/
+ Byte8_t len; /**< length*/
} faixelem8_param_t;
/** 4byte parameters of fragment array index box*/
-typedef struct subfaixbox4_param{
- Byte4_t nmax; /**< maximum number of valid elements in any row of the array*/
- Byte4_t m; /**< number of raws of the array*/
- faixelem4_param_t *elem; /**< dynamic array pointer of faix elements*/
- Byte4_t *aux; /**< dynamic array pointer of auxiliary*/
- /**info in each element for version 2 or 3*/
+typedef struct subfaixbox4_param {
+ Byte4_t nmax; /**< maximum number of valid elements in any row of the array*/
+ Byte4_t m; /**< number of raws of the array*/
+ faixelem4_param_t *elem; /**< dynamic array pointer of faix elements*/
+ Byte4_t *aux; /**< dynamic array pointer of auxiliary*/
+ /**info in each element for version 2 or 3*/
} subfaixbox4_param_t;
/** 8byte parameters of fragment array index box*/
-typedef struct subfaixbox8_param{
- Byte8_t nmax; /**< maximum number of valid elements in any row of the array*/
- Byte8_t m; /**< number of raws of the array*/
- faixelem8_param_t *elem; /**< dynamic array pointer of faix elements*/
- Byte4_t *aux; /**< dynamic array pointer of auxiliary*/
- /**info in each element for version 2 or 3*/
+typedef struct subfaixbox8_param {
+ Byte8_t nmax; /**< maximum number of valid elements in any row of the array*/
+ Byte8_t m; /**< number of raws of the array*/
+ faixelem8_param_t *elem; /**< dynamic array pointer of faix elements*/
+ Byte4_t *aux; /**< dynamic array pointer of auxiliary*/
+ /**info in each element for version 2 or 3*/
} subfaixbox8_param_t;
/** variable sized parameters in fragment array index box*/
-typedef union subfaixbox_param{
- subfaixbox4_param_t *byte4_params; /**< parameters with 4byte codes for version 0 or 2*/
- subfaixbox8_param_t *byte8_params; /**< parameters with 8byte codes for version 1 or 3*/
+typedef union subfaixbox_param {
+ subfaixbox4_param_t
+ *byte4_params; /**< parameters with 4byte codes for version 0 or 2*/
+ subfaixbox8_param_t
+ *byte8_params; /**< parameters with 8byte codes for version 1 or 3*/
} subfaixbox_param_t;
/** fragment array index box parameters*/
/** I.3.2.4.2 Fragment Array Index box*/
-typedef struct faixbox_param{
- Byte_t version; /**< Refer to the Table I.3 - Version values*/
- subfaixbox_param_t subfaixbox; /**< rest information in faixbox*/
+typedef struct faixbox_param {
+ Byte_t version; /**< Refer to the Table I.3 - Version values*/
+ subfaixbox_param_t subfaixbox; /**< rest information in faixbox*/
} faixbox_param_t;
@@ -84,7 +86,7 @@ typedef struct faixbox_param{
* @param[in] box pointer to the reference faix_box
* @return generated faixbox
*/
-faixbox_param_t * gene_faixbox( box_param_t *box);
+faixbox_param_t * gene_faixbox(box_param_t *box);
/**
@@ -92,7 +94,7 @@ faixbox_param_t * gene_faixbox( box_param_t *box);
*
* @param[in] faix faix box pointer
*/
-void print_faixbox( faixbox_param_t *faix);
+void print_faixbox(faixbox_param_t *faix);
/**
@@ -100,21 +102,21 @@ void print_faixbox( faixbox_param_t *faix);
*
* @param[in,out] faix addressof the faixbox pointer
*/
-void delete_faixbox( faixbox_param_t **faix);
+void delete_faixbox(faixbox_param_t **faix);
/**
* get nmax parameter value from faix box
*
* @param[in] faix faix box pointer
*/
-Byte8_t get_nmax( faixbox_param_t *faix);
+Byte8_t get_nmax(faixbox_param_t *faix);
/**
* get m parameter value from faix box
*
* @param[in] faix faix box pointer
*/
-Byte8_t get_m( faixbox_param_t *faix);
+Byte8_t get_m(faixbox_param_t *faix);
/**
* get offset of a element from faix box
@@ -123,7 +125,7 @@ Byte8_t get_m( faixbox_param_t *faix);
* @param[in] elem_id element id in a row (0<= <nmax)
* @param[in] row_id row id (0<= <m)
*/
-Byte8_t get_elemOff( faixbox_param_t *faix, Byte8_t elem_id, Byte8_t row_id);
+Byte8_t get_elemOff(faixbox_param_t *faix, Byte8_t elem_id, Byte8_t row_id);
/**
* get length of a element from faix box
@@ -132,7 +134,7 @@ Byte8_t get_elemOff( faixbox_param_t *faix, Byte8_t elem_id, Byte8_t row_id);
* @param[in] elem_id element id in a row (0<= <nmax)
* @param[in] row_id row id (0<= <m)
*/
-Byte8_t get_elemLen( faixbox_param_t *faix, Byte8_t elem_id, Byte8_t row_id);
+Byte8_t get_elemLen(faixbox_param_t *faix, Byte8_t elem_id, Byte8_t row_id);
/**
* get aux of a element from faix box
@@ -141,6 +143,6 @@ Byte8_t get_elemLen( faixbox_param_t *faix, Byte8_t elem_id, Byte8_t row_id);
* @param[in] elem_id element id in a row (0<= <nmax)
* @param[in] row_id row id (0<= <m)
*/
-Byte4_t get_elemAux( faixbox_param_t *faix, Byte8_t elem_id, Byte8_t row_id);
+Byte4_t get_elemAux(faixbox_param_t *faix, Byte8_t elem_id, Byte8_t row_id);
-#endif /* !FAIXBOX_MANAGER_H_ */
+#endif /* !FAIXBOX_MANAGER_H_ */
diff --git a/src/lib/openjpip/ihdrbox_manager.h b/src/lib/openjpip/ihdrbox_manager.h
index ecfc63a9..3572b433 100644
--- a/src/lib/openjpip/ihdrbox_manager.h
+++ b/src/lib/openjpip/ihdrbox_manager.h
@@ -28,19 +28,19 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef IHDRBOX_MANAGER_H_
-# define IHDRBOX_MANAGER_H_
+#ifndef IHDRBOX_MANAGER_H_
+# define IHDRBOX_MANAGER_H_
#include "byte_manager.h"
#include "box_manager.h"
#include "metadata_manager.h"
/** I.5.3.1 Image Header box*/
-typedef struct ihdrbox_param{
- Byte4_t height;
- Byte4_t width;
- Byte2_t nc; /**< number of components*/
- Byte_t bpc; /**< bits per component*/
+typedef struct ihdrbox_param {
+ Byte4_t height;
+ Byte4_t width;
+ Byte2_t nc; /**< number of components*/
+ Byte_t bpc; /**< bits per component*/
} ihdrbox_param_t;
/**
@@ -50,7 +50,8 @@ typedef struct ihdrbox_param{
* @param[in] jpipstream JPT/JPP stream
* @return pointer to generated ihdr box
*/
-ihdrbox_param_t * gene_ihdrbox( metadatalist_param_t *metadatalist, Byte_t *jpipstream);
+ihdrbox_param_t * gene_ihdrbox(metadatalist_param_t *metadatalist,
+ Byte_t *jpipstream);
-#endif /* !IHDRBOX_MANAGER_H_ */
+#endif /* !IHDRBOX_MANAGER_H_ */
diff --git a/src/lib/openjpip/imgreg_manager.h b/src/lib/openjpip/imgreg_manager.h
index fed104d9..69634673 100644
--- a/src/lib/openjpip/imgreg_manager.h
+++ b/src/lib/openjpip/imgreg_manager.h
@@ -28,17 +28,17 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef IMGREG_MANAGER_H_
-# define IMGREG_MANAGER_H_
+#ifndef IMGREG_MANAGER_H_
+# define IMGREG_MANAGER_H_
/** image region parameters */
-typedef struct imgreg_param{
- int xosiz, yosiz; /** offset from the origin of the reference grid
- at the decomposition level */
- int fx, fy; /** frame size (fsiz) */
- int ox, oy; /** offset (roff) */
- int sx, sy; /** region size (rsiz) */
- int level; /** decomposition level */
+typedef struct imgreg_param {
+ int xosiz, yosiz; /** offset from the origin of the reference grid
+ at the decomposition level */
+ int fx, fy; /** frame size (fsiz) */
+ int ox, oy; /** offset (roff) */
+ int sx, sy; /** region size (rsiz) */
+ int level; /** decomposition level */
} imgreg_param_t;
@@ -53,12 +53,12 @@ typedef struct imgreg_param{
* @param[in] numOfreslev number of resolution levels
* @return structure of image region parameters
*/
-imgreg_param_t map_viewin2imgreg( const int fx, const int fy,
- const int rx, const int ry,
- const int rw, const int rh,
- const int XOsiz, const int YOsiz,
- const int Xsiz, const int Ysiz,
- const int numOfreslev);
+imgreg_param_t map_viewin2imgreg(const int fx, const int fy,
+ const int rx, const int ry,
+ const int rw, const int rh,
+ const int XOsiz, const int YOsiz,
+ const int Xsiz, const int Ysiz,
+ const int numOfreslev);
/**
@@ -76,7 +76,8 @@ imgreg_param_t map_viewin2imgreg( const int fx, const int fy,
* @param[in,out] xmax horizontal image size pointer
* @param[in,out] ymax vertical image size pointer
*/
-void find_level( int maxlev, int *lev, int *fx, int *fy, int *xmin, int *ymin, int *xmax, int *ymax);
+void find_level(int maxlev, int *lev, int *fx, int *fy, int *xmin, int *ymin,
+ int *xmax, int *ymax);
/**
* compute decomposition level (only to get the level
@@ -88,14 +89,14 @@ void find_level( int maxlev, int *lev, int *fx, int *fy, int *xmin, int *ymin, i
* @param[in] Ysiz image height
* @return decomposition level
*/
-int comp_decomplev( int fw, int fh, int Xsiz, int Ysiz);
+int comp_decomplev(int fw, int fh, int Xsiz, int Ysiz);
/**
* print image region parameters
*
* @param[in] imgreg image region structure of parameters
*/
-void print_imgreg( imgreg_param_t imgreg);
+void print_imgreg(imgreg_param_t imgreg);
-#endif /* !IMGREG_MANAGER_H_ */
+#endif /* !IMGREG_MANAGER_H_ */
diff --git a/src/lib/openjpip/imgsock_manager.h b/src/lib/openjpip/imgsock_manager.h
index 1be13e4e..3f5b18f5 100644
--- a/src/lib/openjpip/imgsock_manager.h
+++ b/src/lib/openjpip/imgsock_manager.h
@@ -28,15 +28,15 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef IMGSOCK_MANAGER_H_
-# define IMGSOCK_MANAGER_H_
+#ifndef IMGSOCK_MANAGER_H_
+# define IMGSOCK_MANAGER_H_
#include "byte_manager.h"
#include "sock_manager.h"
#include "opj_includes.h"
#define NUM_OF_MSGTYPES 9
-typedef enum eMSGTYPE{ JPIPSTREAM, PNMREQ, XMLREQ, TIDREQ, CIDREQ, CIDDST, SIZREQ, JP2SAVE, QUIT, MSGERROR} msgtype_t;
+typedef enum eMSGTYPE { JPIPSTREAM, PNMREQ, XMLREQ, TIDREQ, CIDREQ, CIDDST, SIZREQ, JP2SAVE, QUIT, MSGERROR} msgtype_t;
/**
* indeitify client message type
@@ -44,7 +44,7 @@ typedef enum eMSGTYPE{ JPIPSTREAM, PNMREQ, XMLREQ, TIDREQ, CIDREQ, CIDDST, SIZRE
* @param [in] connected_socket file descriptor of the connected socket
* @return message type
*/
-msgtype_t identify_clientmsg( SOCKET connected_socket);
+msgtype_t identify_clientmsg(SOCKET connected_socket);
/**
* receive a JPT- JPP- stream from client
@@ -56,7 +56,8 @@ msgtype_t identify_clientmsg( SOCKET connected_socket);
* @param [out] streamlen length of the received codestream
* @return JPT- JPP- codestream
*/
-Byte_t * receive_JPIPstream( SOCKET connected_socket, char **target, char **tid, char **cid, OPJ_SIZE_T *streamlen);
+Byte_t * receive_JPIPstream(SOCKET connected_socket, char **target, char **tid,
+ char **cid, OPJ_SIZE_T *streamlen);
/**
* send PGM/PPM image stream to the client
@@ -68,7 +69,8 @@ Byte_t * receive_JPIPstream( SOCKET connected_socket, char **target, char **tid,
* @param [in] numofcomp number of components of the image
* @param [in] maxval maximum value of the image (only 255 supported)
*/
-void send_PNMstream( SOCKET connected_socket, Byte_t *pnmstream, unsigned int width, unsigned int height, unsigned int numofcomp, Byte_t maxval);
+void send_PNMstream(SOCKET connected_socket, Byte_t *pnmstream,
+ unsigned int width, unsigned int height, unsigned int numofcomp, Byte_t maxval);
/**
* send XML data stream to the client
@@ -77,7 +79,8 @@ void send_PNMstream( SOCKET connected_socket, Byte_t *pnmstream, unsigned int wi
* @param [in] xmlstream xml data stream
* @param [in] length legnth of the xml data stream
*/
-void send_XMLstream( SOCKET connected_socket, Byte_t *xmlstream, OPJ_SIZE_T length);
+void send_XMLstream(SOCKET connected_socket, Byte_t *xmlstream,
+ OPJ_SIZE_T length);
/**
* send TID data stream to the client
@@ -86,7 +89,8 @@ void send_XMLstream( SOCKET connected_socket, Byte_t *xmlstream, OPJ_SIZE_T leng
* @param [in] tid tid string
* @param [in] tidlen legnth of the tid string
*/
-void send_TIDstream( SOCKET connected_socket, const char *tid, OPJ_SIZE_T tidlen);
+void send_TIDstream(SOCKET connected_socket, const char *tid,
+ OPJ_SIZE_T tidlen);
/**
* send CID data stream to the client
@@ -95,7 +99,8 @@ void send_TIDstream( SOCKET connected_socket, const char *tid, OPJ_SIZE_T tidlen
* @param [in] cid cid string
* @param [in] cidlen legnth of the cid string
*/
-void send_CIDstream( SOCKET connected_socket, const char *cid, OPJ_SIZE_T cidlen);
+void send_CIDstream(SOCKET connected_socket, const char *cid,
+ OPJ_SIZE_T cidlen);
/**
* send SIZ data stream to the client
@@ -104,7 +109,8 @@ void send_CIDstream( SOCKET connected_socket, const char *cid, OPJ_SIZE_T cidlen
* @param [in] width original width of the image
* @param [in] height original height of the image
*/
-void send_SIZstream( SOCKET connected_socket, unsigned int width, unsigned int height);
+void send_SIZstream(SOCKET connected_socket, unsigned int width,
+ unsigned int height);
/**
* send response signal to the client
@@ -112,7 +118,7 @@ void send_SIZstream( SOCKET connected_socket, unsigned int width, unsigned int h
* @param [in] connected_socket file descriptor of the connected socket
* @param [in] succeed whether if the requested process succeeded
*/
-void response_signal( SOCKET connected_socket, OPJ_BOOL succeed);
+void response_signal(SOCKET connected_socket, OPJ_BOOL succeed);
#endif /* !IMGSOCK_MANAGER_H_ */
@@ -124,7 +130,7 @@ void response_signal( SOCKET connected_socket, OPJ_BOOL succeed);
*
* client -> server: JPIP-stream\\n version 1.1\\n (optional for cid registration: targetnamestring\\n tidstring\\n cidstring\\n) bytelengthvalue\\n data \n
* server -> client: 1 or 0 (of 1Byte response signal)
- *
+ *
*\section sec2 PNM request
* Get decoded PGM/PPM image
*
diff --git a/src/lib/openjpip/index_manager.h b/src/lib/openjpip/index_manager.h
index 8831d7f5..f0b06186 100644
--- a/src/lib/openjpip/index_manager.h
+++ b/src/lib/openjpip/index_manager.h
@@ -28,8 +28,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef INDEX_MANAGER_H_
-# define INDEX_MANAGER_H_
+#ifndef INDEX_MANAGER_H_
+# define INDEX_MANAGER_H_
#include "opj_config.h"
#include "opj_includes.h"
@@ -42,57 +42,59 @@
/** progression order */
#if 0
typedef enum porder {
- PROG_UNKNOWN = -1, /**< place-holder */
- LRCP = 0, /**< layer-resolution-component-precinct order */
- RLCP = 1, /**< resolution-layer-component-precinct order */
- RPCL = 2, /**< resolution-precinct-component-layer order */
- PCRL = 3, /**< precinct-component-resolution-layer order */
- CPRL = 4 /**< component-precinct-resolution-layer order */
+ PROG_UNKNOWN = -1, /**< place-holder */
+ LRCP = 0, /**< layer-resolution-component-precinct order */
+ RLCP = 1, /**< resolution-layer-component-precinct order */
+ RPCL = 2, /**< resolution-precinct-component-layer order */
+ PCRL = 3, /**< precinct-component-resolution-layer order */
+ CPRL = 4 /**< component-precinct-resolution-layer order */
} porder_t;
#endif
/** A.5.1 Image and tile size (SIZ)*/
-typedef struct SIZmarker_param{
- Byte2_t Lsiz; /**< length of marker segment excluding the marker*/
- Byte2_t Rsiz; /**< capabilities that a decoder needs*/
- Byte4_t Xsiz; /**< width of the reference grid*/
- Byte4_t Ysiz; /**< height of the reference grid*/
- Byte4_t XOsiz; /**< horizontal offset from the origin of the reference grid to the left side of the image area*/
- Byte4_t YOsiz; /**< vertical offset from the origin of the reference grid to the top side of the image area*/
- Byte4_t XTsiz; /**< width of one reference tile with respect to the reference grid*/
- Byte4_t YTsiz; /**< height of one reference tile with respect to the reference grid*/
- Byte4_t XTOsiz; /**< horizontal offset from the origin of the reference grid to the left side of the first tile*/
- Byte4_t YTOsiz; /**< vertical offset from the origin of the reference grid to the top side of the first tile*/
- Byte4_t XTnum; /**< number of tiles in horizontal direction*/
- Byte4_t YTnum; /**< number of tiles in vertical direction*/
- Byte2_t Csiz; /**< number of the components in the image*/
- Byte_t Ssiz[3]; /**< precision (depth) in bits and sign of the component samples*/
- Byte_t XRsiz[3]; /**< horizontal separation of a sample of component with respect to the reference grid*/
- Byte_t YRsiz[3]; /**< vertical separation of a sample of component with respect to the reference grid*/
+typedef struct SIZmarker_param {
+ Byte2_t Lsiz; /**< length of marker segment excluding the marker*/
+ Byte2_t Rsiz; /**< capabilities that a decoder needs*/
+ Byte4_t Xsiz; /**< width of the reference grid*/
+ Byte4_t Ysiz; /**< height of the reference grid*/
+ Byte4_t XOsiz; /**< horizontal offset from the origin of the reference grid to the left side of the image area*/
+ Byte4_t YOsiz; /**< vertical offset from the origin of the reference grid to the top side of the image area*/
+ Byte4_t XTsiz; /**< width of one reference tile with respect to the reference grid*/
+ Byte4_t YTsiz; /**< height of one reference tile with respect to the reference grid*/
+ Byte4_t XTOsiz; /**< horizontal offset from the origin of the reference grid to the left side of the first tile*/
+ Byte4_t YTOsiz; /**< vertical offset from the origin of the reference grid to the top side of the first tile*/
+ Byte4_t XTnum; /**< number of tiles in horizontal direction*/
+ Byte4_t YTnum; /**< number of tiles in vertical direction*/
+ Byte2_t Csiz; /**< number of the components in the image*/
+ Byte_t Ssiz[3]; /**< precision (depth) in bits and sign of the component samples*/
+ Byte_t XRsiz[3]; /**< horizontal separation of a sample of component with respect to the reference grid*/
+ Byte_t YRsiz[3]; /**< vertical separation of a sample of component with respect to the reference grid*/
} SIZmarker_param_t;
/** A.6.1 Coding style default (COD)*/
-typedef struct CODmarker_param{
- Byte2_t Lcod; /**< length of marker segment excluding the marker*/
- Byte_t Scod; /**< Coding style for all components*/
- OPJ_PROG_ORDER prog_order; /**< progression order*/
- Byte2_t numOflayers; /**< number of layers*/
- Byte_t numOfdecomp; /**< number of decompositions levels*/
- Byte4_t *XPsiz; /**< dynamic array of precinct width at successive resolution level in order*/
- Byte4_t *YPsiz; /**< dynamic array of precinct height at successive resolution level in order*/
+typedef struct CODmarker_param {
+ Byte2_t Lcod; /**< length of marker segment excluding the marker*/
+ Byte_t Scod; /**< Coding style for all components*/
+ OPJ_PROG_ORDER prog_order; /**< progression order*/
+ Byte2_t numOflayers; /**< number of layers*/
+ Byte_t numOfdecomp; /**< number of decompositions levels*/
+ Byte4_t *XPsiz; /**< dynamic array of precinct width at successive resolution level in order*/
+ Byte4_t *YPsiz; /**< dynamic array of precinct height at successive resolution level in order*/
} CODmarker_param_t;
/** index parameters*/
-typedef struct index_param{
- metadatalist_param_t *metadatalist; /**< metadata-bin list*/
- OPJ_OFF_T offset; /**< codestream offset*/
- Byte8_t length; /**< codestream length */
- Byte8_t mhead_length; /**< main header length */
- SIZmarker_param_t SIZ; /**< SIZ marker information*/
- CODmarker_param_t COD; /**< COD marker information*/
- faixbox_param_t *tilepart; /**< tile part information from tpix box*/
- mhixbox_param_t **tileheader; /**< dynamic array of tile header information from thix box*/
- faixbox_param_t **precpacket; /**< dynamic array of precint packet information from ppix box*/
+typedef struct index_param {
+ metadatalist_param_t *metadatalist; /**< metadata-bin list*/
+ OPJ_OFF_T offset; /**< codestream offset*/
+ Byte8_t length; /**< codestream length */
+ Byte8_t mhead_length; /**< main header length */
+ SIZmarker_param_t SIZ; /**< SIZ marker information*/
+ CODmarker_param_t COD; /**< COD marker information*/
+ faixbox_param_t *tilepart; /**< tile part information from tpix box*/
+ mhixbox_param_t
+ **tileheader; /**< dynamic array of tile header information from thix box*/
+ faixbox_param_t
+ **precpacket; /**< dynamic array of precint packet information from ppix box*/
} index_param_t;
@@ -103,48 +105,48 @@ typedef struct index_param{
* @param[in] fd file descriptor of the JP2 file
* @return pointer to the generated structure of index parameters
*/
-index_param_t * parse_jp2file( int fd);
+index_param_t * parse_jp2file(int fd);
/**
* print index parameters
*
* @param[in] index index parameters
*/
-void print_index( index_param_t index);
+void print_index(index_param_t index);
/**
* print Image and Tile SIZ parameters
*
* @param[in] SIZ SIZ marker information
*/
-void print_SIZ( SIZmarker_param_t SIZ);
+void print_SIZ(SIZmarker_param_t SIZ);
/**
* print Coding style default COD parameters
*
* @param[in] COD COD marker information
*/
-void print_COD( CODmarker_param_t COD);
+void print_COD(CODmarker_param_t COD);
/**
* delete index
*
* @param[in,out] index addressof the index pointer
*/
-void delete_index( index_param_t **index);
+void delete_index(index_param_t **index);
/**
* delete dynamic arrays in COD marker
*
* @param[in] COD COD marker information
*/
-void delete_COD( CODmarker_param_t COD);
+void delete_COD(CODmarker_param_t COD);
/** 1-dimensional range parameters*/
-typedef struct range_param{
- Byte4_t minvalue; /**< minimal value*/
- Byte4_t maxvalue; /**< maximal value*/
+typedef struct range_param {
+ Byte4_t minvalue; /**< minimal value*/
+ Byte4_t maxvalue; /**< maximal value*/
} range_param_t;
/**
@@ -155,7 +157,8 @@ typedef struct range_param{
* @param[in] level decomposition level
* @return structured range parameter
*/
-range_param_t get_tile_Xrange( SIZmarker_param_t SIZ, Byte4_t tile_id, int level);
+range_param_t get_tile_Xrange(SIZmarker_param_t SIZ, Byte4_t tile_id,
+ int level);
/**
* get vertical range of the tile in reference grid
@@ -165,7 +168,8 @@ range_param_t get_tile_Xrange( SIZmarker_param_t SIZ, Byte4_t tile_id, int level
* @param[in] level decomposition level
* @return structured range parameter
*/
-range_param_t get_tile_Yrange( SIZmarker_param_t SIZ, Byte4_t tile_id, int level);
+range_param_t get_tile_Yrange(SIZmarker_param_t SIZ, Byte4_t tile_id,
+ int level);
/**
@@ -176,8 +180,8 @@ range_param_t get_tile_Yrange( SIZmarker_param_t SIZ, Byte4_t tile_id, int level
* @param[in] level decomposition level
* @return tile width
*/
-Byte4_t get_tile_XSiz( SIZmarker_param_t SIZ, Byte4_t tile_id, int level);
-Byte4_t get_tile_YSiz( SIZmarker_param_t SIZ, Byte4_t tile_id, int level);
+Byte4_t get_tile_XSiz(SIZmarker_param_t SIZ, Byte4_t tile_id, int level);
+Byte4_t get_tile_YSiz(SIZmarker_param_t SIZ, Byte4_t tile_id, int level);
/**
@@ -186,6 +190,6 @@ Byte4_t get_tile_YSiz( SIZmarker_param_t SIZ, Byte4_t tile_id, int level);
* @param[in] index index parameters
* @return true if JPT-stream is feasible
*/
-OPJ_BOOL isJPTfeasible( index_param_t index);
+OPJ_BOOL isJPTfeasible(index_param_t index);
-#endif /* !INDEX_MANAGER_H_ */
+#endif /* !INDEX_MANAGER_H_ */
diff --git a/src/lib/openjpip/j2kheader_manager.h b/src/lib/openjpip/j2kheader_manager.h
index 33722b49..d95f1250 100644
--- a/src/lib/openjpip/j2kheader_manager.h
+++ b/src/lib/openjpip/j2kheader_manager.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2014, Professor Benoit Macq
- * Copyright (c) 2010-2011, Kaori Hagihara
+ * Copyright (c) 2010-2011, Kaori Hagihara
* Copyright (c) 2011, Lucian Corlaciu, GSoC
* All rights reserved.
*
@@ -43,7 +43,8 @@
* @param[out] COD COD marker pointer
* @return if succeeded (true) or failed (false)
*/
-OPJ_BOOL get_mainheader_from_j2kstream( Byte_t *j2kstream, SIZmarker_param_t *SIZ, CODmarker_param_t *COD);
+OPJ_BOOL get_mainheader_from_j2kstream(Byte_t *j2kstream,
+ SIZmarker_param_t *SIZ, CODmarker_param_t *COD);
/**
* modify main header in j2k codestream to fit with the new number of decompositions
@@ -55,7 +56,8 @@ OPJ_BOOL get_mainheader_from_j2kstream( Byte_t *j2kstream, SIZmarker_param_t *SI
* @param[out] j2klen pointer to the length of j2k code stream
* @return if succeeded (true) or failed (false)
*/
-OPJ_BOOL modify_mainheader( Byte_t *j2kstream, int numOfdecomp, SIZmarker_param_t SIZ, CODmarker_param_t COD, Byte8_t *j2klen);
+OPJ_BOOL modify_mainheader(Byte_t *j2kstream, int numOfdecomp,
+ SIZmarker_param_t SIZ, CODmarker_param_t COD, Byte8_t *j2klen);
/**
* modify tile header in j2k codestream to fit with the tile part length, and new number of decompositions for multi-componet images
@@ -67,6 +69,7 @@ OPJ_BOOL modify_mainheader( Byte_t *j2kstream, int numOfdecomp, SIZmarker_param_
* @param[out] j2klen pointer to the length of j2k code stream
* @return if succeeded (true) or failed (false)
*/
-OPJ_BOOL modify_tileheader( Byte_t *j2kstream, Byte8_t SOToffset, int numOfdecomp, Byte2_t Csiz, Byte8_t *j2klen);
+OPJ_BOOL modify_tileheader(Byte_t *j2kstream, Byte8_t SOToffset,
+ int numOfdecomp, Byte2_t Csiz, Byte8_t *j2klen);
#endif /* !J2KHEADER_MANAGER_H_ */
diff --git a/src/lib/openjpip/jp2k_decoder.h b/src/lib/openjpip/jp2k_decoder.h
index 79ca7d91..a88d844a 100644
--- a/src/lib/openjpip/jp2k_decoder.h
+++ b/src/lib/openjpip/jp2k_decoder.h
@@ -28,12 +28,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef JP2K_DECODER_H_
-# define JP2K_DECODER_H_
+#ifndef JP2K_DECODER_H_
+# define JP2K_DECODER_H_
#include "byte_manager.h"
#include "ihdrbox_manager.h"
-Byte_t * j2k_to_pnm( const char *fn, ihdrbox_param_t **ihdrbox);
+Byte_t * j2k_to_pnm(const char *fn, ihdrbox_param_t **ihdrbox);
-#endif /* !JP2K_DECODER_H_ */
+#endif /* !JP2K_DECODER_H_ */
diff --git a/src/lib/openjpip/jp2k_encoder.h b/src/lib/openjpip/jp2k_encoder.h
index 30e1035f..8ace4341 100644
--- a/src/lib/openjpip/jp2k_encoder.h
+++ b/src/lib/openjpip/jp2k_encoder.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2014, Professor Benoit Macq
- * Copyright (c) 2010-2011, Kaori Hagihara
+ * Copyright (c) 2010-2011, Kaori Hagihara
* Copyright (c) 2011, Lucian Corlaciu, GSoC
* All rights reserved.
*
@@ -29,8 +29,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef JP2K_ENCODER_H_
-# define JP2K_ENCODER_H_
+#ifndef JP2K_ENCODER_H_
+# define JP2K_ENCODER_H_
#include "byte_manager.h"
#include "msgqueue_manager.h"
@@ -46,7 +46,8 @@
* @param[out] j2klen pointer to the j2k codestream length
* @return generated reconstructed j2k codestream
*/
-Byte_t * recons_j2k( msgqueue_param_t *msgqueue, Byte_t *jpipstream, Byte8_t csn, int fw, int fh, Byte8_t *j2klen);
+Byte_t * recons_j2k(msgqueue_param_t *msgqueue, Byte_t *jpipstream, Byte8_t csn,
+ int fw, int fh, Byte8_t *j2klen);
/**
@@ -58,7 +59,8 @@ Byte_t * recons_j2k( msgqueue_param_t *msgqueue, Byte_t *jpipstream, Byte8_t csn
* @param[out] jp2len pointer to the jp2 codestream length
* @return generated reconstructed jp2 codestream
*/
-Byte_t * recons_jp2( msgqueue_param_t *msgqueue, Byte_t *jpipstream, Byte8_t csn, Byte8_t *jp2len);
+Byte_t * recons_jp2(msgqueue_param_t *msgqueue, Byte_t *jpipstream, Byte8_t csn,
+ Byte8_t *jp2len);
/**
* reconstruct j2k codestream of mainheader from message queue
@@ -69,6 +71,7 @@ Byte_t * recons_jp2( msgqueue_param_t *msgqueue, Byte_t *jpipstream, Byte8_t csn
* @param[out] j2klen pointer to the j2k codestream length
* @return generated reconstructed j2k codestream
*/
-Byte_t * recons_j2kmainhead( msgqueue_param_t *msgqueue, Byte_t *jpipstream, Byte8_t csn, Byte8_t *j2klen);
+Byte_t * recons_j2kmainhead(msgqueue_param_t *msgqueue, Byte_t *jpipstream,
+ Byte8_t csn, Byte8_t *j2klen);
-#endif /* !JP2K_ENCODER_H_ */
+#endif /* !JP2K_ENCODER_H_ */
diff --git a/src/lib/openjpip/jpip_parser.h b/src/lib/openjpip/jpip_parser.h
index ff2bf286..093f0592 100644
--- a/src/lib/openjpip/jpip_parser.h
+++ b/src/lib/openjpip/jpip_parser.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2014, Professor Benoit Macq
- * Copyright (c) 2010-2011, Kaori Hagihara
+ * Copyright (c) 2010-2011, Kaori Hagihara
* Copyright (c) 2011, Lucian Corlaciu, GSoC
* All rights reserved.
*
@@ -29,8 +29,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef JPIP_PARSER_H_
-# define JPIP_PARSER_H_
+#ifndef JPIP_PARSER_H_
+# define JPIP_PARSER_H_
#include "query_parser.h"
#include "session_manager.h"
@@ -46,7 +46,8 @@
* @param[out] target address of target pointer
* @return if succeeded (true) or failed (false)
*/
-OPJ_BOOL identify_target( query_param_t query_param, targetlist_param_t *targetlist, target_param_t **target);
+OPJ_BOOL identify_target(query_param_t query_param,
+ targetlist_param_t *targetlist, target_param_t **target);
/**
* REQUEST: channel association
@@ -58,10 +59,10 @@ OPJ_BOOL identify_target( query_param_t query_param, targetlist_param_t *targetl
* @param[out] curchannel address of the associated channel pointer
* @return if succeeded (true) or failed (false)
*/
-OPJ_BOOL associate_channel( query_param_t query_param,
- sessionlist_param_t *sessionlist,
- session_param_t **cursession,
- channel_param_t **curchannel);
+OPJ_BOOL associate_channel(query_param_t query_param,
+ sessionlist_param_t *sessionlist,
+ session_param_t **cursession,
+ channel_param_t **curchannel);
/**
* REQUEST: new channel (cnew) assignment
*
@@ -73,12 +74,12 @@ OPJ_BOOL associate_channel( query_param_t query_param,
* @param[in,out] curchannel address of the associated/opened channel pointer
* @return if succeeded (true) or failed (false)
*/
-OPJ_BOOL open_channel( query_param_t query_param,
- sessionlist_param_t *sessionlist,
- auxtrans_param_t auxtrans,
- target_param_t *target,
- session_param_t **cursession,
- channel_param_t **curchannel);
+OPJ_BOOL open_channel(query_param_t query_param,
+ sessionlist_param_t *sessionlist,
+ auxtrans_param_t auxtrans,
+ target_param_t *target,
+ session_param_t **cursession,
+ channel_param_t **curchannel);
/**
* REQUEST: channel close (cclose)
@@ -89,10 +90,10 @@ OPJ_BOOL open_channel( query_param_t query_param,
* @param[in,out] curchannel address of the deleting channel pointer
* @return if succeeded (true) or failed (false)
*/
-OPJ_BOOL close_channel( query_param_t query_param,
- sessionlist_param_t *sessionlist,
- session_param_t **cursession,
- channel_param_t **curchannel);
+OPJ_BOOL close_channel(query_param_t query_param,
+ sessionlist_param_t *sessionlist,
+ session_param_t **cursession,
+ channel_param_t **curchannel);
/**
* REQUEST: view-window (fsiz)
@@ -104,10 +105,10 @@ OPJ_BOOL close_channel( query_param_t query_param,
* @param[out] msgqueue address of the message queue pointer
* @return if succeeded (true) or failed (false)
*/
-OPJ_BOOL gene_JPIPstream( query_param_t query_param,
- target_param_t *target,
- session_param_t *cursession,
- channel_param_t *curchannel,
- msgqueue_param_t **msgqueue);
+OPJ_BOOL gene_JPIPstream(query_param_t query_param,
+ target_param_t *target,
+ session_param_t *cursession,
+ channel_param_t *curchannel,
+ msgqueue_param_t **msgqueue);
-#endif /* !JPIP_PARSER_H_ */
+#endif /* !JPIP_PARSER_H_ */
diff --git a/src/lib/openjpip/jpipstream_manager.h b/src/lib/openjpip/jpipstream_manager.h
index 3b829a57..225694d8 100644
--- a/src/lib/openjpip/jpipstream_manager.h
+++ b/src/lib/openjpip/jpipstream_manager.h
@@ -32,10 +32,13 @@
#include "msgqueue_manager.h"
#include "ihdrbox_manager.h"
-Byte_t * update_JPIPstream( Byte_t *newstream, OPJ_SIZE_T newstreamlen, Byte_t *cache_stream, OPJ_SIZE_T *streamlen);
+Byte_t * update_JPIPstream(Byte_t *newstream, OPJ_SIZE_T newstreamlen,
+ Byte_t *cache_stream, OPJ_SIZE_T *streamlen);
-void save_codestream( Byte_t *codestream, OPJ_SIZE_T streamlen, const char *fmt);
+void save_codestream(Byte_t *codestream, OPJ_SIZE_T streamlen, const char *fmt);
-Byte_t * jpipstream_to_pnm( Byte_t *jpipstream, msgqueue_param_t *msgqueue, Byte8_t csn, int fw, int fh, ihdrbox_param_t **ihdrbox);
+Byte_t * jpipstream_to_pnm(Byte_t *jpipstream, msgqueue_param_t *msgqueue,
+ Byte8_t csn, int fw, int fh, ihdrbox_param_t **ihdrbox);
-ihdrbox_param_t * get_SIZ_from_jpipstream( Byte_t *jpipstream, msgqueue_param_t *msgqueue, Byte8_t csn);
+ihdrbox_param_t * get_SIZ_from_jpipstream(Byte_t *jpipstream,
+ msgqueue_param_t *msgqueue, Byte8_t csn);
diff --git a/src/lib/openjpip/manfbox_manager.h b/src/lib/openjpip/manfbox_manager.h
index 1b1bf915..f75bed2d 100644
--- a/src/lib/openjpip/manfbox_manager.h
+++ b/src/lib/openjpip/manfbox_manager.h
@@ -28,8 +28,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MANFBOX_MANAGER_H_
-# define MANFBOX_MANAGER_H_
+#ifndef MANFBOX_MANAGER_H_
+# define MANFBOX_MANAGER_H_
#include "byte_manager.h"
#include "box_manager.h"
@@ -38,8 +38,8 @@
/** manifest box parameters*/
/** I.3.2.3 Manifest box*/
-typedef struct manfbox_param{
- boxheader_param_t *first; /**< top of the box header list*/
+typedef struct manfbox_param {
+ boxheader_param_t *first; /**< top of the box header list*/
} manfbox_param_t;
@@ -49,7 +49,7 @@ typedef struct manfbox_param{
* @param[in] box pointer to the reference manf box
* @return generated manfbox
*/
-manfbox_param_t * gene_manfbox( box_param_t *box);
+manfbox_param_t * gene_manfbox(box_param_t *box);
/**
@@ -57,7 +57,7 @@ manfbox_param_t * gene_manfbox( box_param_t *box);
*
* @param[in,out] manf addressof the manfbox pointer
*/
-void delete_manfbox( manfbox_param_t **manf);
+void delete_manfbox(manfbox_param_t **manf);
/**
@@ -65,7 +65,7 @@ void delete_manfbox( manfbox_param_t **manf);
*
* @param[in] manf manf box pointer
*/
-void print_manfbox( manfbox_param_t *manf);
+void print_manfbox(manfbox_param_t *manf);
/**
@@ -75,7 +75,7 @@ void print_manfbox( manfbox_param_t *manf);
* @param[in] manf manf box pointer
* @return found box pointer
*/
-boxheader_param_t * search_boxheader( const char type[], manfbox_param_t *manf);
+boxheader_param_t * search_boxheader(const char type[], manfbox_param_t *manf);
-#endif /* !MANFBOX_MANAGER_H_ */
+#endif /* !MANFBOX_MANAGER_H_ */
diff --git a/src/lib/openjpip/marker_manager.h b/src/lib/openjpip/marker_manager.h
index a28c44b7..e532af54 100644
--- a/src/lib/openjpip/marker_manager.h
+++ b/src/lib/openjpip/marker_manager.h
@@ -28,18 +28,18 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MARKER_MANAGER_H_
-# define MARKER_MANAGER_H_
+#ifndef MARKER_MANAGER_H_
+# define MARKER_MANAGER_H_
#include "codestream_manager.h"
/** Marker parameters*/
-typedef struct marker_param{
- codestream_param_t cs; /**< corresponding codestream*/
- Byte2_t code; /**< marker code*/
- OPJ_OFF_T offset; /**< offset relative to the start of the codestream ( including the length parameter but not the marker itself)*/
- Byte2_t length; /**< marker segment length*/
+typedef struct marker_param {
+ codestream_param_t cs; /**< corresponding codestream*/
+ Byte2_t code; /**< marker code*/
+ OPJ_OFF_T offset; /**< offset relative to the start of the codestream ( including the length parameter but not the marker itself)*/
+ Byte2_t length; /**< marker segment length*/
} marker_param_t;
@@ -52,7 +52,8 @@ typedef struct marker_param{
* @param[in] length marker segment length
* @return structure of generated marker parameters
*/
-marker_param_t set_marker( codestream_param_t cs, Byte2_t code, OPJ_OFF_T offset, Byte2_t length);
+marker_param_t set_marker(codestream_param_t cs, Byte2_t code, OPJ_OFF_T offset,
+ Byte2_t length);
/**
@@ -62,7 +63,7 @@ marker_param_t set_marker( codestream_param_t cs, Byte2_t code, OPJ_OFF_T offset
* @param[in] offset start Byte position in marker
* @return fetched code
*/
-Byte_t fetch_marker1byte( marker_param_t marker, OPJ_OFF_T offset);
+Byte_t fetch_marker1byte(marker_param_t marker, OPJ_OFF_T offset);
/**
* fetch marker content 2-byte big endian Byte codes in file stream
@@ -71,7 +72,7 @@ Byte_t fetch_marker1byte( marker_param_t marker, OPJ_OFF_T offset);
* @param[in] offset start Byte position in marker
* @return fetched code
*/
-Byte2_t fetch_marker2bytebigendian( marker_param_t marker, OPJ_OFF_T offset);
+Byte2_t fetch_marker2bytebigendian(marker_param_t marker, OPJ_OFF_T offset);
/**
* fetch marker content 4-byte big endian Byte codes in file stream
@@ -80,7 +81,7 @@ Byte2_t fetch_marker2bytebigendian( marker_param_t marker, OPJ_OFF_T offset);
* @param[in] offset start Byte position in marker
* @return fetched code
*/
-Byte4_t fetch_marker4bytebigendian( marker_param_t marker, OPJ_OFF_T offset);
+Byte4_t fetch_marker4bytebigendian(marker_param_t marker, OPJ_OFF_T offset);
-#endif /* !MARKER_MANAGER_H_ */
+#endif /* !MARKER_MANAGER_H_ */
diff --git a/src/lib/openjpip/metadata_manager.h b/src/lib/openjpip/metadata_manager.h
index bd09ff39..6cf00306 100644
--- a/src/lib/openjpip/metadata_manager.h
+++ b/src/lib/openjpip/metadata_manager.h
@@ -28,30 +28,32 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef METADATA_MANAGER_H_
-#define METADATA_MANAGER_H_
+#ifndef METADATA_MANAGER_H_
+#define METADATA_MANAGER_H_
#include "box_manager.h"
#include "placeholder_manager.h"
-typedef struct boxcontents_param{
- OPJ_OFF_T offset; /**< byte position of the box contents in the file*/
- Byte8_t length; /**< length of the box contents*/
+typedef struct boxcontents_param {
+ OPJ_OFF_T offset; /**< byte position of the box contents in the file*/
+ Byte8_t length; /**< length of the box contents*/
} boxcontents_param_t;
/** metadata-bin parameters*/
-typedef struct metadata_param{
- Byte8_t idx; /**< index number*/
- boxlist_param_t *boxlist; /**< box list*/
- placeholderlist_param_t *placeholderlist; /**< placeholder box list*/
- boxcontents_param_t *boxcontents; /**< box contens in case of no boxlist and placeholderlist*/
- struct metadata_param *next; /**< pointer to the next metadata-bin*/
+typedef struct metadata_param {
+ Byte8_t idx; /**< index number*/
+ boxlist_param_t *boxlist; /**< box list*/
+ placeholderlist_param_t *placeholderlist; /**< placeholder box list*/
+ boxcontents_param_t
+ *boxcontents; /**< box contens in case of no boxlist and placeholderlist*/
+ struct metadata_param
+ *next; /**< pointer to the next metadata-bin*/
} metadata_param_t;
/** metadata-bin list parameters*/
-typedef struct metadatalist_param{
- metadata_param_t *first; /**< first metadata-bin pointer of the list*/
- metadata_param_t *last; /**< last metadata-bin pointer of the list*/
+typedef struct metadatalist_param {
+ metadata_param_t *first; /**< first metadata-bin pointer of the list*/
+ metadata_param_t *last; /**< last metadata-bin pointer of the list*/
} metadatalist_param_t;
@@ -69,7 +71,7 @@ metadatalist_param_t * gene_metadatalist(void);
* @param[in] fd file descriptor
* @return pointer to the generated metadata-bin list
*/
-metadatalist_param_t * const_metadatalist( int fd);
+metadatalist_param_t * const_metadatalist(int fd);
/**
@@ -77,7 +79,7 @@ metadatalist_param_t * const_metadatalist( int fd);
*
* @param[in,out] list address of the metadata list pointer
*/
-void delete_metadatalist( metadatalist_param_t **list);
+void delete_metadatalist(metadatalist_param_t **list);
/**
@@ -89,35 +91,36 @@ void delete_metadatalist( metadatalist_param_t **list);
* @param[in] boxcontents boxcontents pointer
* @return pointer to the generated metadata bin
*/
-metadata_param_t * gene_metadata( Byte8_t idx, boxlist_param_t *boxlist, placeholderlist_param_t *phldlist, boxcontents_param_t *boxcontents);
+metadata_param_t * gene_metadata(Byte8_t idx, boxlist_param_t *boxlist,
+ placeholderlist_param_t *phldlist, boxcontents_param_t *boxcontents);
/**
* delete a metadata bin
*
* @param[in,out] metadata address of the deleting metadata bin pointer
*/
-void delete_metadata( metadata_param_t **metadata);
+void delete_metadata(metadata_param_t **metadata);
/**
* generate box contents
*
* @return pointer to the box contents
*/
-boxcontents_param_t * gene_boxcontents( OPJ_OFF_T offset, OPJ_SIZE_T length);
+boxcontents_param_t * gene_boxcontents(OPJ_OFF_T offset, OPJ_SIZE_T length);
/**
* print metadata-bin parameters
*
* @param[in] metadata metadata-bin pointer
*/
-void print_metadata( metadata_param_t *metadata);
+void print_metadata(metadata_param_t *metadata);
/**
* print all metadata parameters
*
* @param[in] list metadata list pointer
*/
-void print_allmetadata( metadatalist_param_t *list);
+void print_allmetadata(metadatalist_param_t *list);
/**
@@ -127,7 +130,7 @@ void print_allmetadata( metadatalist_param_t *list);
* @param[in] list metadata-bin list pointer
* @return found metadata-bin pointer
*/
-metadata_param_t * search_metadata( Byte8_t idx, metadatalist_param_t *list);
+metadata_param_t * search_metadata(Byte8_t idx, metadatalist_param_t *list);
/**
@@ -137,7 +140,7 @@ metadata_param_t * search_metadata( Byte8_t idx, metadatalist_param_t *list);
* @param[in] list metadata-bin list pointer
* @return found metadata-bin index, if not found, -1
*/
-Byte8_t search_metadataidx( char boxtype[4], metadatalist_param_t *list);
+Byte8_t search_metadataidx(char boxtype[4], metadatalist_param_t *list);
/**
@@ -146,6 +149,7 @@ Byte8_t search_metadataidx( char boxtype[4], metadatalist_param_t *list);
* @param[in] metabin metadata-bin pointer
* @param[in] metadatalist metadata list pointer
*/
-void insert_metadata_into_list( metadata_param_t *metabin, metadatalist_param_t *metadatalist);
+void insert_metadata_into_list(metadata_param_t *metabin,
+ metadatalist_param_t *metadatalist);
-#endif /* !METADATA_MANAGER_H_ */
+#endif /* !METADATA_MANAGER_H_ */
diff --git a/src/lib/openjpip/mhixbox_manager.h b/src/lib/openjpip/mhixbox_manager.h
index 48b34d09..8b39e58d 100644
--- a/src/lib/openjpip/mhixbox_manager.h
+++ b/src/lib/openjpip/mhixbox_manager.h
@@ -28,31 +28,31 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MHIXBOX_MANAGER_H_
-# define MHIXBOX_MANAGER_H_
+#ifndef MHIXBOX_MANAGER_H_
+# define MHIXBOX_MANAGER_H_
#include "byte_manager.h"
#include "box_manager.h"
/** Marker index parameters*/
-typedef struct markeridx_param{
- Byte2_t code; /**< marker code*/
- Byte2_t num_remain; /**< remining number of the same marker index segments listed immediately*/
- OPJ_OFF_T offset; /**< offset relative to the start of the*/
- /**codestream ( including the length*/
- /**parameter but not the marker itself)*/
- Byte2_t length; /**< marker segment length*/
- struct markeridx_param *next; /**< pointer to the next markeridx*/
+typedef struct markeridx_param {
+ Byte2_t code; /**< marker code*/
+ Byte2_t num_remain; /**< remining number of the same marker index segments listed immediately*/
+ OPJ_OFF_T offset; /**< offset relative to the start of the*/
+ /**codestream ( including the length*/
+ /**parameter but not the marker itself)*/
+ Byte2_t length; /**< marker segment length*/
+ struct markeridx_param *next; /**< pointer to the next markeridx*/
} markeridx_param_t;
/** header index table box parameters*/
/** I.3.2.4.3 Header Index Table box*/
-typedef struct mhixbox_param{
- Byte8_t tlen; /**< length ( total length of the main*/
- /**header or of the first tile-part header)*/
- markeridx_param_t *first; /**< first marker index pointer of the list*/
+typedef struct mhixbox_param {
+ Byte8_t tlen; /**< length ( total length of the main*/
+ /**header or of the first tile-part header)*/
+ markeridx_param_t *first; /**< first marker index pointer of the list*/
} mhixbox_param_t;
@@ -63,7 +63,7 @@ typedef struct mhixbox_param{
* @param[in] box pointer to the reference mhix box
* @return generated mhixbox pointer
*/
-mhixbox_param_t * gene_mhixbox( box_param_t *box);
+mhixbox_param_t * gene_mhixbox(box_param_t *box);
/**
@@ -73,7 +73,7 @@ mhixbox_param_t * gene_mhixbox( box_param_t *box);
* @param[in] mhix mhix box pointer
* @return found marker index pointer
*/
-markeridx_param_t * search_markeridx( Byte2_t code, mhixbox_param_t *mhix);
+markeridx_param_t * search_markeridx(Byte2_t code, mhixbox_param_t *mhix);
/**
@@ -81,7 +81,7 @@ markeridx_param_t * search_markeridx( Byte2_t code, mhixbox_param_t *mhix);
*
* @param[in] mhix mhix box pointer
*/
-void print_mhixbox( mhixbox_param_t *mhix);
+void print_mhixbox(mhixbox_param_t *mhix);
/**
@@ -89,7 +89,7 @@ void print_mhixbox( mhixbox_param_t *mhix);
*
* @param[in] markeridx marker index pointer
*/
-void print_markeridx( markeridx_param_t *markeridx);
+void print_markeridx(markeridx_param_t *markeridx);
/**
@@ -97,6 +97,6 @@ void print_markeridx( markeridx_param_t *markeridx);
*
* @param[in,out] mhix address of the mhix box pointer
*/
-void delete_mhixbox( mhixbox_param_t **mhix);
+void delete_mhixbox(mhixbox_param_t **mhix);
-#endif /* !MHIXBOX_MANAGER_H_ */
+#endif /* !MHIXBOX_MANAGER_H_ */
diff --git a/src/lib/openjpip/msgqueue_manager.h b/src/lib/openjpip/msgqueue_manager.h
index 54cb4f95..ad97828d 100644
--- a/src/lib/openjpip/msgqueue_manager.h
+++ b/src/lib/openjpip/msgqueue_manager.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2014, Professor Benoit Macq
- * Copyright (c) 2010-2011, Kaori Hagihara
+ * Copyright (c) 2010-2011, Kaori Hagihara
* Copyright (c) 2011, Lucian Corlaciu, GSoC
* All rights reserved.
*
@@ -29,8 +29,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MSGQUEUE_MANAGER_H_
-# define MSGQUEUE_MANAGER_H_
+#ifndef MSGQUEUE_MANAGER_H_
+# define MSGQUEUE_MANAGER_H_
#include "byte_manager.h"
#include "cachemodel_manager.h"
@@ -45,25 +45,26 @@
#define METADATA_MSG 8
/** message parameters */
-typedef struct message_param{
- OPJ_BOOL last_byte; /**< if message contains the last byte of the data-bin*/
- Byte8_t in_class_id; /**< in-class identifier A.2.3*/
- Byte8_t class_id; /**< class identifiers */
- Byte8_t csn; /**< index of the codestream*/
- Byte8_t bin_offset; /**< offset of the data in this message from the start of the data-bin*/
- Byte8_t length; /**< message byte length*/
- Byte8_t aux; /**<*/
- OPJ_OFF_T res_offset; /**< offset in the resource*/
- placeholder_param_t *phld; /**< placeholder pointer in index*/
- struct message_param *next; /**< pointer to the next message*/
+typedef struct message_param {
+ OPJ_BOOL
+ last_byte; /**< if message contains the last byte of the data-bin*/
+ Byte8_t in_class_id; /**< in-class identifier A.2.3*/
+ Byte8_t class_id; /**< class identifiers */
+ Byte8_t csn; /**< index of the codestream*/
+ Byte8_t bin_offset; /**< offset of the data in this message from the start of the data-bin*/
+ Byte8_t length; /**< message byte length*/
+ Byte8_t aux; /**<*/
+ OPJ_OFF_T res_offset; /**< offset in the resource*/
+ placeholder_param_t *phld; /**< placeholder pointer in index*/
+ struct message_param *next; /**< pointer to the next message*/
} message_param_t;
/** message queue parameters */
-typedef struct msgqueue_param{
- message_param_t *first; /**< first message pointer of the list*/
- message_param_t *last; /**< last message pointer of the list*/
- OPJ_BOOL stateless; /**< if this is a stateless message queue*/
- cachemodel_param_t *cachemodel; /**< reference cachemodel pointer*/
+typedef struct msgqueue_param {
+ message_param_t *first; /**< first message pointer of the list*/
+ message_param_t *last; /**< last message pointer of the list*/
+ OPJ_BOOL stateless; /**< if this is a stateless message queue*/
+ cachemodel_param_t *cachemodel; /**< reference cachemodel pointer*/
} msgqueue_param_t;
/**
@@ -73,14 +74,15 @@ typedef struct msgqueue_param{
* @param[in] cachemodel cachemodel pointer
* @return generated message queue pointer
*/
-msgqueue_param_t * gene_msgqueue( OPJ_BOOL stateless, cachemodel_param_t *cachemodel);
+msgqueue_param_t * gene_msgqueue(OPJ_BOOL stateless,
+ cachemodel_param_t *cachemodel);
/**
* delete message queue
*
* @param[in] msgqueue address of the message queue pointer
*/
-void delete_msgqueue( msgqueue_param_t **msgqueue);
+void delete_msgqueue(msgqueue_param_t **msgqueue);
/**
* delete a message in msgqueue
@@ -88,14 +90,15 @@ void delete_msgqueue( msgqueue_param_t **msgqueue);
* @param[in] message address of the deleting message pointer
* @param[in] msgqueue message queue pointer
*/
-void delete_message_in_msgqueue( message_param_t **message, msgqueue_param_t *msgqueue);
+void delete_message_in_msgqueue(message_param_t **message,
+ msgqueue_param_t *msgqueue);
/**
* print message queue
*
* @param[in] msgqueue message queue pointer
*/
-void print_msgqueue( msgqueue_param_t *msgqueue);
+void print_msgqueue(msgqueue_param_t *msgqueue);
/**
@@ -103,7 +106,7 @@ void print_msgqueue( msgqueue_param_t *msgqueue);
*
* @param[in,out] msgqueue message queue pointer
*/
-void enqueue_mainheader( msgqueue_param_t *msgqueue);
+void enqueue_mainheader(msgqueue_param_t *msgqueue);
/**
* enqueue tile headers data-bin into message queue
@@ -111,7 +114,7 @@ void enqueue_mainheader( msgqueue_param_t *msgqueue);
* @param[in] tile_id tile id starting from 0
* @param[in,out] msgqueue message queue pointer
*/
-void enqueue_tileheader( int tile_id, msgqueue_param_t *msgqueue);
+void enqueue_tileheader(int tile_id, msgqueue_param_t *msgqueue);
/**
* enqueue tile data-bin into message queue
@@ -120,7 +123,7 @@ void enqueue_tileheader( int tile_id, msgqueue_param_t *msgqueue);
* @param[in] level decomposition level
* @param[in,out] msgqueue message queue pointer
*/
-void enqueue_tile( Byte4_t tile_id, int level, msgqueue_param_t *msgqueue);
+void enqueue_tile(Byte4_t tile_id, int level, msgqueue_param_t *msgqueue);
/**
* enqueue precinct data-bin into message queue
@@ -131,7 +134,8 @@ void enqueue_tile( Byte4_t tile_id, int level, msgqueue_param_t *msgqueue);
* @param[in] layers num of layers
* @param[in,out] msgqueue message queue
*/
-void enqueue_precinct( int seq_id, int tile_id, int comp_id, int layers, msgqueue_param_t *msgqueue);
+void enqueue_precinct(int seq_id, int tile_id, int comp_id, int layers,
+ msgqueue_param_t *msgqueue);
/**
@@ -140,7 +144,7 @@ void enqueue_precinct( int seq_id, int tile_id, int comp_id, int layers, msgqueu
* @param[in] meta_id metadata-bin id
* @param[in,out] msgqueue message queue pointer
*/
-void enqueue_metadata( Byte8_t meta_id, msgqueue_param_t *msgqueue);
+void enqueue_metadata(Byte8_t meta_id, msgqueue_param_t *msgqueue);
/**
@@ -149,7 +153,7 @@ void enqueue_metadata( Byte8_t meta_id, msgqueue_param_t *msgqueue);
* @param[in] msgqueue message queue pointer
* @param[in] tmpfd file discriptor to write JPT/JPP-stream
*/
-void recons_stream_from_msgqueue( msgqueue_param_t *msgqueue, int tmpfd);
+void recons_stream_from_msgqueue(msgqueue_param_t *msgqueue, int tmpfd);
/**
@@ -160,7 +164,8 @@ void recons_stream_from_msgqueue( msgqueue_param_t *msgqueue, int tmpfd);
* @param[in] offset offset of the stream from the whole beginning
* @param[in,out] msgqueue adding message queue pointer
*/
-void parse_JPIPstream( Byte_t *JPIPstream, Byte8_t streamlen, OPJ_OFF_T offset, msgqueue_param_t *msgqueue);
+void parse_JPIPstream(Byte_t *JPIPstream, Byte8_t streamlen, OPJ_OFF_T offset,
+ msgqueue_param_t *msgqueue);
/**
* parse JPT- JPP- stream to message queue
@@ -170,7 +175,8 @@ void parse_JPIPstream( Byte_t *JPIPstream, Byte8_t streamlen, OPJ_OFF_T offset,
* @param[in] streamlen stream length
* @param[in] metadatalist adding metadata list pointer
*/
-void parse_metamsg( msgqueue_param_t *msgqueue, Byte_t *stream, Byte8_t streamlen, metadatalist_param_t *metadatalist);
+void parse_metamsg(msgqueue_param_t *msgqueue, Byte_t *stream,
+ Byte8_t streamlen, metadatalist_param_t *metadatalist);
/**
* compute precinct ID A.3.2.1
@@ -182,6 +188,7 @@ void parse_metamsg( msgqueue_param_t *msgqueue, Byte_t *stream, Byte8_t streamle
* @param[in] num_tiles total number of tiles
* @return precicnt id
*/
-Byte8_t comp_precinct_id( int t, int c, int s, int num_components, int num_tiles);
+Byte8_t comp_precinct_id(int t, int c, int s, int num_components,
+ int num_tiles);
-#endif /* !MSGQUEUE_MANAGER_H_ */
+#endif /* !MSGQUEUE_MANAGER_H_ */
diff --git a/src/lib/openjpip/openjpip.h b/src/lib/openjpip/openjpip.h
index 2bda1ac2..11a1f272 100644
--- a/src/lib/openjpip/openjpip.h
+++ b/src/lib/openjpip/openjpip.h
@@ -59,26 +59,26 @@
#endif /*SERVER*/
-/*
+/*
*==========================================================
* JPIP server API
*==========================================================
*/
-
- #ifdef SERVER
+
+#ifdef SERVER
/** Server static records*/
-typedef struct server_record{
- sessionlist_param_t *sessionlist; /**< list of session records*/
- targetlist_param_t *targetlist; /**< list of target records*/
- auxtrans_param_t auxtrans;
+typedef struct server_record {
+ sessionlist_param_t *sessionlist; /**< list of session records*/
+ targetlist_param_t *targetlist; /**< list of target records*/
+ auxtrans_param_t auxtrans;
} server_record_t;
/** Query/response data for each client*/
-typedef struct QR{
- query_param_t *query; /**< query parameters*/
- msgqueue_param_t *msgqueue; /**< message queue*/
- channel_param_t *channel; /**< channel, (NULL if stateless)*/
+typedef struct QR {
+ query_param_t *query; /**< query parameters*/
+ msgqueue_param_t *msgqueue; /**< message queue*/
+ channel_param_t *channel; /**< channel, (NULL if stateless)*/
} QR_t;
/**
@@ -88,14 +88,14 @@ typedef struct QR{
* @param[in] udp_auxport opening udp auxiliary port ( 0 not to open, valid No. 49152-65535)
* @return intialized server record pointer
*/
-server_record_t * init_JPIPserver( int tcp_auxport, int udp_auxport);
+server_record_t * init_JPIPserver(int tcp_auxport, int udp_auxport);
/**
* Terminate the JPIP server
*
* @param[in] rec address of deleting server static record pointer
*/
-void terminate_JPIPserver( server_record_t **rec);
+void terminate_JPIPserver(server_record_t **rec);
/**
* 1st process per client request; parse query string
@@ -103,16 +103,16 @@ void terminate_JPIPserver( server_record_t **rec);
* @param[in] query_string request query string
* @return initialized query/response data pointer
*/
-QR_t * parse_querystring( const char *query_string);
+QR_t * parse_querystring(const char *query_string);
/**
* 2nd process; process JPIP request and construct message queue
*
* @param[in] rec server static record pointer
* @param[in] qr query/response data pointer
- * @return true if succeed, otherwise false
+ * @return true if succeed, otherwise false
*/
-OPJ_BOOL process_JPIPrequest( server_record_t *rec, QR_t *qr);
+OPJ_BOOL process_JPIPrequest(server_record_t *rec, QR_t *qr);
/**
* 3rd process; send response data JPT/JPP-stream
@@ -120,15 +120,15 @@ OPJ_BOOL process_JPIPrequest( server_record_t *rec, QR_t *qr);
* @param[in] rec server static record pointer
* @param[in] qr query/response data pointer
*/
-void send_responsedata( server_record_t *rec, QR_t *qr);
+void send_responsedata(server_record_t *rec, QR_t *qr);
/**
- * 4th (last) process;
+ * 4th (last) process;
*
* @param[in] rec server static record pinter
* @param[in] qr address of query/response data pointer
*/
-void end_QRprocess( server_record_t *rec, QR_t **qr);
+void end_QRprocess(server_record_t *rec, QR_t **qr);
/**
* Option for local tests; print out parameter values to logstream (stderr)
@@ -140,11 +140,12 @@ void end_QRprocess( server_record_t *rec, QR_t **qr);
* @param[in] qr query/response data pointer
* @param[in] rec server static record pinter
*/
-void local_log( OPJ_BOOL query, OPJ_BOOL messages, OPJ_BOOL sessions, OPJ_BOOL targets, QR_t *qr, server_record_t *rec);
+void local_log(OPJ_BOOL query, OPJ_BOOL messages, OPJ_BOOL sessions,
+ OPJ_BOOL targets, QR_t *qr, server_record_t *rec);
#endif /*SERVER*/
-/*
+/*
*==========================================================
* JPIP decoding server API
*==========================================================
@@ -153,12 +154,12 @@ void local_log( OPJ_BOOL query, OPJ_BOOL messages, OPJ_BOOL sessions, OPJ_BOOL t
#ifndef SERVER
/** Decoding server static records*/
-typedef struct dec_server_record{
- cachelist_param_t *cachelist; /**< cache list*/
- Byte_t *jpipstream; /**< JPT/JPP stream*/
- OPJ_SIZE_T jpipstreamlen; /**< length of jpipstream*/
- msgqueue_param_t *msgqueue; /**< parsed message queue of jpipstream*/
- SOCKET listening_socket; /**< listenning socket*/
+typedef struct dec_server_record {
+ cachelist_param_t *cachelist; /**< cache list*/
+ Byte_t *jpipstream; /**< JPT/JPP stream*/
+ OPJ_SIZE_T jpipstreamlen; /**< length of jpipstream*/
+ msgqueue_param_t *msgqueue; /**< parsed message queue of jpipstream*/
+ SOCKET listening_socket; /**< listenning socket*/
} dec_server_record_t;
@@ -171,14 +172,14 @@ typedef SOCKET client_t;
* @param[in] port opening tcp port (valid No. 49152-65535)
* @return intialized decoding server record pointer
*/
-OPJ_API dec_server_record_t * OPJ_CALLCONV 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
*/
-OPJ_API void OPJ_CALLCONV terminate_dec_server( dec_server_record_t **rec);
+OPJ_API void OPJ_CALLCONV terminate_dec_server(dec_server_record_t **rec);
/**
* Accept client connection
@@ -186,20 +187,21 @@ OPJ_API void OPJ_CALLCONV terminate_dec_server( dec_server_record_t **rec);
* @param[in] rec decoding server static record pointer
* @return client socket ID, -1 if failed
*/
-OPJ_API client_t OPJ_CALLCONV 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] client client socket ID
- * @param[in] rec decoding server static record pointer
- * @return true if succeed
- */
-OPJ_API OPJ_BOOL OPJ_CALLCONV handle_clientreq( client_t client, dec_server_record_t *rec);
+/**
+ * Handle client request
+ *
+ * @param[in] client client socket ID
+ * @param[in] rec decoding server static record pointer
+ * @return true if succeed
+ */
+OPJ_API OPJ_BOOL OPJ_CALLCONV handle_clientreq(client_t client,
+ dec_server_record_t *rec);
#endif /*SERVER*/
-/*
+/*
*==========================================================
* JPIP tool API
*==========================================================
@@ -212,14 +214,14 @@ OPJ_API OPJ_BOOL OPJ_CALLCONV handle_clientreq( client_t client, dec_server_reco
*/
/** JPIP decoding parameters*/
-typedef struct jpip_dec_param{
- Byte_t *jpipstream; /**< JPT/JPP-stream*/
- Byte8_t jpiplen; /**< length of jpipstream*/
- msgqueue_param_t *msgqueue; /**< message queue*/
- metadatalist_param_t *metadatalist; /**< metadata list going into JP2 file*/
- ihdrbox_param_t *ihdrbox; /**< ihdr box going into JP2 file*/
- Byte_t *jp2kstream; /**< J2K codestream or JP2 file codestream*/
- Byte8_t jp2klen; /**< length of j2kstream or JP2 file*/
+typedef struct jpip_dec_param {
+ Byte_t *jpipstream; /**< JPT/JPP-stream*/
+ Byte8_t jpiplen; /**< length of jpipstream*/
+ msgqueue_param_t *msgqueue; /**< message queue*/
+ metadatalist_param_t *metadatalist; /**< metadata list going into JP2 file*/
+ ihdrbox_param_t *ihdrbox; /**< ihdr box going into JP2 file*/
+ Byte_t *jp2kstream; /**< J2K codestream or JP2 file codestream*/
+ Byte8_t jp2klen; /**< length of j2kstream or JP2 file*/
} jpip_dec_param_t;
/**
@@ -228,14 +230,14 @@ typedef struct jpip_dec_param{
* @param[in] jp2 true in case of jp2 file encoding, else j2k file encoding
* @return JPIP decoding parameters pointer
*/
-OPJ_API jpip_dec_param_t * OPJ_CALLCONV init_jpipdecoder( OPJ_BOOL jp2);
+OPJ_API jpip_dec_param_t * OPJ_CALLCONV init_jpipdecoder(OPJ_BOOL jp2);
/**
* Destroy jpip decoding parameters
*
* @param[in] dec address of JPIP decoding parameters pointer
*/
-OPJ_API void OPJ_CALLCONV 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
@@ -244,14 +246,15 @@ OPJ_API void OPJ_CALLCONV destroy_jpipdecoder( jpip_dec_param_t **dec);
* @param[in] dec JPIP decoding parameters pointer
* @return true if succeed
*/
-OPJ_API OPJ_BOOL OPJ_CALLCONV fread_jpip( const char fname[], jpip_dec_param_t *dec);
+OPJ_API OPJ_BOOL OPJ_CALLCONV fread_jpip(const char fname[],
+ jpip_dec_param_t *dec);
/**
* Decode jpip codestream
*
* @param[in] dec JPIP decoding parameters pointer
*/
-OPJ_API void OPJ_CALLCONV 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
@@ -260,7 +263,8 @@ OPJ_API void OPJ_CALLCONV decode_jpip( jpip_dec_param_t *dec);
* @param[in] dec JPIP decoding parameters pointer
* @return true if succeed
*/
-OPJ_API OPJ_BOOL OPJ_CALLCONV fwrite_jp2k( const char fname[], jpip_dec_param_t *dec);
+OPJ_API OPJ_BOOL OPJ_CALLCONV fwrite_jp2k(const char fname[],
+ jpip_dec_param_t *dec);
/**
* Option; print out parameter values to stderr
@@ -270,7 +274,8 @@ OPJ_API OPJ_BOOL OPJ_CALLCONV fwrite_jp2k( const char fname[], jpip_dec_param_t
* @param[in] ihdrbox true if image header data is to be printed out
* @param[in] dec JPIP decoding parameters pointer
*/
-OPJ_API void OPJ_CALLCONV output_log( OPJ_BOOL messages, OPJ_BOOL metadata, OPJ_BOOL ihdrbox, jpip_dec_param_t *dec);
+OPJ_API void OPJ_CALLCONV output_log(OPJ_BOOL messages, OPJ_BOOL metadata,
+ OPJ_BOOL ihdrbox, jpip_dec_param_t *dec);
/*
* test the format of index (cidx) box in JP2 file
@@ -281,18 +286,18 @@ typedef index_param_t index_t;
/**
* Parse JP2 file and get index information from cidx box inside
- *
+ *
* @param[in] fd file descriptor of the JP2 file
* @return pointer to the generated structure of index parameters
*/
-OPJ_API index_t * OPJ_CALLCONV 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
*/
-OPJ_API void OPJ_CALLCONV destroy_index( index_t **idx);
+OPJ_API void OPJ_CALLCONV destroy_index(index_t **idx);
/**
@@ -300,7 +305,7 @@ OPJ_API void OPJ_CALLCONV destroy_index( index_t **idx);
*
* @param[in] index index parameters
*/
-OPJ_API void OPJ_CALLCONV output_index( index_t *index);
+OPJ_API void OPJ_CALLCONV output_index(index_t *index);
#endif /*SERVER*/
diff --git a/src/lib/openjpip/placeholder_manager.h b/src/lib/openjpip/placeholder_manager.h
index c08edd40..301a8410 100644
--- a/src/lib/openjpip/placeholder_manager.h
+++ b/src/lib/openjpip/placeholder_manager.h
@@ -28,36 +28,36 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef PLACEHOLDER_MANAGER_H_
-# define PLACEHOLDER_MANAGER_H_
+#ifndef PLACEHOLDER_MANAGER_H_
+# define PLACEHOLDER_MANAGER_H_
#include "byte_manager.h"
#include "box_manager.h"
/** A.3.6.3 Placeholder box format*/
/** placeholder box parameters*/
-typedef struct placeholder_param{
- Byte4_t LBox;
- char TBox[4];
- Byte4_t Flags;
- Byte8_t OrigID;
- Byte_t *OrigBH; /**< dynamic memory pointer*/
- Byte_t OrigBHlen; /**< length of OrigBH*/
+typedef struct placeholder_param {
+ Byte4_t LBox;
+ char TBox[4];
+ Byte4_t Flags;
+ Byte8_t OrigID;
+ Byte_t *OrigBH; /**< dynamic memory pointer*/
+ Byte_t OrigBHlen; /**< length of OrigBH*/
#ifdef AAA
- Byte8_t EquivID;
- Byte_t *EquivBH; /**< dynamic memory pointer*/
- Byte_t EquivBHlen; /**< length of EquivBH*/
- Byte8_t CSID;
- Byte4_t NCS;
+ Byte8_t EquivID;
+ Byte_t *EquivBH; /**< dynamic memory pointer*/
+ Byte_t EquivBHlen; /**< length of EquivBH*/
+ Byte8_t CSID;
+ Byte4_t NCS;
#endif /*AAA*/
- struct placeholder_param *next; /**< pointer to the next placeholder*/
+ struct placeholder_param *next; /**< pointer to the next placeholder*/
} placeholder_param_t;
/** placeholder box list parameters*/
-typedef struct placeholderlist_param{
- placeholder_param_t *first; /**< first placeholder pointer of the list*/
- placeholder_param_t *last; /**< last placeholder pointer of the list*/
+typedef struct placeholderlist_param {
+ placeholder_param_t *first; /**< first placeholder pointer of the list*/
+ placeholder_param_t *last; /**< last placeholder pointer of the list*/
} placeholderlist_param_t;
@@ -74,7 +74,7 @@ placeholderlist_param_t * gene_placeholderlist(void);
*
* @param[in,out] list address of the placeholder list pointer
*/
-void delete_placeholderlist( placeholderlist_param_t **list);
+void delete_placeholderlist(placeholderlist_param_t **list);
/**
@@ -84,7 +84,7 @@ void delete_placeholderlist( placeholderlist_param_t **list);
* @param[in] origID metadata-bin ID of the bin containing the contents of the original box
* @return pointer to the generated placeholder
*/
-placeholder_param_t * gene_placeholder( box_param_t *box, Byte8_t origID);
+placeholder_param_t * gene_placeholder(box_param_t *box, Byte8_t origID);
/**
@@ -92,9 +92,10 @@ placeholder_param_t * gene_placeholder( box_param_t *box, Byte8_t origID);
*
* @param[in,out] placeholder address of the placeholder pointer
*/
-void delete_placeholder( placeholder_param_t **placeholder);
+void delete_placeholder(placeholder_param_t **placeholder);
-void insert_placeholder_into_list( placeholder_param_t *phld, placeholderlist_param_t *phldlist);
+void insert_placeholder_into_list(placeholder_param_t *phld,
+ placeholderlist_param_t *phldlist);
/**
@@ -102,7 +103,7 @@ void insert_placeholder_into_list( placeholder_param_t *phld, placeholderlist_pa
*
* @param[in] phld placeholder pointer
*/
-void print_placeholder( placeholder_param_t *phld);
+void print_placeholder(placeholder_param_t *phld);
/**
@@ -110,6 +111,6 @@ void print_placeholder( placeholder_param_t *phld);
*
* @param[in] list placeholder list pointer
*/
-void print_allplaceholder( placeholderlist_param_t *list);
+void print_allplaceholder(placeholderlist_param_t *list);
-#endif /* !PLACEHOLDER_MANAGER_H_ */
+#endif /* !PLACEHOLDER_MANAGER_H_ */
diff --git a/src/lib/openjpip/query_parser.h b/src/lib/openjpip/query_parser.h
index 5d6ce443..46d57484 100644
--- a/src/lib/openjpip/query_parser.h
+++ b/src/lib/openjpip/query_parser.h
@@ -29,8 +29,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef QUERY_PARSER_H_
-# define QUERY_PARSER_H_
+#ifndef QUERY_PARSER_H_
+# define QUERY_PARSER_H_
#include "opj_includes.h"
@@ -41,33 +41,34 @@
typedef enum cnew_transport { non, http, tcp, udp} cnew_transport_t;
/** image return type */
-typedef enum image_return { JPPstream, JPTstream, UNKNOWN=-1} image_return_t;
+typedef enum image_return { JPPstream, JPTstream, UNKNOWN = -1} image_return_t;
/** Query parameters */
-typedef struct query_param{
- char *target; /**< target name */
- char *tid; /**< target identifier */
- int fx, fy; /**< frame size (fx,fy) */
- int rx, ry, rw, rh; /**< roi region */
- int layers; /**< quality layers */
- int lastcomp; /**< last component number */
- OPJ_BOOL *comps; /**< components (dynamic array) for jpp-stream, null means all components */
- char *cid; /**< channel identifier */
- cnew_transport_t cnew; /**< transport name if there is new channel request, else non */
- char *cclose; /**< list of closing channel identifiers, separated by '\\0' */
- int numOfcclose; /**< number of closing channels */
- char box_type[MAX_NUMOFBOX][4]; /**< interested box-types */
- int limit[MAX_NUMOFBOX]; /**< limit value, -1: skeleton request "r", 0: entire contents */
- OPJ_BOOL w[MAX_NUMOFBOX]; /**< Metadata request qualifier flags */
- OPJ_BOOL s[MAX_NUMOFBOX];
- OPJ_BOOL g[MAX_NUMOFBOX];
- OPJ_BOOL a[MAX_NUMOFBOX];
- OPJ_BOOL priority[MAX_NUMOFBOX]; /**< priority flag */
- int root_bin; /**< root-bin */
- int max_depth; /**< max-depth */
- OPJ_BOOL metadata_only; /**< metadata-only request */
- image_return_t return_type; /**< image return type */
- int len; /**< maximum response length */
+typedef struct query_param {
+ char *target; /**< target name */
+ char *tid; /**< target identifier */
+ int fx, fy; /**< frame size (fx,fy) */
+ int rx, ry, rw, rh; /**< roi region */
+ int layers; /**< quality layers */
+ int lastcomp; /**< last component number */
+ OPJ_BOOL *comps; /**< components (dynamic array) for jpp-stream, null means all components */
+ char *cid; /**< channel identifier */
+ cnew_transport_t
+ cnew; /**< transport name if there is new channel request, else non */
+ char *cclose; /**< list of closing channel identifiers, separated by '\\0' */
+ int numOfcclose; /**< number of closing channels */
+ char box_type[MAX_NUMOFBOX][4]; /**< interested box-types */
+ int limit[MAX_NUMOFBOX]; /**< limit value, -1: skeleton request "r", 0: entire contents */
+ OPJ_BOOL w[MAX_NUMOFBOX]; /**< Metadata request qualifier flags */
+ OPJ_BOOL s[MAX_NUMOFBOX];
+ OPJ_BOOL g[MAX_NUMOFBOX];
+ OPJ_BOOL a[MAX_NUMOFBOX];
+ OPJ_BOOL priority[MAX_NUMOFBOX]; /**< priority flag */
+ int root_bin; /**< root-bin */
+ int max_depth; /**< max-depth */
+ OPJ_BOOL metadata_only; /**< metadata-only request */
+ image_return_t return_type; /**< image return type */
+ int len; /**< maximum response length */
} query_param_t;
@@ -77,14 +78,14 @@ typedef struct query_param{
* @param[in] query_string request query string
* @return pointer to query parameters
*/
-query_param_t * parse_query( const char *query_string);
+query_param_t * parse_query(const char *query_string);
/**
* print query parameters
*
* @param[in] query_param query parameters
*/
-void print_queryparam( query_param_t query_param);
+void print_queryparam(query_param_t query_param);
/**
@@ -92,6 +93,6 @@ void print_queryparam( query_param_t query_param);
*
* @param[in] query address of the deleting query pointer
*/
-void delete_query( query_param_t **query);
+void delete_query(query_param_t **query);
-#endif /* !QUERY_PARSER_H_ */
+#endif /* !QUERY_PARSER_H_ */
diff --git a/src/lib/openjpip/session_manager.h b/src/lib/openjpip/session_manager.h
index 7952fc0d..1343b1e7 100644
--- a/src/lib/openjpip/session_manager.h
+++ b/src/lib/openjpip/session_manager.h
@@ -28,23 +28,23 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef SESSION_MANAGER_H_
-# define SESSION_MANAGER_H_
+#ifndef SESSION_MANAGER_H_
+# define SESSION_MANAGER_H_
#include "channel_manager.h"
#include "cachemodel_manager.h"
/** Session parameters*/
-typedef struct session_param{
- channellist_param_t *channellist; /**< channel list pointer*/
- cachemodellist_param_t *cachemodellist; /**< cache list pointer*/
- struct session_param *next; /**< pointer to the next session*/
+typedef struct session_param {
+ channellist_param_t *channellist; /**< channel list pointer*/
+ cachemodellist_param_t *cachemodellist; /**< cache list pointer*/
+ struct session_param *next; /**< pointer to the next session*/
} session_param_t;
/** Session list parameters*/
-typedef struct sessionlist_param{
- session_param_t *first; /**< first session pointer of the list*/
- session_param_t *last; /**< last session pointer of the list*/
+typedef struct sessionlist_param {
+ session_param_t *first; /**< first session pointer of the list*/
+ session_param_t *last; /**< last session pointer of the list*/
} sessionlist_param_t;
@@ -62,7 +62,7 @@ sessionlist_param_t * gene_sessionlist(void);
* @param[in] sessionlist session list to insert the new session
* @return pointer to the generated session
*/
-session_param_t * gene_session( sessionlist_param_t *sessionlist);
+session_param_t * gene_session(sessionlist_param_t *sessionlist);
/**
* search a channel and its belonging session by channel ID
@@ -73,10 +73,10 @@ session_param_t * gene_session( sessionlist_param_t *sessionlist);
* @param[in,out] foundchannel address of the found channel pointer
* @return if the channel is found (true) or not (false)
*/
-OPJ_BOOL search_session_and_channel( char cid[],
- sessionlist_param_t *sessionlist,
- session_param_t **foundsession,
- channel_param_t **foundchannel);
+OPJ_BOOL search_session_and_channel(char cid[],
+ sessionlist_param_t *sessionlist,
+ session_param_t **foundsession,
+ channel_param_t **foundchannel);
/**
* insert a cache model into a session
@@ -84,7 +84,8 @@ OPJ_BOOL search_session_and_channel( char cid[],
* @param[in] session session pointer
* @param[in] cachemodel cachemodel pointer
*/
-void insert_cachemodel_into_session( session_param_t *session, cachemodel_param_t *cachemodel);
+void insert_cachemodel_into_session(session_param_t *session,
+ cachemodel_param_t *cachemodel);
/**
@@ -94,7 +95,8 @@ void insert_cachemodel_into_session( session_param_t *session, cachemodel_param_
* @param[in] sessionlist session list pointer
* @return if succeeded (true) or failed (false)
*/
-OPJ_BOOL delete_session( session_param_t **session, sessionlist_param_t *sessionlist);
+OPJ_BOOL delete_session(session_param_t **session,
+ sessionlist_param_t *sessionlist);
/**
@@ -102,14 +104,14 @@ OPJ_BOOL delete_session( session_param_t **session, sessionlist_param_t *session
*
* @param[in,out] sessionlist address of the session list pointer
*/
-void delete_sessionlist( sessionlist_param_t **sessionlist);
+void delete_sessionlist(sessionlist_param_t **sessionlist);
/**
* print all sessions
*
* @param[in] sessionlist session list pointer
*/
-void print_allsession( sessionlist_param_t *sessionlist);
+void print_allsession(sessionlist_param_t *sessionlist);
-#endif /* !SESSION_MANAGER_H_ */
+#endif /* !SESSION_MANAGER_H_ */
diff --git a/src/lib/openjpip/sock_manager.h b/src/lib/openjpip/sock_manager.h
index 0c89b55a..01d97574 100644
--- a/src/lib/openjpip/sock_manager.h
+++ b/src/lib/openjpip/sock_manager.h
@@ -28,8 +28,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef SOCK_MANAGER_H_
-# define SOCK_MANAGER_H_
+#ifndef SOCK_MANAGER_H_
+# define SOCK_MANAGER_H_
#include "byte_manager.h"
#include "opj_stdint.h"
@@ -48,7 +48,7 @@ typedef int SOCKET;
* @param port opening port number
* @return new socket
*/
-SOCKET open_listeningsocket( uint16_t port);
+SOCKET open_listeningsocket(uint16_t port);
/**
* accept a new connection to the listenning socket
@@ -56,7 +56,7 @@ SOCKET open_listeningsocket( uint16_t port);
* @param listening_socket listenning socket
* @return connected socket (-1 if error occurs)
*/
-SOCKET accept_socket( SOCKET listening_socket);
+SOCKET accept_socket(SOCKET listening_socket);
/**
@@ -74,7 +74,7 @@ OPJ_SIZE_T receive_line(SOCKET connected_socket, char *buf);
* @param [in] connected_socket file descriptor of the connected socket
* @return pointer to the string (memory allocated)
*/
-char * receive_string( SOCKET connected_socket);
+char * receive_string(SOCKET connected_socket);
/**
* receive data stream to client
@@ -83,7 +83,7 @@ char * receive_string( SOCKET connected_socket);
* @param [in] length length of the receiving stream
* @return pointer to the data stream (memory allocated), NULL if failed
*/
-void * receive_stream( SOCKET connected_socket, OPJ_SIZE_T length);
+void * receive_stream(SOCKET connected_socket, OPJ_SIZE_T length);
/**
* send data stream to client
@@ -92,7 +92,8 @@ void * receive_stream( SOCKET connected_socket, OPJ_SIZE_T length);
* @param [in] stream data stream
* @param [in] length length of data stream
*/
-void send_stream( SOCKET connected_socket, const void *stream, OPJ_SIZE_T length);
+void send_stream(SOCKET connected_socket, const void *stream,
+ OPJ_SIZE_T length);
/**
* close socket
@@ -100,6 +101,6 @@ void send_stream( SOCKET connected_socket, const void *stream, OPJ_SIZE_T length
* @param [in] sock closing socket
* @return 0 if succeed, -1 if failed
*/
-int close_socket( SOCKET sock);
+int close_socket(SOCKET sock);
#endif /* !SOCK_MANAGER_H_ */
diff --git a/src/lib/openjpip/target_manager.h b/src/lib/openjpip/target_manager.h
index 561510f5..c8a13de8 100644
--- a/src/lib/openjpip/target_manager.h
+++ b/src/lib/openjpip/target_manager.h
@@ -28,8 +28,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef TARGET_MANAGER_H_
-# define TARGET_MANAGER_H_
+#ifndef TARGET_MANAGER_H_
+# define TARGET_MANAGER_H_
#include "index_manager.h"
@@ -37,26 +37,28 @@
#define MAX_LENOFTID 30
/** target parameters*/
-typedef struct target_param{
- char tid[MAX_LENOFTID]; /**< target identifier*/
- char *targetname; /**< local file path or URL ( URL is suported only with SERVER mode)*/
- int fd; /**< file descriptor*/
+typedef struct target_param {
+ char tid[MAX_LENOFTID]; /**< target identifier*/
+ char *targetname; /**< local file path or URL ( URL is suported only with SERVER mode)*/
+ int fd; /**< file descriptor*/
#ifdef SERVER
- char *tmpfname; /**< temporal file name to download a remote target file*/
+ char *tmpfname; /**< temporal file name to download a remote target file*/
#endif
- int csn; /**< codestream number */
- index_param_t *codeidx; /**< index information of codestream */
- int num_of_use; /**< numbers of sessions referring to this target */
- OPJ_BOOL jppstream; /**< if this target can return JPP-stream */
- OPJ_BOOL jptstream; /**< if this target can return JPP-stream */
- struct target_param *next; /**< pointer to the next target */
+ int csn; /**< codestream number */
+ index_param_t
+ *codeidx; /**< index information of codestream */
+ int num_of_use; /**< numbers of sessions referring to this target */
+ OPJ_BOOL jppstream; /**< if this target can return JPP-stream */
+ OPJ_BOOL jptstream; /**< if this target can return JPP-stream */
+ struct target_param
+ *next; /**< pointer to the next target */
} target_param_t;
/** Target list parameters*/
-typedef struct targetlist_param{
- target_param_t *first; /**< first target pointer of the list*/
- target_param_t *last; /**< last target pointer of the list*/
+typedef struct targetlist_param {
+ target_param_t *first; /**< first target pointer of the list*/
+ target_param_t *last; /**< last target pointer of the list*/
} targetlist_param_t;
@@ -76,7 +78,7 @@ targetlist_param_t * gene_targetlist(void);
* @param[in] targetpath file path or URL of the target
* @return pointer to the generated target
*/
-target_param_t * gene_target( targetlist_param_t *targetlist, char *targetpath);
+target_param_t * gene_target(targetlist_param_t *targetlist, char *targetpath);
/**
@@ -85,7 +87,7 @@ target_param_t * gene_target( targetlist_param_t *targetlist, char *targetpath);
* @param[in] reftarget reference target pointer
* @param[out] ptr address of feeding target pointer
*/
-void refer_target( target_param_t *reftarget, target_param_t **ptr);
+void refer_target(target_param_t *reftarget, target_param_t **ptr);
/**
@@ -93,14 +95,14 @@ void refer_target( target_param_t *reftarget, target_param_t **ptr);
*
* @param[in] target reference pointer to the target
*/
-void unrefer_target( target_param_t *target);
+void unrefer_target(target_param_t *target);
/**
* delete a target
*
* @param[in,out] target address of the deleting target pointer
*/
-void delete_target( target_param_t **target);
+void delete_target(target_param_t **target);
/**
@@ -109,7 +111,8 @@ void delete_target( target_param_t **target);
* @param[in,out] target address of the deleting target pointer
* @param[in] targetlist target list pointer
*/
-void delete_target_in_list( target_param_t **target, targetlist_param_t *targetlist);
+void delete_target_in_list(target_param_t **target,
+ targetlist_param_t *targetlist);
/**
@@ -125,14 +128,14 @@ void delete_targetlist(targetlist_param_t **targetlist);
*
* @param[in] target target pointer
*/
-void print_target( target_param_t *target);
+void print_target(target_param_t *target);
/**
* print all target parameters
*
* @param[in] targetlist target list pointer
*/
-void print_alltarget( targetlist_param_t *targetlist);
+void print_alltarget(targetlist_param_t *targetlist);
/**
@@ -142,7 +145,8 @@ void print_alltarget( targetlist_param_t *targetlist);
* @param[in] targetlist target list pointer
* @return found target pointer
*/
-target_param_t * search_target( const char targetname[], targetlist_param_t *targetlist);
+target_param_t * search_target(const char targetname[],
+ targetlist_param_t *targetlist);
/**
@@ -152,7 +156,8 @@ target_param_t * search_target( const char targetname[], targetlist_param_t *tar
* @param[in] targetlist target list pointer
* @return found target pointer
*/
-target_param_t * search_targetBytid( const char tid[], targetlist_param_t *targetlist);
+target_param_t * search_targetBytid(const char tid[],
+ targetlist_param_t *targetlist);
-#endif /* !TARGET_MANAGER_H_ */
+#endif /* !TARGET_MANAGER_H_ */