4 * Copyright (c) 2002-2011, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
5 * Copyright (c) 2002-2011, 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 JPIP_PARSER_H_
33 # define JPIP_PARSER_H_
35 #include "query_parser.h"
36 #include "session_manager.h"
37 #include "target_manager.h"
38 #include "msgqueue_manager.h"
39 #include "channel_manager.h"
42 * REQUEST: target identification by target or tid request
44 * @param[in] query_param structured query
45 * @param[in] targetlist target list pointer
46 * @param[out] target address of target pointer
47 * @return if succeeded (true) or failed (false)
49 OPJ_BOOL identify_target( query_param_t query_param, targetlist_param_t *targetlist, target_param_t **target);
52 * REQUEST: channel association
53 * this must be processed before any process
55 * @param[in] query_param structured query
56 * @param[in] sessionlist session list pointer
57 * @param[out] cursession address of the associated session pointer
58 * @param[out] curchannel address of the associated channel pointer
59 * @return if succeeded (true) or failed (false)
61 OPJ_BOOL associate_channel( query_param_t query_param,
62 sessionlist_param_t *sessionlist,
63 session_param_t **cursession,
64 channel_param_t **curchannel);
66 * REQUEST: new channel (cnew) assignment
68 * @param[in] query_param structured query
69 * @param[in] sessionlist session list pointer
70 * @param[in] auxtrans auxiliary transport
71 * @param[in] target requested target pointer
72 * @param[in,out] cursession address of the associated/opened session pointer
73 * @param[in,out] curchannel address of the associated/opened channel pointer
74 * @return if succeeded (true) or failed (false)
76 OPJ_BOOL open_channel( query_param_t query_param,
77 sessionlist_param_t *sessionlist,
78 auxtrans_param_t auxtrans,
79 target_param_t *target,
80 session_param_t **cursession,
81 channel_param_t **curchannel);
84 * REQUEST: channel close (cclose)
86 * @param[in] query_param structured query
87 * @param[in] sessionlist session list pointer
88 * @param[in,out] cursession address of the session pointer of deleting channel
89 * @param[in,out] curchannel address of the deleting channel pointer
90 * @return if succeeded (true) or failed (false)
92 OPJ_BOOL close_channel( query_param_t query_param,
93 sessionlist_param_t *sessionlist,
94 session_param_t **cursession,
95 channel_param_t **curchannel);
98 * REQUEST: view-window (fsiz)
100 * @param[in] query_param structured query
101 * @param[in] target requested target pointer
102 * @param[in,out] cursession associated session pointer
103 * @param[in,out] curchannel associated channel pointer
104 * @param[out] msgqueue address of the message queue pointer
105 * @return if succeeded (true) or failed (false)
107 OPJ_BOOL gene_JPIPstream( query_param_t query_param,
108 target_param_t *target,
109 session_param_t *cursession,
110 channel_param_t *curchannel,
111 msgqueue_param_t **msgqueue);
113 #endif /* !JPIP_PARSER_H_ */