pax_global_header 0000666 0000000 0000000 00000000064 13134375224 0014516 g ustar 00root root 0000000 0000000 52 comment=647393a5e4b49551f34e213c91d80b675c60a7f6
belle-sip-1.6.3/ 0000775 0000000 0000000 00000000000 13134375224 0013401 5 ustar 00root root 0000000 0000000 belle-sip-1.6.3/.clang-format 0000664 0000000 0000000 00000003672 13134375224 0015764 0 ustar 00root root 0000000 0000000 ---
# BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: true
AlignEscapedNewlinesLeft: false
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: false
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IndentCaseLabels: false
IndentFunctionDeclarationAfterType: false
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true
Language: Cpp
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 4
UseTab: Always
...
belle-sip-1.6.3/.cproject 0000664 0000000 0000000 00000045652 13134375224 0015227 0 ustar 00root root 0000000 0000000
makeinstalltruetruetruemakeCFLAGS="-g -Wall " -j3alltruetruetruemakeCFLAGS="-g -Wall " -j3testtruetruetrue
belle-sip-1.6.3/.git-pre-commit 0000775 0000000 0000000 00000004350 13134375224 0016244 0 ustar 00root root 0000000 0000000 #!/bin/bash
# This hook purpose is to keep coding style consistent between all developers
# It is automatically installed in .git/hooks folder by cmake on first run.
# From https://github.com/tatsuhiro-t/nghttp2/blob/master/pre-commit
function invalid-format-detected {
cat git-clang-format.diff
echo "*****************"
echo "$0: Invalid coding style detected (see git-clang-format.diff for issues). Please correct it using one of the following:"
echo "1) Apply patch located at git-clang-format.diff using:"
echo " cd $(git rev-parse --show-toplevel) && $1"
echo "2) Use clang-format to correctly format source code using:"
echo " $2"
echo "3) Reformat these lines manually."
echo "*** Aborting commit.***"
exit 1
}
function git-clang-format-diffing {
format_diff=$(which git-clang-format)
format_diff_options="--style=file"
#only diffing commited files, ignored staged one
$format_diff $format_diff_options --diff $(git --no-pager diff --cached --name-status | grep -v '^D' | cut -f2) > git-clang-format.diff
if ! grep -q -E '(no modified files to format|clang-format did not modify any files)' git-clang-format.diff; then
invalid-format-detected "git apply git-clang-format.diff" "clang-format $format_diff_options -i "
fi
}
function clang-format-diff-diffing {
format_diff=$(find /usr/bin/ -name 'clang-format-diff*' -type f | tail -n1)
format_diff_options="-style file"
git diff-index --cached --diff-filter=ACMR -p HEAD -- | $format_diff $format_diff_options -p1 > git-clang-format.diff
if [ -s git-clang-format.diff ]; then
invalid-format-detected "patch -p0 < git-clang-format.diff" "${format_diff/-diff/} $format_diff_options -i "
fi
}
set -e
if which git-clang-format &>/dev/null; then
git-clang-format-diffing $@
elif [ ! -z "$(find /usr/bin/ /usr/local/bin/ /opt/bin/ -name 'clang-format-diff*' -type f 2>/dev/null)" ]; then
# Warning! We need at least version 1.6...
clang-format-diff-diffing $@
else
echo "$0: Please install clang-format (coding style checker) - could not find git-clang-format nor clang-format-diff in PATH. Skipping code verification..."
exit 0
fi
belle-sip-1.6.3/.gitignore 0000664 0000000 0000000 00000001262 13134375224 0015372 0 ustar 00root root 0000000 0000000 INSTALL
aclocal.m4
*~
configure
Makefile.in
Makefile
build-aux
m4
autom4te.cache
*.o
*.lo
*.la
config.log
config.status
.deps
.libs
libtool
compile
depcomp
missing
install-sh
config.guess
config.h.in
config.sub
ltmain.sh
stamp-h1
.anjuta
belle-sip.anjuta
.kdev4/
belle-sip.kdev4
config.h
src/specs.c
belle-sip.pc
belle-sip.spec
html/
*.orig
tester/belle_sip_object_describe
tester/belle_sip_parse
tester/belle_sip_tester
tester/belle_http_get
tester/belle_sip_resolve
tester/CUnitAutomated-Results.xml
tester/download.tar.gz
tester/tmp_resolv.conf
tester/belle_sip_tester_crt
tester/CUnitAutomated-Results.xml.tmp-Results.xml
belle-sip-tests.log
git-clang-format.diff
.bc_tester_utils.tmp
belle-sip-1.6.3/.project 0000664 0000000 0000000 00000005354 13134375224 0015057 0 ustar 00root root 0000000 0000000
belle-siporg.eclipse.cdt.managedbuilder.core.genmakebuilderclean,full,incremental,?name?org.eclipse.cdt.make.core.append_environmenttrueorg.eclipse.cdt.make.core.autoBuildTargetallorg.eclipse.cdt.make.core.buildArgumentsCFLAGS="-g -Wall " V=1org.eclipse.cdt.make.core.buildCommandmakeorg.eclipse.cdt.make.core.cleanBuildTargetcleanorg.eclipse.cdt.make.core.contentsorg.eclipse.cdt.make.core.activeConfigSettingsorg.eclipse.cdt.make.core.enableAutoBuildfalseorg.eclipse.cdt.make.core.enableCleanBuildtrueorg.eclipse.cdt.make.core.enableFullBuildtrueorg.eclipse.cdt.make.core.fullBuildTargetallorg.eclipse.cdt.make.core.stopOnErrortrueorg.eclipse.cdt.make.core.useDefaultBuildCmdfalseorg.eclipse.cdt.managedbuilder.core.ScannerConfigBuilderfull,incremental,org.eclipse.cdt.core.cnatureorg.eclipse.cdt.managedbuilder.core.managedBuildNatureorg.eclipse.cdt.managedbuilder.core.ScannerConfigNature132921383046922org.eclipse.ui.ide.multiFilter1.0-name-matches-false-false-*.lo132921383047322org.eclipse.ui.ide.multiFilter1.0-name-matches-false-false-*.o
belle-sip-1.6.3/AUTHORS 0000664 0000000 0000000 00000000110 13134375224 0014441 0 ustar 00root root 0000000 0000000 Belledonne Communications SARL
belle-sip-1.6.3/CMakeLists.txt 0000664 0000000 0000000 00000020413 13134375224 0016141 0 ustar 00root root 0000000 0000000
# CMakeLists.txt
# Copyright (C) 2014 Belledonne Communications, Grenoble France
#
############################################################################
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
cmake_minimum_required(VERSION 3.0)
project(belle-sip VERSION 1.6.3 LANGUAGES C CXX)
set(PACKAGE "${PROJECT_NAME}")
set(PACKAGE_NAME "${PROJECT_NAME}")
set(PACKAGE_VERSION "${PROJECT_VERSION}")
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_BUGREPORT "jehan.monnier@linphone.org")
set(PACKAGE_TARNAME "${PROJECT_NAME}")
set(PACKAGE_URL "")
set(VERSION "${PACKAGE_VERSION}")
option(ENABLE_SHARED "Build shared library." YES)
option(ENABLE_STATIC "Build static library." YES)
option(ENABLE_RTP_MAP_ALWAYS_IN_SDP "Always include rtpmap in SDP." OFF)
option(ENABLE_STRICT "Build with strict compile options." YES)
option(ENABLE_TUNNEL "Enable tunnel support" OFF)
option(ENABLE_TESTS "Enable compilation of tests" ON)
include(CheckLibraryExists)
include(CheckSymbolExists)
include(CheckCSourceCompiles)
include(CMakePushCheckState)
include(GNUInstallDirs)
if(NOT CMAKE_INSTALL_RPATH AND CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR})
message(STATUS "Setting install rpath to ${CMAKE_INSTALL_RPATH}")
endif()
set(MSVC_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include/MSVC")
if(MSVC)
list(APPEND CMAKE_REQUIRED_INCLUDES ${MSVC_INCLUDE_DIR})
endif()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
check_library_exists("dl" "dlopen" "" HAVE_LIBDL)
check_library_exists("rt" "clock_gettime" "" HAVE_LIBRT)
cmake_push_check_state(RESET)
check_symbol_exists("res_ndestroy" "resolv.h" HAVE_RES_NDESTROY)
set(CMAKE_REQUIRED_LIBRARIES resolv)
check_c_source_compiles("#include
int main(int argc, char *argv[]) {
res_getservers(NULL,NULL,0);
return 0;
}"
HAVE_RES_GETSERVERS)
if(HAVE_RES_NDESTROY AND HAVE_RES_GETSERVERS)
set(HAVE_RESINIT 1)
endif()
cmake_pop_check_state()
find_package(Threads)
find_package(Zlib)
find_package(Antlr3 REQUIRED)
cmake_push_check_state(RESET)
set(CMAKE_REQUIRED_INCLUDES ${ANTLR3C_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LIBRARIES ${ANTLR3C_LIBRARIES})
check_symbol_exists("antlr3StringStreamNew" "antlr3.h" HAVE_ANTLR_STRING_STREAM_NEW)
cmake_pop_check_state()
if(ENABLE_RTP_MAP_ALWAYS_IN_SDP)
set(BELLE_SDP_FORCE_RTP_MAP 1)
endif()
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
set(BcToolbox_FIND_COMPONENTS tester)
include("${EP_bctoolbox_CONFIG_DIR}/BcToolboxConfig.cmake")
else()
find_package(BcToolbox 0.5.0 REQUIRED OPTIONAL_COMPONENTS tester)
endif()
if(ENABLE_TUNNEL)
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
include("${EP_tunnel_CONFIG_DIR}/TunnelConfig.cmake")
else()
find_package(Tunnel)
endif()
if(TUNNEL_FOUND)
set(HAVE_TUNNEL 1)
else()
message(WARNING "Could not find the tunnel library!")
set(ENABLE_TUNNEL OFF CACHE BOOL "Enable tunnel support" FORCE)
endif()
endif()
if(ZLIB_FOUND)
set(HAVE_ZLIB 1)
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix ${prefix}/bin)
set(libdir ${prefix}/lib)
set(includedir ${prefix}/include)
get_filename_component(antlr3c_library_path "${ANTLR3C_LIBRARIES}" PATH)
set(LIBS_PRIVATE "-L${antlr3c_library_path} -lantlr3c")
get_filename_component(bctoolbox_library_path "${BCTOOLBOX_CORE_LIBRARIES}" PATH)
set(LIBS_PRIVATE "${LIBS_PRIVATE} -L${bctoolbox_library_path} -lbctoolbox")
if(ZLIB_FOUND)
set(REQUIRES_PRIVATE "${REQUIRES_PRIVATE} z")
endif()
if(HAVE_LIBDL)
set(LIBS_PRIVATE "${LIBS_PRIVATE} -ldl")
endif()
if(HAVE_LIBRT)
set(LIBS_PRIVATE "${LIBS_PRIVATE} -lrt")
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/belle-sip.pc.in ${CMAKE_CURRENT_BINARY_DIR}/belle-sip.pc)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/belle-sip.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
include_directories(
include
src
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/src
${BCTOOLBOX_CORE_INCLUDE_DIRS}
)
if(TUNNEL_FOUND)
include_directories(${TUNNEL_INCLUDE_DIRS})
endif()
if(ZLIB_FOUND)
include_directories(${ZLIB_INCLUDE_DIRS})
endif()
if(MSVC)
include_directories(${MSVC_INCLUDE_DIR})
endif()
add_definitions("-DHAVE_CONFIG_H")
set(STRICT_OPTIONS_CPP )
set(STRICT_OPTIONS_C )
set(STRICT_OPTIONS_OBJC "-fmodules")
if(MSVC)
list(APPEND STRICT_OPTIONS_CPP "/wd4068") # Disable "unknown pragma" warnings from antlr
list(APPEND STRICT_OPTIONS_CPP "/wd4129") # Disable "unrecognized character escape sequence" warnings from antlr
if(ENABLE_STRICT)
list(APPEND STRICT_OPTIONS_CPP "/WX")
endif()
else()
list(APPEND STRICT_OPTIONS_CPP "-Wall" "-Wuninitialized" "-Wno-error=deprecated-declarations")
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
list(APPEND STRICT_OPTIONS_CPP "-Wno-error=unknown-warning-option" "-Qunused-arguments" "-Wno-tautological-compare" "-Wno-builtin-requires-header" "-Wno-unused-function" "-Wno-gnu-designator" "-Wno-array-bounds")
elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU")
list(APPEND STRICT_OPTIONS_CPP "-Wno-error=pragmas")
endif()
if(APPLE)
list(APPEND STRICT_OPTIONS_CPP "-Wno-error=unknown-warning-option" "-Qunused-arguments" "-Wno-tautological-compare" "-Wno-unused-function" "-Wno-array-bounds")
endif()
if(ENABLE_STRICT)
list(APPEND STRICT_OPTIONS_CPP "-Werror" "-Wextra" "-Wno-unused-parameter" "-Wno-error=unknown-pragmas" "-Wuninitialized" "-fno-strict-aliasing")
list(APPEND STRICT_OPTIONS_C "-Wdeclaration-after-statement" "-Wstrict-prototypes -Wno-missing-field-initializers" "-Wno-error=unused-result")
endif()
# this warning is generated by antlr so ignore it for now
list(APPEND STRICT_OPTIONS_C "-Wno-strict-prototypes" "-Wno-error=sign-compare")
endif()
if(STRICT_OPTIONS_CPP)
list(REMOVE_DUPLICATES STRICT_OPTIONS_CPP)
endif()
if(STRICT_OPTIONS_C)
list(REMOVE_DUPLICATES STRICT_OPTIONS_C)
endif()
set(LINK_FLAGS )
if(APPLE)
list(APPEND LINK_FLAGS "-framework Foundation")
if(IOS)
list(APPEND LINK_FLAGS "-framework CoreFoundation" "-framework CFNetwork" "-framework UIKit")
endif()
endif()
string(REPLACE ";" " " LINK_FLAGS_STR "${LINK_FLAGS}")
set(BELLESIP_CPPFLAGS ${BCTOOLBOX_CPPFLAGS})
if(ENABLE_STATIC)
list(APPEND BELLESIP_CPPFLAGS "-DBELLESIP_STATIC")
endif()
if(BELLESIP_CPPFLAGS)
list(REMOVE_DUPLICATES BELLESIP_CPPFLAGS)
add_definitions(${BELLESIP_CPPFLAGS})
endif()
add_definitions("-DBELLESIP_EXPORTS")
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
add_definitions(
-DHAVE_COMPILER_TLS
-DUSE_FIXED_NAMESERVERS
-DUSE_GETADDRINFO_FALLBACK
)
endif()
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
set(EXPORT_TARGETS_NAME "LinphoneBuilder")
else()
set(EXPORT_TARGETS_NAME "BelleSIP")
endif()
add_subdirectory(include)
add_subdirectory(src)
if(ENABLE_TESTS AND BCTOOLBOX_TESTER_FOUND)
enable_testing()
add_subdirectory(tester)
endif()
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/BelleSIPConfigVersion.cmake"
VERSION ${PACKAGE_VERSION}
COMPATIBILITY AnyNewerVersion
)
export(EXPORT ${EXPORT_TARGETS_NAME}Targets
FILE "${CMAKE_CURRENT_BINARY_DIR}/BelleSIPTargets.cmake"
)
configure_file(cmake/BelleSIPConfig.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/BelleSIPConfig.cmake"
@ONLY
)
set(CONFIG_PACKAGE_LOCATION "${CMAKE_INSTALL_DATADIR}/BelleSIP/cmake")
install(EXPORT ${EXPORT_TARGETS_NAME}Targets
FILE BelleSIPTargets.cmake
DESTINATION ${CONFIG_PACKAGE_LOCATION}
)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/BelleSIPConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/BelleSIPConfigVersion.cmake"
DESTINATION ${CONFIG_PACKAGE_LOCATION}
)
add_subdirectory(build)
belle-sip-1.6.3/COPYING 0000664 0000000 0000000 00000043127 13134375224 0014443 0 ustar 00root root 0000000 0000000 GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
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
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
belle-sip-1.6.3/ChangeLog 0000664 0000000 0000000 00000000000 13134375224 0015141 0 ustar 00root root 0000000 0000000 belle-sip-1.6.3/Makefile.am 0000664 0000000 0000000 00000001142 13134375224 0015433 0 ustar 00root root 0000000 0000000 #ACLOCAL_AMFLAGS = -I m4
SUBDIRS=include src tester
all-local: belle-sip.spec
belle-sip.spec: belle-sip.spec.in
test:
cd tester
$(MAKE) -C tester test
rpm:
$(MAKE) dist
TAR_OPTIONS=--wildcards rpmbuild -ta --clean --rmsource --rmspec $(PACKAGE)-$(VERSION).tar.gz
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = belle-sip.pc
EXTRA_DIST= \
belle-sip.spec \
belle-sip.spec.in \
autogen.sh \
CMakeLists.txt \
cmake/BelleSIPConfig.cmake.in \
cmake/FindAntlr3.cmake \
cmake/FindZlib.cmake \
config.h.cmake \
include/CMakeLists.txt \
src/CMakeLists.txt \
tester/CMakeLists.txt \
README.md
belle-sip-1.6.3/NEWS 0000664 0000000 0000000 00000003401 13134375224 0014076 0 ustar 00root root 0000000 0000000 belle_sip-1.6.2 -- July 21th, 2017
* Build fix for Windows
belle_sip-1.6.2 -- July 20th, 2017
* Bug fixes
belle_sip-1.6.1 -- March 2nd, 2017
* Fix bug around nsswitch.conf parsing on GNU/Linux
belle-sip-1.6.0 -- February 23th, 2017
belle-sip-1.5.0 -- August 8th, 2016
* move general purpose and encryption related functions to bctoolbox, which becomes a mandatory dependency.
* mbedTLS support through bctoolbox
* SUBSCRIBE/NOTIFY dialog improvements: can be created upon reception of NOTIFY (as requested by RFC),
automatic deletion when dialog expires.
* fix: retransmit 200Ok of a reINVITE (was formely only done for initial INVITE)
* add support for zlib in body handling
belle-sip-1.4.2 -- November 2nd, 2015
* Support of Accept, Content-Disposition and Supported headers
* Bug fixes
belle-sip-1.4.1 -- May 6th, 2015
* Bug fixes
belle-sip-1.4.0 -- March 11th, 2015
* support of display names of type (token LWS)* instead of just token
* support for absolute URIs
belle-sip-1.3.3 -- September 18th, 2014
* DNS SRV weight selection
* support of multipart messages
* support of Wake Locks on Android
* support of backslash escaped display name
belle-sip-1.3.0 -- February 20th, 2014 -- initial release of belle-sip
* RFC3261 compliant implementation of SIP parser, writer, transactions and dialog layers.
* http client api
* support of client TLS certificate
* fully asynchronous transport layer (UDP, TCP, TLS)
* fully asynchronous DNS resolution with SRV
* full dual-stack IPv6 support
* SIP transaction state machines with lastest corrections (RFC6026)
* automatic management of request refreshes with network disconnection resiliency thanks to the "refresher" object
* supported platforms: Linux, Mac OSX, windows XP+, iOS, Android, Blackberry 10.
belle-sip-1.6.3/README.centos 0000775 0000000 0000000 00000001516 13134375224 0015561 0 ustar 00root root 0000000 0000000 Belle-sip rpm can be built applying the following procedure:
centos6.4
***********
*antlr.jar*
Belle sip needs antlr.jar to generate parser code. A prebuilt jar is available from the antlr git and should be manually install using the following command:
git clone -b linphone git://git.linphone.org/antlr3
sudo mkdir /usr/local/share/java
sudo cp antlr3/antlr-3.4-complete.jar /usr/local/share/java/antlr.jar
*libantlr3c*
Belle sip uses libantlr3c version 3.2 or above. This dependency cannot be easely met on centos 6.4.
To manually build libantlr3c on a 64 bits system, checkout source code using:
cd antlr3/runtime/C
./autogen.sh
./configure --disable-shared --enable-64bit --with-pic
make
sudo make install
Now, back to belle-sip
./autogen.sh
./configure
make rpm
belle-sip-1.6.3/README.md 0000664 0000000 0000000 00000004555 13134375224 0014671 0 ustar 00root root 0000000 0000000 Belle-sip
=========
Overview
--------
Belle-sip is a SIP (RFC3261) implementation written in C, with an object oriented API.
Please check "NEWS" file for an overview of current features.
Copyright 2012-2014, Belledonne Communications SARL , all rights reserved.
Belle-sip is distributed to everyone under the GNU GPLv2 (see COPYING file for details).
Incorporating belle-sip within a closed source project is not possible under the GPL.
Commercial licensing can be purchased for that purpose from [Belledonne Communications](http://www.belledonne-communications.com).
Dependencies
------------
### Build-time dependencies
These are required to generate a C sourcefile from SIP grammar using [antlr3](http://www.antlr3.org/) generator:
* [Java SE](http://www.oracle.com/technetwork/java/javase/downloads/index.html) or OpenJDK
* [antlr 3.4](https://github.com/antlr/website-antlr3/blob/gh-pages/download/antlr-3.4-complete.jar)
### Runtime dependencies
- *libantlr3c* version 3.2 or 3.4
- *bctoolbox* (git://git.linphone.org/bctoolbox.git or )
### Under Debian/Ubuntu
apt-get install libantlr3c-dev antlr3
### Under MacOS X using HomeBrew
brew install libantlr3.4c homebrew/versions/antlr3
Building bctoolbox with CMake
-----------------------------
cmake . -DCMAKE_INSTALL_PREFIX= -DCMAKE_PREFIX_PATH=
make
make install
Build options
-------------
* `CMAKE_INSTALL_PREFIX=` : install prefix.
* `CMAKE_PREFIX_PATH=` : column-separated list of prefixes where to find dependencies.
* `ENABLE_TESTS=NO` : disable non-regression tests.
* `ENABLE_STRICT=NO` : build without strict build options like `-Wall -Werror`
* `ENABLE_SHARED=NO` : do not build the shared library
* `ENABLE_STATIC=NO` : do not build the static library
Note for packagers
------------------
Our CMake scripts may automatically add some paths into research paths of generated binaries.
To ensure that the installed binaries are striped of any rpath, use `-DCMAKE_SKIP_INSTALL_RPATH=ON`
while you invoke cmake.
Rpm packaging
belle-sip can be generated with cmake3 using the following command:
mkdir WORK
cd WORK
cmake3 ../
make package_source
rpmbuild -ta --clean --rmsource --rmspec belle-sip--.tar.gz
belle-sip-1.6.3/autogen.sh 0000775 0000000 0000000 00000002370 13134375224 0015404 0 ustar 00root root 0000000 0000000 #!/bin/sh
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
THEDIR=`pwd`
cd $srcdir
#AM_VERSION="1.10"
if ! type aclocal-$AM_VERSION 1>/dev/null 2>&1; then
# automake-1.10 (recommended) is not available on Fedora 8
AUTOMAKE=automake
ACLOCAL=aclocal
else
ACLOCAL=aclocal-${AM_VERSION}
AUTOMAKE=automake-${AM_VERSION}
fi
libtoolize="libtoolize"
for lt in glibtoolize libtoolize15 libtoolize14 libtoolize13 ; do
if test -x /usr/bin/$lt ; then
libtoolize=$lt ; break
fi
if test -x /usr/local/bin/$lt ; then
libtoolize=$lt ; break
fi
if test -x /opt/local/bin/$lt ; then
libtoolize=$lt ; break
fi
done
if test -d /usr/local/share/aclocal ; then
ACLOCAL_ARGS="$ACLOCAL_ARGS -I /usr/local/share/aclocal"
fi
if test -d /share/aclocal ; then
ACLOCAL_ARGS="$ACLOCAL_ARGS -I /share/aclocal"
fi
set -x
rm -rf config.cache autom4te.cache
$libtoolize --copy --force
$ACLOCAL -I m4 $ACLOCAL_ARGS
autoheader
$AUTOMAKE --force-missing --add-missing --copy
autoconf
#install git pre-commit hooks if possible
if [ -d .git/hooks ] && [ ! -f .git/hooks/pre-commit ]; then
cp .git-pre-commit .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
fi
cd $THEDIR
belle-sip-1.6.3/belle-sip.pc.in 0000664 0000000 0000000 00000000537 13134375224 0016213 0 ustar 00root root 0000000 0000000 # This is a comment
prefix=@prefix@
exec_prefix=@exec_prefix@
includedir=@includedir@
Name: belle-sip
Description: A c based implementation of the SIP (RFC 3261) telephony protocol
Requires: bctoolbox
Requires.private: @REQUIRES_PRIVATE@ @TLS_PC@
Version: @VERSION@
Libs: -L@libdir@ -lbellesip
Libs.private: @LIBS_PRIVATE@
Cflags: -I@includedir@
belle-sip-1.6.3/belle-sip.spec.in 0000775 0000000 0000000 00000004440 13134375224 0016543 0 ustar 00root root 0000000 0000000 # -*- rpm-spec -*-
## rpmbuild options
# These 2 lines are here because we can build the RPM for flexisip, in which
# case we prefix the entire installation so that we don't break compatibility
# with the user's libs.
# To compile with bc prefix, use rpmbuild -ba --with bc [SPEC]
%define pkg_name %{?_with_bc:bc-belle-sip}%{!?_with_bc:belle-sip}
%{?_with_bc: %define _prefix /opt/belledonne-communications}
%define srtp %{?_without_srtp:0}%{?!_without_srtp:1}
# re-define some directories for older RPMBuild versions which don't. This messes up the doc/ dir
# taken from https://fedoraproject.org/wiki/Packaging:RPMMacros?rd=Packaging/RPMMacros
%define _datarootdir %{_prefix}/share
%define _datadir %{_datarootdir}
%define _docdir %{_datadir}/doc
Name: %{pkg_name}
Version: @VERSION@
Release: %(version=`git describe --tags --abbrev=40 | sed -rn 's/^.*-([0-9]+)-g[a-z0-9]{40}$/\1/p'` && if test -z "$version" ; then echo 0 ; else echo $version ; fi)%{?dist}
Summary: Linphone sip stack
Group: Applications/Communications
License: GPL
URL: http://www.belle-sip.org
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: %{name}-%{version}.tar.gz
%description
Belle-sip is an object oriented SIP stack, written in C, used by Linphone.
BuildRequires: antlr3-tool antlr3-C-devel
%package devel
Summary: Development libraries for belle-sip
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
Libraries and headers required to develop software with belle-sip
%prep
%setup -q
%build
%configure \
--disable-tests --enable-static --docdir=%{_docdir}
%__make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README.md
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root)
%{_includedir}/belle-sip
%{_libdir}/libbellesip.a
%{_libdir}/libbellesip.la
%{_libdir}/libbellesip.so
%{_libdir}/pkgconfig/belle-sip.pc
%changelog
* Mon Aug 19 2013 jehan.monnier
- Initial RPM release.
belle-sip-1.6.3/build/ 0000775 0000000 0000000 00000000000 13134375224 0014500 5 ustar 00root root 0000000 0000000 belle-sip-1.6.3/build/CMakeLists.txt 0000664 0000000 0000000 00000003640 13134375224 0017243 0 ustar 00root root 0000000 0000000 ############################################################################
# CMakeLists.txt
# Copyright (C) 2017 Belledonne Communications, Grenoble France
#
############################################################################
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
if (NOT CPACK_PACKAGE_NAME)
set(CPACK_PACKAGE_NAME "belle-sip")
ENDIF()
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/../COPYING")
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${PROJECT_VERSION})
set(CPACK_SOURCE_GENERATOR "TGZ")
set(CPACK_SOURCE_IGNORE_FILES
"${CMAKE_BINARY_DIR}"
"^${PROJECT_SOURCE_DIR}/.git*"
)
bc_project_build_version(${PROJECT_VERSION} PROJECT_VERSION_BUILD)
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${PROJECT_VERSION_BUILD}")
message("-- Package file name is ${CPACK_PACKAGE_FILE_NAME}" )
set(CPACK_SOURCE_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rpm/belle-sip.spec.cmake ${CMAKE_CURRENT_SOURCE_DIR}/../belle-sip.spec)
include(CPack)
belle-sip-1.6.3/build/android/ 0000775 0000000 0000000 00000000000 13134375224 0016120 5 ustar 00root root 0000000 0000000 belle-sip-1.6.3/build/android/Android.mk 0000664 0000000 0000000 00000005163 13134375224 0020036 0 ustar 00root root 0000000 0000000 ##
## Android.mk -Android build script-
##
##
## Copyright (C) 2013 Belledonne Communications, Grenoble, France
##
## 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.
##
LOCAL_PATH:= $(call my-dir)/../../src
include $(CLEAR_VARS)
LOCAL_MODULE := libbellesip
LOCAL_CFLAGS += \
-DHAVE_CONFIG_H -DHAVE_ZLIB=1 \
-DBELLESIP_VERSION=\"$(BELLESIP_VERSION)\"
LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/../../externals/antlr3/runtime/C/include \
$(LOCAL_PATH)/../include \
$(LOCAL_PATH)/../build/android
LOCAL_SRC_FILES := \
auth_event.c \
auth_helper.c \
belle_sdp_impl.c \
http-listener.c \
http-provider.c \
http-message.c \
generic-uri.c \
belle_sip_headers_impl.c \
belle_sip_loop.c \
grammars/belle_sip_messageLexer.c \
grammars/belle_sip_messageParser.c \
grammars/belle_sdpLexer.c \
grammars/belle_sdpParser.c \
belle_sip_object.c \
belle_sip_dict.c \
belle_sip_parameters.c \
belle_sip_resolver.c \
belle_sip_uri_impl.c \
belle_sip_utils.c \
channel.c \
clock_gettime.c \
dialog.c \
dns.c \
ict.c \
ist.c \
listeningpoint.c \
md5.c \
message.c \
nict.c \
nist.c \
port.c \
provider.c \
refresher.c \
siplistener.c \
sipstack.c \
transaction.c \
bodyhandler.c \
transports/stream_channel.c \
transports/stream_listeningpoint.c \
transports/tls_channel.c \
transports/tls_listeningpoint.c \
transports/udp_channel.c \
transports/udp_listeningpoint.c \
wakelock.c
ifeq ($(BUILD_TUNNEL), 1)
LOCAL_CFLAGS += -DHAVE_TUNNEL
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../tunnel/include
LOCAL_SRC_FILES += \
transports/tunnel_listeningpoint.c \
transports/tunnel_channel.c \
transports/tunnel_wrapper.cc
endif
ifeq ($(BUILD_RTP_MAP),1)
LOCAL_CFLAGS += -DBELLE_SDP_FORCE_RTP_MAP
endif
ifeq ($(BUILD_DONT_CHECK_HEADERS_IN_MESSAGE),1)
LOCAL_CFLAGS += -DBELLE_SIP_DONT_CHECK_HEADERS_IN_MESSAGE
endif
LOCAL_STATIC_LIBRARIES := \
antlr3
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../bctoolbox/include
LOCAL_STATIC_LIBRARIES += bctoolbox
include $(BUILD_STATIC_LIBRARY)
belle-sip-1.6.3/build/android/config.h 0000664 0000000 0000000 00000005133 13134375224 0017540 0 ustar 00root root 0000000 0000000 /* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the header file. */
#define HAVE_ANTLR3_H 1
/* Define to 1 if you have the header file. */
/* #undef HAVE_BCUNIT_BCUNIT_H */
/* defined when CU_curses_run_tests is available */
/* #undef HAVE_CU_CURSES */
/* defined when CU_get_suite is available */
/* #undef HAVE_CU_GET_SUITE */
/* Define to 1 if you have the header file. */
#define HAVE_DLFCN_H 1
/* Defined when gnutls api is available */
/* #undef HAVE_GNUTLS */
/* Define to 1 if you have the header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the `dl' library (-ldl). */
#define HAVE_LIBDL 1
/* Define to 1 if you have the `rt' library (-lrt). */
/* #undef HAVE_CLOCK_GETTIME */
#define HAVE_ZLIB 1
/* Define to 1 if you have the header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the header file. */
#define HAVE_UNISTD_H 1
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
/* #undef NO_MINUS_C_MINUS_O */
/* Name of package */
#define PACKAGE "belle-sip"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "jehan.monnier@linphone.org"
/* Define to the full name of this package. */
#define PACKAGE_NAME "belle-sip"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "belle-sip 0.0.1"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "belle-sip"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
//#define PACKAGE_VERSION "0.0.1"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
#define VERSION "0.0.1"
/* Defined when antlr 3.4 api is detected */
#define HAVE_ANTLR_STRING_STREAM_NEW 1
#define ENABLE_SERVER_SOCKETS 1
belle-sip-1.6.3/build/rpm/ 0000775 0000000 0000000 00000000000 13134375224 0015276 5 ustar 00root root 0000000 0000000 belle-sip-1.6.3/build/rpm/belle-sip.spec.cmake 0000775 0000000 0000000 00000005176 13134375224 0021121 0 ustar 00root root 0000000 0000000 # -*- rpm-spec -*-
## rpmbuild options
# These 2 lines are here because we can build the RPM for flexisip, in which
# case we prefix the entire installation so that we don't break compatibility
# with the user's libs.
# To compile with bc prefix, use rpmbuild -ba --with bc [SPEC]
%define pkg_name %{?_with_bc:bc-belle-sip}%{!?_with_bc:belle-sip}
%{?_with_bc: %define _prefix /opt/belledonne-communications}
%define srtp %{?_without_srtp:0}%{?!_without_srtp:1}
# re-define some directories for older RPMBuild versions which don't. This messes up the doc/ dir
# taken from https://fedoraproject.org/wiki/Packaging:RPMMacros?rd=Packaging/RPMMacros
%define _datarootdir %{_prefix}/share
%define _datadir %{_datarootdir}
%define _docdir %{_datadir}/doc
%define build_number @PROJECT_VERSION_BUILD@
Name: %{pkg_name}
Version: @PROJECT_VERSION@
Release: %build_number%{?dist}
Summary: Linphone's sip stack
Group: Applications/Communications
License: GPL
URL: http://www.belle-sip.org
Source0: %{name}-%{version}-%{build_number}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
%description
Belle-sip is an object oriented SIP stack, written in C, used by Linphone.
BuildRequires: antlr3-tool antlr3-C-devel
%package devel
Summary: Development libraries for belle-sip
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
Libraries and headers required to develop software with belle-sip
%if 0%{?rhel} && 0%{?rhel} <= 7
%global cmake_name cmake3
%define ctest_name ctest3
%else
%global cmake_name cmake
%define ctest_name ctest
%endif
%prep
%setup -n %{name}-%{version}-%build_number
%build
%{expand:%%%cmake_name} . -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} -DCMAKE_PREFIX_PATH:PATH=%{_prefix}
make %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
%check
#%{ctest_name} -V %{?_smp_mflags}
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README.md
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root)
%{_includedir}/belle-sip
%{_libdir}/libbellesip.a
%{_libdir}/libbellesip.so
%{_libdir}/pkgconfig/belle-sip.pc
%{_datadir}/BelleSIP/cmake/BelleSIPConfig.cmake
%{_datadir}/BelleSIP/cmake/BelleSIPConfigVersion.cmake
%{_datadir}/BelleSIP/cmake/BelleSIPTargets-noconfig.cmake
%{_datadir}/BelleSIP/cmake/BelleSIPTargets.cmake
%{_bindir}/*
%changelog
* Mon Aug 19 2013 jehan.monnier
- Initial RPM release.
belle-sip-1.6.3/build/wp8/ 0000775 0000000 0000000 00000000000 13134375224 0015216 5 ustar 00root root 0000000 0000000 belle-sip-1.6.3/build/wp8/belle-sip-tester-wp8/ 0000775 0000000 0000000 00000000000 13134375224 0021112 5 ustar 00root root 0000000 0000000 belle-sip-1.6.3/build/wp8/belle-sip-tester-wp8/belle-sip-tester-native/ 0000775 0000000 0000000 00000000000 13134375224 0025556 5 ustar 00root root 0000000 0000000 belle-sip-1.6.3/build/wp8/belle-sip-tester-wp8/belle-sip-tester-native/belle-sip-tester-native.cpp 0000664 0000000 0000000 00000005647 13134375224 0032742 0 ustar 00root root 0000000 0000000 #include
#include "belle-sip-tester-native.h"
#include "belle-sip/belle-sip.h"
#include "bcunit/Util.h"
using namespace belle_sip_tester_native;
using namespace Platform;
#define MAX_TRACE_SIZE 512
#define MAX_SUITE_NAME_SIZE 128
static OutputTraceListener^ sTraceListener;
static void nativeOutputTraceHandler(int lev, const char *fmt, va_list args)
{
if (sTraceListener) {
wchar_t wstr[MAX_TRACE_SIZE];
std::string str;
str.resize(MAX_TRACE_SIZE);
vsnprintf((char *)str.c_str(), MAX_TRACE_SIZE, fmt, args);
mbstowcs(wstr, str.c_str(), sizeof(wstr));
String^ msg = ref new String(wstr);
sTraceListener->outputTrace(msg);
}
}
static void belleSipNativeOutputTraceHandler(belle_sip_log_level lev, const char *fmt, va_list args)
{
nativeOutputTraceHandler((int)lev, fmt, args);
}
BelleSipTesterNative::BelleSipTesterNative()
{
belle_sip_tester_init();
}
BelleSipTesterNative::~BelleSipTesterNative()
{
belle_sip_tester_uninit();
}
void BelleSipTesterNative::setOutputTraceListener(OutputTraceListener^ traceListener)
{
sTraceListener = traceListener;
}
void BelleSipTesterNative::run(Platform::String^ suiteName, Platform::String^ caseName, Platform::Boolean verbose)
{
std::wstring all(L"ALL");
std::wstring wssuitename = suiteName->Data();
std::wstring wscasename = caseName->Data();
char csuitename[MAX_SUITE_NAME_SIZE] = { 0 };
char ccasename[MAX_SUITE_NAME_SIZE] = { 0 };
wcstombs(csuitename, wssuitename.c_str(), sizeof(csuitename));
wcstombs(ccasename, wscasename.c_str(), sizeof(ccasename));
if (verbose) {
belle_sip_set_log_level(BELLE_SIP_LOG_DEBUG);
} else {
belle_sip_set_log_level(BELLE_SIP_LOG_ERROR);
}
belle_sip_set_log_handler(belleSipNativeOutputTraceHandler);
CU_set_trace_handler(nativeOutputTraceHandler);
belle_sip_tester_set_root_ca_path("Assets/rootca.pem");
belle_sip_tester_run_tests(wssuitename == all ? 0 : csuitename, wscasename == all ? 0 : ccasename);
}
unsigned int BelleSipTesterNative::nbTestSuites()
{
return belle_sip_tester_nb_test_suites();
}
unsigned int BelleSipTesterNative::nbTests(Platform::String^ suiteName)
{
std::wstring suitename = suiteName->Data();
char cname[MAX_SUITE_NAME_SIZE] = { 0 };
wcstombs(cname, suitename.c_str(), sizeof(cname));
return belle_sip_tester_nb_tests(cname);
}
Platform::String^ BelleSipTesterNative::testSuiteName(int index)
{
const char *cname = belle_sip_tester_test_suite_name(index);
wchar_t wcname[MAX_SUITE_NAME_SIZE];
mbstowcs(wcname, cname, sizeof(wcname));
return ref new String(wcname);
}
Platform::String^ BelleSipTesterNative::testName(Platform::String^ suiteName, int testIndex)
{
std::wstring suitename = suiteName->Data();
char csuitename[MAX_SUITE_NAME_SIZE] = { 0 };
wcstombs(csuitename, suitename.c_str(), sizeof(csuitename));
const char *cname = belle_sip_tester_test_name(csuitename, testIndex);
wchar_t wcname[MAX_SUITE_NAME_SIZE];
mbstowcs(wcname, cname, sizeof(wcname));
return ref new String(wcname);
}
belle-sip-1.6.3/build/wp8/belle-sip-tester-wp8/belle-sip-tester-native/belle-sip-tester-native.h 0000664 0000000 0000000 00000001332 13134375224 0032372 0 ustar 00root root 0000000 0000000 #pragma once
#include "belle-sip/belle-sip.h"
#include "belle_sip_tester.h"
namespace belle_sip_tester_native
{
public interface class OutputTraceListener
{
public:
void outputTrace(Platform::String^ msg);
};
public ref class BelleSipTesterNative sealed
{
public:
BelleSipTesterNative();
virtual ~BelleSipTesterNative();
void setOutputTraceListener(OutputTraceListener^ traceListener);
unsigned int nbTestSuites();
unsigned int nbTests(Platform::String^ suiteName);
Platform::String^ testSuiteName(int index);
Platform::String^ testName(Platform::String^ suiteName, int testIndex);
void run(Platform::String^ suiteName, Platform::String^ caseName, Platform::Boolean verbose);
};
} belle-sip-tester-native.vcxproj 0000664 0000000 0000000 00000015352 13134375224 0033566 0 ustar 00root root 0000000 0000000 belle-sip-1.6.3/build/wp8/belle-sip-tester-wp8/belle-sip-tester-native
DebugWin32DebugARMReleaseWin32ReleaseARM{3b4e9c2c-d5dc-4cf9-a7f4-5cb4ab55af79}belle_sip_tester_nativeen-US11.0trueDynamicLibrarytruev110_wp80DynamicLibraryfalsetruev110_wp80$(SolutionDir)$(Platform)\$(Configuration)\$(SolutionDir)$(Platform)\$(Configuration)\falseLevel4$(ProjectDir);$(GeneratedFilesDir);$(IntDir);$(ProjectDir)..\..\..\..\include;$(ProjectDir)..\..\..\..\src;$(ProjectDir)..\..\..\..\tester;$(ProjectDir)..\..\..\..\..\bcunit\build\wp8\bcunit\$(Platform)\$(Configuration);%(AdditionalIncludeDirectories)WIN32;_WINDOWS;_WINRT_DLL;_CRT_SECURE_NO_WARNINGS;HAVE_CU_GET_SUITE;PACKAGE_VERSION=$(BELLESIP_PACKAGE_VERSION);%(PreprocessorDefinitions)DefaultNotUsing$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)falseConsolefalseole32.lib;%(IgnoreSpecificDefaultLibraries)trueWindowsPhoneCore.lib;RuntimeObject.lib;PhoneAppModelHost.lib;ws2_32.lib;%(AdditionalDependencies)$(SolutionDir)$(Platform)\$(Configuration)_DEBUG;%(PreprocessorDefinitions)NDEBUG;%(PreprocessorDefinitions)MaxSpeedtruetruetruetruefalsetrue{902daf1d-ebf1-4d03-b598-143500a50ab4}{4c225a82-800b-427b-ba7b-61686a9b347f}