[trunk] propagate the new OPJ_ symbol and type to openjpip
[openjpeg.git] / src / lib / openjpip / jpip_parser.h
1 /*
2  * $Id$
3  *
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
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
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.
18  *
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.
30  */
31
32 #ifndef         JPIP_PARSER_H_
33 # define        JPIP_PARSER_H_
34
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"
40
41 /**
42  * REQUEST: target identification by target or tid request
43  *
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)
48  */
49 OPJ_BOOL identify_target( query_param_t query_param, targetlist_param_t *targetlist, target_param_t **target);
50
51 /**
52  * REQUEST: channel association
53  *          this must be processed before any process
54  *
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)
60  */
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);
65 /**
66  * REQUEST: new channel (cnew) assignment
67  *
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)
75  */
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);
82
83 /**
84  * REQUEST: channel close (cclose)
85  *
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)
91  */
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);
96
97 /**
98  * REQUEST: view-window (fsiz)
99  *
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)
106  */
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);
112
113 #endif      /* !JPIP_PARSER_H_ */