private.h 4.2 KB
Newer Older
aymeric's avatar
aymeric committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
/***************************************************************************
 *            private.h
 *
 *  Mon Jun 13 14:23:23 2005
 *  Copyright  2005  Simon Morlat
 *  Email simon dot morlat at linphone dot org
 ****************************************************************************/

/*
 *  This program 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.
 *
 *  This program 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 this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
24

aymeric's avatar
aymeric committed
25 26
#ifndef _PRIVATE_H
#define _PRIVATE_H
27

28 29
#include <memory>

30 31 32 33
#include "linphone/core.h"
#include "linphone/friend.h"
#include "linphone/friendlist.h"
#include "linphone/tunnel.h"
34 35 36 37 38 39 40 41 42

#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
#pragma GCC diagnostic push
#endif
#ifdef _MSC_VER
#pragma warning(disable : 4996)
#else
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
43
#include "linphone/core_utils.h"
44 45 46 47
#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
#pragma GCC diagnostic pop
#endif

48
#include "linphone/conference.h"
49

50
#include "address/address.h"
51 52 53 54 55 56
#include "c-wrapper/internal/c-sal.h"
#include "sal/call-op.h"
#include "sal/event-op.h"
#include "sal/message-op.h"
#include "sal/presence-op.h"
#include "sal/register-op.h"
57 58

#ifdef __cplusplus
59
#include "core/platform-helpers/platform-helpers.h"
60 61
#endif

62
#include "linphone/sipsetup.h"
63
#include "quality_reporting.h"
64
#include "linphone/ringtoneplayer.h"
65 66
#include "vcard_private.h"
#include "carddav.h"
67
#include "linphone/player.h"
68 69
#include "account_creator_private.h"
#include "tester_utils.h"
aymeric's avatar
aymeric committed
70

71
#include "bctoolbox/port.h"
72
#include "bctoolbox/map.h"
73 74 75
#include "bctoolbox/vfs.h"
#include "belle-sip/belle-sip.h" /*we need this include for all http operations*/

76

77 78
#include <ctype.h>

79

aymeric's avatar
aymeric committed
80 81 82
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
83
#include "mediastreamer2/ice.h"
84
#include "mediastreamer2/mediastream.h"
Simon Morlat's avatar
Simon Morlat committed
85
#include "mediastreamer2/msconference.h"
aymeric's avatar
aymeric committed
86

Margaux Clerc's avatar
Margaux Clerc committed
87

88
#ifndef LIBLINPHONE_VERSION
aymeric's avatar
aymeric committed
89 90 91
#define LIBLINPHONE_VERSION LINPHONE_VERSION
#endif

92
#ifdef __ANDROID__
93 94
#include <jni.h>
#endif
95

96 97 98 99 100 101 102 103 104 105 106 107
#ifdef _WIN32
#if defined(__MINGW32__) || !defined(WINAPI_FAMILY_PARTITION) || !defined(WINAPI_PARTITION_DESKTOP)
#define LINPHONE_WINDOWS_DESKTOP 1
#elif defined(WINAPI_FAMILY_PARTITION)
#if defined(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#define LINPHONE_WINDOWS_DESKTOP 1
#elif defined(WINAPI_PARTITION_PHONE_APP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE_APP)
#define LINPHONE_WINDOWS_PHONE 1
#elif defined(WINAPI_PARTITION_APP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#define LINPHONE_WINDOWS_UNIVERSAL 1
#endif
#endif
François Grisez's avatar
François Grisez committed
108
#endif
109 110 111 112 113
#ifdef _MSC_VER
#if (_MSC_VER >= 1900)
#define LINPHONE_MSC_VER_GREATER_19
#endif
#endif
jehan's avatar
jehan committed
114

115 116 117 118 119

#ifdef SQLITE_STORAGE_ENABLED
#include <sqlite3.h>
#endif

120 121 122 123

#include "private_structs.h"
#include "private_functions.h"
#include "core_private.h"
124 125 126 127 128


#define STRING_RESET(field)	if (field) bctbx_free(field); (field) = NULL
#define STRING_SET(field, value)	do{ if (field){bctbx_free(field);field=NULL;}; field=bctbx_strdup(value); }while(0)
#define STRING_TRANSFER(field, newvalue)	do{ if (field){bctbx_free(field);field=NULL;}; field=newvalue; }while(0)
Sylvain Berfini's avatar
Sylvain Berfini committed
129

130

131 132 133 134
#ifdef __cplusplus
#define getPlatformHelpers(lc) static_cast<LinphonePrivate::PlatformHelpers*>(lc->platform_helper)
#endif

135

136 137 138 139 140 141
#define HOLD_OFF	(0)
#define HOLD_ON		(1)

#ifndef NB_MAX_CALLS
#define NB_MAX_CALLS	(10)
#endif
142 143 144 145

#define LINPHONE_MAX_CALL_HISTORY_UNLIMITED (-1)
#ifndef LINPHONE_MAX_CALL_HISTORY_SIZE
	#ifdef SQLITE_STORAGE_ENABLED
146
		#define LINPHONE_MAX_CALL_HISTORY_SIZE LINPHONE_MAX_CALL_HISTORY_UNLIMITED
147 148 149 150 151
	#else
		#define LINPHONE_MAX_CALL_HISTORY_SIZE 30
	#endif
#endif

152 153
#define LINPHONE_SQLITE3_VFS "sqlite3bctbx_vfs"

aymeric's avatar
aymeric committed
154
#endif /* _PRIVATE_H */