2009-08-11 11:50:22 +03:00
|
|
|
/* -*- Mode: C ; c-basic-offset: 2 -*- */
|
|
|
|
/*
|
|
|
|
* LADI Session Handler (ladish)
|
|
|
|
*
|
2012-12-02 23:50:05 +02:00
|
|
|
* Copyright (C) 2009,2011,2012 Nedko Arnaudov <nedko@arnaudov.name>
|
2009-08-11 11:50:22 +03:00
|
|
|
*
|
|
|
|
**************************************************************************
|
|
|
|
* This file contains stuff that is needed almost everywhere in ladish
|
|
|
|
**************************************************************************
|
|
|
|
*
|
|
|
|
* LADI Session Handler is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* LADI Session Handler is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with LADI Session Handler. If not, see <http://www.gnu.org/licenses/>
|
|
|
|
* or write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef COMMON_H__82C9504A_ACD2_435D_9743_781943473E6A__INCLUDED
|
|
|
|
#define COMMON_H__82C9504A_ACD2_435D_9743_781943473E6A__INCLUDED
|
|
|
|
|
|
|
|
#include "config.h" /* configure stage result */
|
|
|
|
|
|
|
|
#include <stdbool.h> /* C99 bool */
|
|
|
|
#include <stdint.h> /* fixed bit size ints */
|
2009-08-21 23:13:19 +03:00
|
|
|
#include <inttypes.h>
|
2009-08-11 11:50:22 +03:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
2009-08-22 14:11:38 +03:00
|
|
|
#ifndef __cplusplus
|
|
|
|
#include "common/klist.h"
|
|
|
|
#endif
|
|
|
|
|
2009-09-20 18:02:10 +03:00
|
|
|
#include "log.h" /* log macros */
|
2009-09-20 18:48:42 +03:00
|
|
|
#include "assert.h" /* assert macros */
|
2009-08-22 16:55:55 +03:00
|
|
|
|
2009-12-12 17:10:38 +02:00
|
|
|
#define ladish_max(a, b) ((a) > (b) ? (a) : (b))
|
|
|
|
#define ladish_min(a, b) ((a) < (b) ? (a) : (b))
|
|
|
|
|
2011-07-28 15:15:47 +03:00
|
|
|
extern const char * g_app_L0_constant;
|
|
|
|
extern const char * g_app_L1_constant;
|
|
|
|
extern const char * g_app_L2_lash_constant;
|
|
|
|
extern const char * g_app_L2_js_constant;
|
|
|
|
#define LADISH_APP_LEVEL_0 g_app_L0_constant
|
|
|
|
#define LADISH_APP_LEVEL_1 g_app_L1_constant
|
|
|
|
#define LADISH_APP_LEVEL_LASH g_app_L2_lash_constant
|
|
|
|
#define LADISH_APP_LEVEL_JACKSESSION g_app_L2_js_constant
|
|
|
|
const char * ladish_map_app_level_constant(const char * level);
|
|
|
|
|
2011-09-10 04:11:50 +03:00
|
|
|
#define LADISH_PUBLIC __attribute__ ((visibility ("default")))
|
2012-12-02 23:50:05 +02:00
|
|
|
#define UNUSED(x) UNUSED_ ## x __attribute__((unused))
|
2011-09-10 04:11:50 +03:00
|
|
|
|
2009-08-11 11:50:22 +03:00
|
|
|
#endif /* #ifndef COMMON_H__82C9504A_ACD2_435D_9743_781943473E6A__INCLUDED */
|