OpenJPEG: session_manager.h File Reference

OpenJPEG 2.5.0

Data Structures | Typedefs | Functions
session_manager.h File Reference
`#include "channel_manager.h"`
`#include "cachemodel_manager.h"`

Go to the source code of this file.

## Data Structures
struct | session_param
| Session parameters. More...
struct | sessionlist_param
| Session list parameters. More...

## Typedefs
typedef struct session_param | session_param_t
| Session parameters.
typedef struct sessionlist_param | sessionlist_param_t
| Session list parameters.

## Functions
sessionlist_param_t * | gene_sessionlist (void)
| generate a session list
session_param_t * | gene_session (sessionlist_param_t *sessionlist)
| generate a session under the sesion list
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
void | insert_cachemodel_into_session (session_param_t *session, cachemodel_param_t *cachemodel)
| insert a cache model into a session
OPJ_BOOL | delete_session (session_param_t **session, sessionlist_param_t *sessionlist)
| delete a session
void | delete_sessionlist (sessionlist_param_t **sessionlist)
| delete session list
void | print_allsession (sessionlist_param_t *sessionlist)
| print all sessions

## Typedef Documentation

## ◆ session_param_t

typedef struct session_param session_param_t

Session parameters.

## ◆ sessionlist_param_t

typedef struct sessionlist_param sessionlist_param_t

Session list parameters.

## Function Documentation

## ◆ delete_session()

OPJ_BOOL delete_session | ( | session_param_t ** | session,
|  | sessionlist_param_t * | sessionlist
| ) |  |

delete a session

Parameters

  [in] | session | address of the session pointer
  [in] | sessionlist | session list pointer

Returns
  if succeeded (true) or failed (false)

References delete_cachemodellist(), delete_channellist(), sessionlist_param::first, sessionlist_param::last, logstream, session_param::next, OPJ_FALSE, opj_free(), and OPJ_TRUE.

Referenced by close_channel().

## ◆ delete_sessionlist()

void delete_sessionlist | ( | sessionlist_param_t ** | sessionlist | ) |

delete session list

Parameters

  [in,out] | sessionlist | address of the session list pointer

References session_param::cachemodellist, session_param::channellist, delete_cachemodellist(), delete_channellist(), logstream, session_param::next, and opj_free().

## ◆ gene_session()

session_param_t * gene_session | ( | sessionlist_param_t * | sessionlist | ) |

generate a session under the sesion list

Parameters

  [in] | sessionlist | session list to insert the new session

Returns
  pointer to the generated session

References session_param::cachemodellist, session_param::channellist, sessionlist_param::first, gene_cachemodellist(), gene_channellist(), sessionlist_param::last, session_param::next, and opj_malloc().

Referenced by open_channel().

## ◆ gene_sessionlist()

sessionlist_param_t * gene_sessionlist | ( | void |  | ) |

generate a session list

Returns
  pointer to the generated session list

References sessionlist_param::first, sessionlist_param::last, and opj_malloc().

## ◆ insert_cachemodel_into_session()

void insert_cachemodel_into_session | ( | session_param_t * | session,
|  | cachemodel_param_t * | cachemodel
| ) |  |

insert a cache model into a session

Parameters

  [in] | session | session pointer
  [in] | cachemodel | cachemodel pointer

References session_param::cachemodellist, cachemodellist_param::first, cachemodellist_param::last, logstream, and cachemodel_param::next.

## ◆ print_allsession()

void print_allsession | ( | sessionlist_param_t * | sessionlist | ) |

print all sessions

Parameters

  [in] | sessionlist | session list pointer

References session_param::cachemodellist, session_param::channellist, cachemodellist_param::first, sessionlist_param::first, logstream, cachemodel_param::next, session_param::next, print_allchannel(), print_target(), and cachemodel_param::target.

## ◆ 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

Parameters

  [in] | cid | channel identifier
  [in] | sessionlist | session list pointer
  [in,out] | foundsession | address of the found session pointer
  [in,out] | foundchannel | address of the found channel pointer

Returns
  if the channel is found (true) or not (false)

References FCGI_stdout, sessionlist_param::first, channel_param::next, session_param::next, OPJ_FALSE, and OPJ_TRUE.

Referenced by associate_channel(), and close_channel().