session_manager.h
Go to the documentation of this file.
/*
* $Id$
*
* Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2014, Professor Benoit Macq
* Copyright (c) 2010-2011, Kaori Hagihara
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef SESSION_MANAGER_H_
# define SESSION_MANAGER_H_
#include "channel_manager.h"
#include "cachemodel_manager.h"
typedef struct session_param {
channellist_param_t *channellist;
cachemodellist_param_t *cachemodellist;
struct session_param *next;
} session_param_t;
typedef struct sessionlist_param {
session_param_t *first;
session_param_t *last;
} sessionlist_param_t;
sessionlist_param_t * gene_sessionlist(void);
session_param_t * gene_session(sessionlist_param_t *sessionlist);
OPJ_BOOL search_session_and_channel(char cid[],
sessionlist_param_t *sessionlist,
session_param_t **foundsession,
channel_param_t **foundchannel);
void insert_cachemodel_into_session(session_param_t *session,
cachemodel_param_t *cachemodel);
OPJ_BOOL delete_session(session_param_t **session,
sessionlist_param_t *sessionlist);
void delete_sessionlist(sessionlist_param_t **sessionlist);
void print_allsession(sessionlist_param_t *sessionlist);
#endif /* !SESSION_MANAGER_H_ */
cachemodel_manager.h
channel_manager.h
OPJ_BOOL
int OPJ_BOOL
Definition openjpeg.h:116
delete_sessionlist
void delete_sessionlist(sessionlist_param_t **sessionlist)
delete session list
Definition session_manager.c:161
gene_sessionlist
sessionlist_param_t * gene_sessionlist(void)
generate a session list
Definition session_manager.c:47
session_param_t
struct session_param session_param_t
Session parameters.
print_allsession
void print_allsession(sessionlist_param_t *sessionlist)
print all sessions
Definition session_manager.c:186
sessionlist_param_t
struct sessionlist_param sessionlist_param_t
Session list parameters.
delete_session
OPJ_BOOL delete_session(session_param_t **session, sessionlist_param_t *sessionlist)
delete a session
Definition session_manager.c:126
gene_session
session_param_t * gene_session(sessionlist_param_t *sessionlist)
generate a session under the session list
Definition session_manager.c:59
insert_cachemodel_into_session
void insert_cachemodel_into_session(session_param_t *session, cachemodel_param_t *cachemodel)
insert a cache model into a session
Definition session_manager.c:108
search_session_and_channel
OPJ_BOOL search_session_and_channel(char cid[], sessionlist_param_t *sessionlist, session_param_t **foundsession, channel_param_t **foundchannel)
search a channel and its belonging session by channel ID
Definition session_manager.c:80
cachemodel_param
Cache model parameters.
Definition cachemodel_manager.h:37
cachemodellist_param
Cache model list parameters.
Definition cachemodel_manager.h:48
channel_param
Channel parameters.
Definition channel_manager.h:43
channellist_param
Channel list parameters.
Definition channel_manager.h:54
session_param
Session parameters.
Definition session_manager.h:38
session_param::channellist
channellist_param_t * channellist
channel list pointer
Definition session_manager.h:39
session_param::next
struct session_param * next
pointer to the next session
Definition session_manager.h:41
session_param::cachemodellist
cachemodellist_param_t * cachemodellist
cache list pointer
Definition session_manager.h:40
sessionlist_param
Session list parameters.
Definition session_manager.h:45
sessionlist_param::last
session_param_t * last
last session pointer of the list
Definition session_manager.h:47
sessionlist_param::first
session_param_t * first
first session pointer of the list
Definition session_manager.h:46