4 * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
5 * Copyright (c) 2002-2014, Professor Benoit Macq
6 * Copyright (c) 2010-2011, Kaori Hagihara
7 * Copyright (c) 2011, Lucian Corlaciu, GSoC
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
32 #ifndef DEC_CLIENTMSG_HANDLER_H_
33 # define DEC_CLIENTMSG_HANDLER_H_
35 #include "imgsock_manager.h"
36 #include "cache_manager.h"
37 #include "byte_manager.h"
38 #include "msgqueue_manager.h"
41 * handle JPT- JPP- stream message
43 * @param[in] connected_socket socket descriptor
44 * @param[in] cachelist cache list pointer
45 * @param[in,out] jpipstream address of JPT- JPP- stream pointer
46 * @param[in,out] streamlen address of stream length
47 * @param[in,out] msgqueue message queue pointer
49 void handle_JPIPstreamMSG(SOCKET connected_socket, cachelist_param_t *cachelist,
50 Byte_t **jpipstream, OPJ_SIZE_T *streamlen, msgqueue_param_t *msgqueue);
53 * handle PNM request message
55 * @param[in] connected_socket socket descriptor
56 * @param[in] jpipstream jpipstream pointer
57 * @param[in] msgqueue message queue pointer
58 * @param[in] cachelist cache list pointer
60 void handle_PNMreqMSG(SOCKET connected_socket, Byte_t *jpipstream,
61 msgqueue_param_t *msgqueue, cachelist_param_t *cachelist);
64 * handle XML request message
66 * @param[in] connected_socket socket descriptor
67 * @param[in] jpipstream address of caching jpipstream pointer
68 * @param[in] cachelist cache list pointer
70 void handle_XMLreqMSG(SOCKET connected_socket, Byte_t *jpipstream,
71 cachelist_param_t *cachelist);
74 * handle TargetID request message
76 * @param[in] connected_socket socket descriptor
77 * @param[in] cachelist cache list pointer
79 void handle_TIDreqMSG(SOCKET connected_socket, cachelist_param_t *cachelist);
82 * handle ChannelID request message
84 * @param[in] connected_socket socket descriptor
85 * @param[in] cachelist cache list pointer
87 void handle_CIDreqMSG(SOCKET connected_socket, cachelist_param_t *cachelist);
90 * handle distroy ChannelID message
92 * @param[in] connected_socket socket descriptor
93 * @param[in,out] cachelist cache list pointer
95 void handle_dstCIDreqMSG(SOCKET connected_socket, cachelist_param_t *cachelist);
98 * handle SIZ request message
100 * @param[in] connected_socket socket descriptor
101 * @param[in] jpipstream address of caching jpipstream pointer
102 * @param[in] msgqueue message queue pointer
103 * @param[in,out] cachelist cache list pointer
105 void handle_SIZreqMSG(SOCKET connected_socket, Byte_t *jpipstream,
106 msgqueue_param_t *msgqueue, cachelist_param_t *cachelist);
109 * handle saving JP2 file request message
111 * @param[in] connected_socket socket descriptor
112 * @param[in] cachelist cache list pointer
113 * @param[in] msgqueue message queue pointer
114 * @param[in] jpipstream address of caching jpipstream pointer
116 void handle_JP2saveMSG(SOCKET connected_socket, cachelist_param_t *cachelist,
117 msgqueue_param_t *msgqueue, Byte_t *jpipstream);
120 #endif /* !DEC_CLIENTMSG_HANDLER_H_ */