Fix a warning reported on the continuous dashboard for linux.
[openjpeg.git] / applications / jpip / libopenjpip / target_manager.h
index fc872ea8d444b5fdd4e6882068db14e477a464d6..f44f99cd0fb95c70af095c52faea3c2a9a94129a 100644 (file)
 #ifndef        TARGET_MANAGER_H_
 # define       TARGET_MANAGER_H_
 
+#include "bool.h"
 #include "index_manager.h"
 
-//! maximum length of target identifier
+/** maximum length of target identifier*/
 #define MAX_LENOFTID 30
 
-//! maximum length of target name
-#define MAX_LENOFTARGET 128
-
-//! target parameters
+/** target parameters*/
 typedef struct target_param{
-  char tid[MAX_LENOFTID];         //!< taregt identifier
-  char filename[MAX_LENOFTARGET]; //!< file name
-  int fd;                         //!< file descriptor
-  int csn;                        //!< codestream number
-  index_param_t *codeidx;         //!< index information of codestream
-  int num_of_use;                 //!< numbers of sessions refering to this target
-  struct target_param *next;      //!< pointer to the next target
+  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*/
+#endif
+  int csn;                        /**< codestream number                                  */
+  index_param_t *codeidx;         /**< index information of codestream                    */
+  int num_of_use;                 /**< numbers of sessions refering to this target        */
+  bool jppstream;                 /**< if this target can return JPP-stream               */
+  bool jptstream;                 /**< if this target can return JPP-stream               */
+  struct target_param *next;      /**< pointer to the next target                         */
 } target_param_t;
 
 
-//! Target list parameters
+/** 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
+  target_param_t *first; /**< first target pointer of the list*/
+  target_param_t *last;  /**< last  target pointer of the list*/
 } targetlist_param_t;
 
 
@@ -71,10 +74,10 @@ targetlist_param_t * gene_targetlist();
  * generate a target
  *
  * @param[in] targetlist target list to insert the generated target
- * @param[in] targetname target file name
+ * @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 *targetname);
+target_param_t * gene_target( targetlist_param_t *targetlist, char *targetpath);
 
 
 /**
@@ -134,9 +137,9 @@ void print_alltarget( targetlist_param_t *targetlist);
 
 
 /**
- * search a target by filename
+ * search a target by target name
  *
- * @param[in] targetname target filename
+ * @param[in] targetname target name
  * @param[in] targetlist target list pointer
  * @return               found target pointer
  */