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 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,
50 targetlist_param_t *targetlist, target_param_t **target);
53 * REQUEST: channel association
54 * this must be processed before any process
56 * @param[in] query_param structured query
57 * @param[in] sessionlist session list pointer
58 * @param[out] cursession address of the associated session pointer
59 * @param[out] curchannel address of the associated channel pointer
60 * @return if succeeded (true) or failed (false)
62 OPJ_BOOL associate_channel(query_param_t query_param,
63 sessionlist_param_t *sessionlist,
64 session_param_t **cursession,
65 channel_param_t **curchannel);
67 * REQUEST: new channel (cnew) assignment
69 * @param[in] query_param structured query
70 * @param[in] sessionlist session list pointer
71 * @param[in] auxtrans auxiliary transport
72 * @param[in] target requested target pointer
73 * @param[in,out] cursession address of the associated/opened session pointer
74 * @param[in,out] curchannel address of the associated/opened channel pointer
75 * @return if succeeded (true) or failed (false)
77 OPJ_BOOL open_channel(query_param_t query_param,
78 sessionlist_param_t *sessionlist,
79 auxtrans_param_t auxtrans,
80 target_param_t *target,
81 session_param_t **cursession,
82 channel_param_t **curchannel);
85 * REQUEST: channel close (cclose)
87 * @param[in] query_param structured query
88 * @param[in] sessionlist session list pointer
89 * @param[in,out] cursession address of the session pointer of deleting channel
90 * @param[in,out] curchannel address of the deleting channel pointer
91 * @return if succeeded (true) or failed (false)
93 OPJ_BOOL close_channel(query_param_t query_param,
94 sessionlist_param_t *sessionlist,
95 session_param_t **cursession,
96 channel_param_t **curchannel);
99 * REQUEST: view-window (fsiz)
101 * @param[in] query_param structured query
102 * @param[in] target requested target pointer
103 * @param[in,out] cursession associated session pointer
104 * @param[in,out] curchannel associated channel pointer
105 * @param[out] msgqueue address of the message queue pointer
106 * @return if succeeded (true) or failed (false)
108 OPJ_BOOL gene_JPIPstream(query_param_t query_param,
109 target_param_t *target,
110 session_param_t *cursession,
111 channel_param_t *curchannel,
112 msgqueue_param_t **msgqueue);
114 #endif /* !JPIP_PARSER_H_ */