summaryrefslogtreecommitdiffstats
path: root/tinySAK
diff options
context:
space:
mode:
Diffstat (limited to 'tinySAK')
-rw-r--r--tinySAK/Doxyfile1556
-rw-r--r--tinySAK/Makefile.am3
-rw-r--r--tinySAK/autogen.sh17
-rw-r--r--tinySAK/configure.ac79
-rw-r--r--tinySAK/droid-makefile60
-rw-r--r--tinySAK/footer.html7
-rw-r--r--tinySAK/header.html38
-rw-r--r--tinySAK/src/Makefile.am38
-rw-r--r--tinySAK/src/tinysak_config.h105
-rw-r--r--tinySAK/src/tsk.c285
-rw-r--r--tinySAK/src/tsk.h70
-rw-r--r--tinySAK/src/tsk_base64.c236
-rw-r--r--tinySAK/src/tsk_base64.h53
-rw-r--r--tinySAK/src/tsk_binaryutils.c33
-rw-r--r--tinySAK/src/tsk_binaryutils.h157
-rw-r--r--tinySAK/src/tsk_buffer.c363
-rw-r--r--tinySAK/src/tsk_buffer.h102
-rw-r--r--tinySAK/src/tsk_common.h70
-rw-r--r--tinySAK/src/tsk_condwait.c303
-rw-r--r--tinySAK/src/tsk_condwait.h53
-rw-r--r--tinySAK/src/tsk_debug.c76
-rw-r--r--tinySAK/src/tsk_debug.h125
-rw-r--r--tinySAK/src/tsk_errno.h93
-rw-r--r--tinySAK/src/tsk_fsm.c311
-rw-r--r--tinySAK/src/tsk_fsm.h178
-rw-r--r--tinySAK/src/tsk_hmac.c226
-rw-r--r--tinySAK/src/tsk_hmac.h49
-rw-r--r--tinySAK/src/tsk_list.c604
-rw-r--r--tinySAK/src/tsk_list.h135
-rw-r--r--tinySAK/src/tsk_md5.c276
-rw-r--r--tinySAK/src/tsk_md5.h94
-rw-r--r--tinySAK/src/tsk_memory.c124
-rw-r--r--tinySAK/src/tsk_memory.h59
-rw-r--r--tinySAK/src/tsk_mutex.c167
-rw-r--r--tinySAK/src/tsk_mutex.h50
-rw-r--r--tinySAK/src/tsk_object.c224
-rw-r--r--tinySAK/src/tsk_object.h173
-rw-r--r--tinySAK/src/tsk_options.c242
-rw-r--r--tinySAK/src/tsk_options.h77
-rw-r--r--tinySAK/src/tsk_params.c378
-rw-r--r--tinySAK/src/tsk_params.h83
-rw-r--r--tinySAK/src/tsk_ppfcs16.c82
-rw-r--r--tinySAK/src/tsk_ppfcs16.h45
-rw-r--r--tinySAK/src/tsk_ppfcs32.c115
-rw-r--r--tinySAK/src/tsk_ppfcs32.h45
-rw-r--r--tinySAK/src/tsk_ragel_state.c51
-rw-r--r--tinySAK/src/tsk_ragel_state.h184
-rw-r--r--tinySAK/src/tsk_runnable.c236
-rw-r--r--tinySAK/src/tsk_runnable.h167
-rw-r--r--tinySAK/src/tsk_safeobj.c33
-rw-r--r--tinySAK/src/tsk_safeobj.h81
-rw-r--r--tinySAK/src/tsk_semaphore.c198
-rw-r--r--tinySAK/src/tsk_semaphore.h47
-rw-r--r--tinySAK/src/tsk_sha1.c455
-rw-r--r--tinySAK/src/tsk_sha1.h122
-rw-r--r--tinySAK/src/tsk_string.c619
-rw-r--r--tinySAK/src/tsk_string.h127
-rw-r--r--tinySAK/src/tsk_thread.c109
-rw-r--r--tinySAK/src/tsk_thread.h45
-rw-r--r--tinySAK/src/tsk_time.c154
-rw-r--r--tinySAK/src/tsk_time.h73
-rw-r--r--tinySAK/src/tsk_timer.c531
-rw-r--r--tinySAK/src/tsk_timer.h94
-rw-r--r--tinySAK/src/tsk_url.c92
-rw-r--r--tinySAK/src/tsk_url.h43
-rw-r--r--tinySAK/src/tsk_uuid.c92
-rw-r--r--tinySAK/src/tsk_uuid.h48
-rw-r--r--tinySAK/src/tsk_xml.c296
-rw-r--r--tinySAK/src/tsk_xml.h175
-rw-r--r--tinySAK/test/Makefile.am7
-rw-r--r--tinySAK/test/droid-makefile28
-rw-r--r--tinySAK/test/stdafx.c26
-rw-r--r--tinySAK/test/stdafx.h37
-rw-r--r--tinySAK/test/targetver.h18
-rw-r--r--tinySAK/test/test.c278
-rw-r--r--tinySAK/test/test.vcproj450
-rw-r--r--tinySAK/test/test_base64.h113
-rw-r--r--tinySAK/test/test_buffer.h44
-rw-r--r--tinySAK/test/test_condwait.h86
-rw-r--r--tinySAK/test/test_fsm.h310
-rw-r--r--tinySAK/test/test_heap.h77
-rw-r--r--tinySAK/test/test_lists.h258
-rw-r--r--tinySAK/test/test_md5.h100
-rw-r--r--tinySAK/test/test_mutex.h80
-rw-r--r--tinySAK/test/test_object.h111
-rw-r--r--tinySAK/test/test_options.h61
-rw-r--r--tinySAK/test/test_params.h68
-rw-r--r--tinySAK/test/test_runnable.h126
-rw-r--r--tinySAK/test/test_safeobject.h90
-rw-r--r--tinySAK/test/test_semaphore.h73
-rw-r--r--tinySAK/test/test_sha1.h96
-rw-r--r--tinySAK/test/test_strings.h75
-rw-r--r--tinySAK/test/test_threads.h48
-rw-r--r--tinySAK/test/test_timer.h104
-rw-r--r--tinySAK/test/test_url.h43
-rw-r--r--tinySAK/test/test_uuid.h35
-rw-r--r--tinySAK/tinySAK.sln40
-rw-r--r--tinySAK/tinySAK.tag7144
-rw-r--r--tinySAK/tinySAK.vcproj888
99 files changed, 22645 insertions, 0 deletions
diff --git a/tinySAK/Doxyfile b/tinySAK/Doxyfile
new file mode 100644
index 0000000..b3c06f7
--- /dev/null
+++ b/tinySAK/Doxyfile
@@ -0,0 +1,1556 @@
+# Doxyfile 1.6.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME = tinySAK
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER = 1.0
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = docs
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF = "The $name class" \
+ "The $name widget" \
+ "The $name file" \
+ is \
+ provides \
+ specifies \
+ contains \
+ represents \
+ a \
+ an \
+ the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH = /Users/dimitri/doxygen/mail/1.5.7/doxywizard/
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it parses.
+# With this tag you can assign which parser to use for a given extension.
+# Doxygen has a built-in mapping, but you can override or extend it using this tag.
+# The format is ext=language, where ext is a file extension, and language is one of
+# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP,
+# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat
+# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran),
+# use: inc=Fortran f=C. Note that for custom extensions you also need to set
+# FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING =
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter
+# and setter methods for a property. Setting this option to YES (the default)
+# will make doxygen to replace the get and set methods by a property in the
+# documentation. This will only work if the methods are indeed getting or
+# setting a simple type. If this is not the case, or you want to show the
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penality.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will rougly double the
+# memory usage. The cache size is given by this formula:
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
+# anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = YES
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
+# will sort the (brief and detailed) documentation of class members so that
+# constructors and destructors are listed first. If set to NO (the default)
+# the constructors will appear in the respective orders defined by
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = YES
+
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page. This will remove the Namespaces entry from the Quick Index
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by
+# doxygen. The layout file controls the global structure of the generated output files
+# in an output format independent way. The create the layout file that represents
+# doxygen's defaults, run doxygen with the -l option. You can optionally specify a
+# file name after the option, if omitted DoxygenLayout.xml will be used as the name
+# of the layout file.
+
+LAYOUT_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = src
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+# the list of possible encodings.
+
+INPUT_ENCODING = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS = *.c \
+ *.cc \
+ *.cxx \
+ *.cpp \
+ *.c++ \
+ *.java \
+ *.ii \
+ *.ixx \
+ *.ipp \
+ *.i++ \
+ *.inl \
+ *.h \
+ *.hh \
+ *.hxx \
+ *.hpp \
+ *.h++ \
+ *.idl \
+ *.odl \
+ *.cs \
+ *.php \
+ *.php3 \
+ *.inc \
+ *.m \
+ *.mm \
+ *.dox \
+ *.py \
+ *.f90 \
+ *.f \
+ *.vhd \
+ *.vhdl
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
+# from the input.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS = *
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output. If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# is applied to all files.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code. Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER = header.html
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER = footer.html
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET =
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
+
+GENERATE_DOCSET = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
+# can be grouped.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+# content.
+
+CHM_INDEX_ENCODING =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER
+# are set, an additional index file will be generated that can be used as input for
+# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated
+# HTML documentation.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add.
+# For more information please see
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's
+# filter section matches.
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS =
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
+# .qhp file.
+
+QHG_LOCATION =
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE = 4
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW = NO
+
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE = 10
+
+# When the SEARCHENGINE tag is enable doxygen will generate a search box
+# for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using
+# HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP)
+# there is already a search function so this one should typically
+# be disabled.
+
+SEARCHENGINE = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include
+# source code with syntax highlighting in the LaTeX output.
+# Note that which sources are shown also depends on other settings
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader. This is useful
+# if you want to understand what is going on. On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE = tinySAK.tag
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option is superseded by the HAVE_DOT option below. This is only a
+# fallback. It is recommended to install and use dot, since it yields more
+# powerful graphs.
+
+CLASS_DIAGRAMS = NO
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH =
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = NO
+
+# By default doxygen will write a font called FreeSans.ttf to the output
+# directory and reference it in all dot files that doxygen generates. This
+# font does not include all possible unicode characters however, so when you need
+# these (or just want a differently looking font) you can specify the font name
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
+# which can be done by putting it in a standard location or by setting the
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
+# containing the font.
+
+DOT_FONTNAME = FreeSans
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
+# The default size is 10pt.
+
+DOT_FONTSIZE = 10
+
+# By default doxygen will tell dot to use the output directory to look for the
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a
+# different font using DOT_FONTNAME you can set the path where dot
+# can find it using this tag.
+
+DOT_FONTPATH =
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH = YES
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP = YES
diff --git a/tinySAK/Makefile.am b/tinySAK/Makefile.am
new file mode 100644
index 0000000..4e61f0f
--- /dev/null
+++ b/tinySAK/Makefile.am
@@ -0,0 +1,3 @@
+SUBDIRS = \
+ src \
+ test \ No newline at end of file
diff --git a/tinySAK/autogen.sh b/tinySAK/autogen.sh
new file mode 100644
index 0000000..9c875b0
--- /dev/null
+++ b/tinySAK/autogen.sh
@@ -0,0 +1,17 @@
+echo libtoolize
+libtoolize --copy --force
+
+echo "aclocal"
+aclocal
+
+echo "autoheader"
+autoheader
+
+echo "create NEWS, README, AUTHORS and ChangeLog"
+touch NEWS README AUTHORS ChangeLog
+
+echo "automake"
+automake -a
+
+echo "autoconf"
+autoconf \ No newline at end of file
diff --git a/tinySAK/configure.ac b/tinySAK/configure.ac
new file mode 100644
index 0000000..02fe6d0
--- /dev/null
+++ b/tinySAK/configure.ac
@@ -0,0 +1,79 @@
+AC_PREREQ([2.52])
+AC_INIT(libtinySAK, 0.1, diopmamadou@doubango.org)
+AM_INIT_AUTOMAKE
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_SRCDIR([src/tsk.c])
+
+dnl find suitable C++ compiler
+AC_PROG_CC
+AC_PROG_INSTALL
+
+
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
+
+## Are we using Windows?
+#dnl detecting WIN32
+#case "$host" in
+# *cygwin* | *mingw*)
+# AC_DEFINE([WIN32], [], "Using Windows as target os.")
+# ;;
+# *)
+# AC_MSG_RESULT(${host} is not Windows... I will do my best.)
+# ;;
+#esac
+
+# CFLAGS
+CFLAGS="${CFLAGS=}"
+
+#echo Setting up build environment for ${target_cpu}${target_os}
+
+### ENABLE-DEBUG
+AC_MSG_CHECKING(whether to enable debugging)
+debug_default="yes"
+AC_ARG_ENABLE(debug,
+[ --enable-debug[=no/yes] turn on/off debugging
+ [[default=$debug_default]]],
+[ if test "x$enableval" = "xyes" ; then
+ CFLAGS="$CFLAGS -O0 -g3 -DDEBUG"
+ AC_MSG_RESULT(yes)
+ else
+ CFLAGS="$CFLAGS -O3 -NDEBUG"
+ AC_MSG_RESULT(no)
+ fi
+],
+[CFLAGS="$CFLAGS -O0 -g3 -DDEBUG"
+ AC_MSG_RESULT(yes)])
+
+### DEBUG-LEVEL
+AC_ARG_WITH(debug-level,
+[ --with-debug-level[=level] Set debug-level to level [[default=info]]
+ info: informational
+ warn: warnings
+ error [default]: errors
+ fatal: fatal],
+[ if test "x$withval" = "xinfo" ; then
+ AC_DEFINE(DEBUG_LEVEL, DEBUG_LEVEL_INFO, [info debug])
+ AC_MSG_RESULT(info)
+ elif test "x$withval" = "xwarn" ; then
+ AC_DEFINE(DEBUG_LEVEL, DEBUG_LEVEL_INFO, [warn debug])
+ AC_MSG_RESULT(warn)
+ elif test "x$withval" = "xerror" ; then
+ AC_DEFINE(DEBUG_LEVEL, DEBUG_LEVEL_ERROR, [error debug])
+ AC_MSG_RESULT(error)
+ elif test "x$withval" = "xfatal" ; then
+ AC_DEFINE(DEBUG_LEVEL, DEBUG_LEVEL_FATAL, [fatal debug])
+ AC_MSG_RESULT(fatal)
+ fi
+])
+
+
+## checks string functions
+AC_CHECK_FUNCS([stricmp strnicmp])
+
+
+AC_OUTPUT(
+Makefile
+src/Makefile
+test/Makefile
+) \ No newline at end of file
diff --git a/tinySAK/droid-makefile b/tinySAK/droid-makefile
new file mode 100644
index 0000000..6ca5470
--- /dev/null
+++ b/tinySAK/droid-makefile
@@ -0,0 +1,60 @@
+APP := lib$(PROJECT)_$(MARCH).$(EXT)
+
+CFLAGS := $(CFLAGS_LIB)
+LDFLAGS := $(LDFLAGS_LIB)
+
+all: $(APP)
+
+OBJS = src/tsk.o\
+ src/tsk_base64.o\
+ src/tsk_binaryutils.o\
+ src/tsk_buffer.o\
+ src/tsk_condwait.o\
+ src/tsk_debug.o\
+ src/tsk_fsm.o\
+ src/tsk_hmac.o\
+ src/tsk_list.o\
+ src/tsk_md5.o\
+ src/tsk_memory.o\
+ src/tsk_mutex.o\
+ src/tsk_object.o\
+ src/tsk_options.o\
+ src/tsk_params.o\
+ src/tsk_ppfcs16.o\
+ src/tsk_ppfcs32.o\
+ src/tsk_ragel_state.o\
+ src/tsk_runnable.o\
+ src/tsk_safeobj.o\
+ src/tsk_semaphore.o\
+ src/tsk_sha1.o\
+ src/tsk_string.o\
+ src/tsk_thread.o\
+ src/tsk_time.o\
+ src/tsk_timer.o\
+ src/tsk_url.o\
+ src/tsk_uuid.o\
+ src/tsk_xml.o
+
+$(APP): $(OBJS)
+ifeq ($(EXT), a)
+ $(AR) rcs $@ $^
+else
+ $(CC) $(LDFLAGS) -o $@ $^
+endif
+
+%.o: %.c
+ $(CC) -c $(INCLUDE) $(CFLAGS) $< -o $@
+
+install: $(APP)
+ $(ANDROID_SDK_ROOT)/tools/adb remount
+ $(ANDROID_SDK_ROOT)/tools/adb push $(APP) $(LIB_DIR)/$(APP)
+ $(ANDROID_SDK_ROOT)/tools/adb shell chmod 777 $(LIB_DIR)/$(APP)
+
+shell:
+ $(ANDROID_SDK_ROOT)/tools/adb shell
+
+run:
+ $(ANDROID_SDK_ROOT)/tools/adb shell $(LIB_DIR)/$(APP)
+
+clean:
+ @rm -f $(OBJS) $(APP) \ No newline at end of file
diff --git a/tinySAK/footer.html b/tinySAK/footer.html
new file mode 100644
index 0000000..fe8c6af
--- /dev/null
+++ b/tinySAK/footer.html
@@ -0,0 +1,7 @@
+<html>
+<head></head>
+<body>
+<hr>
+<b>doubango project - TinySAK 1.0</b> - Copyright (C) 2009-2010 Mamadou DIOP. All rights reserved. Licensed under the terms of the GNU General Public License v3.
+</body>
+</html> \ No newline at end of file
diff --git a/tinySAK/header.html b/tinySAK/header.html
new file mode 100644
index 0000000..347a9da
--- /dev/null
+++ b/tinySAK/header.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>doubango - tinySAK</title>
+ <link rel="stylesheet" href="http://www.doubango.org/css.css" type="text/css" />
+ <link href="tabs.css" rel="stylesheet" type="text/css"/>
+ <link href="doxygen.css" rel="stylesheet" type="text/css"/>
+ <meta name="Keywords" content="doubango, 3GPP IMS/LTE framework, open source, SIP, RFC 3261, 3GPP TS 24.229, VoIP, MMTel, IPTV, 4G, LTE, XCAP, MSRP, IPSec, SigComp, One Voice " />
+ <meta name="Description" content="cross-platform and open source 3GPP NGN/IMS framework for embedded devices such as Android, Symbian, iPhone, Windows Mobile or uLinux." />
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+
+<style type="text/css">
+/*<![CDATA[*/
+ p.c1 {text-align: center;}
+/*]]>*/
+</style>
+</head>
+
+<body>
+ <div id="left">
+ <div id="border">
+ <div id="logo">
+ <p class="companyname">
+ tinySAK</p>
+ </div>
+ <div id="menu">
+ <a href="/index.html" title="Homepage">Home</a> <a href="/gettingstarted.html" title="Getting Started">
+ Getting Started</a> <a href="http://code.google.com/p/doubango/source/checkout" title="Source Code"
+ target="_blank">Source Code</a> <a href="/apiref.html" title="API Reference">API Reference</a> <a href="contact.html" title="Contact">
+ Contact</a>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
+
diff --git a/tinySAK/src/Makefile.am b/tinySAK/src/Makefile.am
new file mode 100644
index 0000000..d7ea30b
--- /dev/null
+++ b/tinySAK/src/Makefile.am
@@ -0,0 +1,38 @@
+lib_LTLIBRARIES = libtinySAK.la
+
+libtinySAK_la_SOURCES = tsk.c\
+ tsk_base64.c\
+ tsk_binaryutils.c\
+ tsk_buffer.c\
+ tsk_condwait.c\
+ tsk_debug.c\
+ tsk_fsm.c\
+ tsk_hmac.c\
+ tsk_list.c\
+ tsk_md5.c\
+ tsk_memory.c\
+ tsk_mutex.c\
+ tsk_object.c\
+ tsk_options.c\
+ tsk_params.c\
+ tsk_ppfcs16.c\
+ tsk_ppfcs32.c\
+ tsk_ragel_state.c\
+ tsk_runnable.c\
+ tsk_safeobj.c\
+ tsk_semaphore.c\
+ tsk_sha1.c\
+ tsk_string.c\
+ tsk_thread.c\
+ tsk_time.c\
+ tsk_timer.c\
+ tsk_url.c\
+ tsk_uuid.c\
+ tsk_xml.c
+
+# LDFLAGS
+libtinySAK_la_LDFLAGS = $LDFLAGS -no-undefined
+
+# Headers file to install
+libtinySAK_la_HEADERS = *.h
+libtinySAK_ladir = $(includedir)/tinySAK
diff --git a/tinySAK/src/tinysak_config.h b/tinySAK/src/tinysak_config.h
new file mode 100644
index 0000000..85352e8
--- /dev/null
+++ b/tinySAK/src/tinysak_config.h
@@ -0,0 +1,105 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tinysak_config.h
+ * @brief Global configuration file.
+ *
+ * This file incude all your preferences or configuration. All specific configuration
+ * must be defined in this file. You must include this file in all your header files.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+
+#ifndef _TINYSAK_H_
+#define _TINYSAK_H_
+
+#ifdef __SYMBIAN32__
+#undef _WIN32 /* Because of WINSCW */
+#endif
+
+/* Windows (XP/Vista/7/CE and Windows Mobile) macro definition.
+*/
+#if defined(WIN32)|| defined(_WIN32) || defined(_WIN32_WCE)
+# define TSK_UNDER_WINDOWS 1
+#endif
+
+/* Used on Windows and Symbian systems to export/import public functions and global variables.
+*/
+#if !defined(__GNUC__) && defined(TINYSAK_EXPORTS)
+# define TINYSAK_API __declspec(dllexport)
+# define TINYSAK_GEXTERN __declspec(dllexport)
+#elif !defined(__GNUC__) /*&& defined(TINYSAK_IMPORTS)*/
+# define TINYSAK_API __declspec(dllimport)
+# define TINYSAK_GEXTERN __declspec(dllimport)
+#else
+# define TINYSAK_API
+# define TINYSAK_GEXTERN extern
+#endif
+
+/* Guards against C++ name mangling */
+#ifdef __cplusplus
+# define TSK_BEGIN_DECLS extern "C" {
+# define TSK_END_DECLS }
+#else
+# define TSK_BEGIN_DECLS
+# define TSK_END_DECLS
+#endif
+
+#if defined(_MSC_VER)
+# define TSK_INLINE __forceinline
+#elif defined(__GNUC__) && !defined(__APPLE__)
+# define TSK_INLINE __inline
+#else
+# define TSK_INLINE
+#endif
+
+
+/* Disable some well-known warnings for M$ Visual Studio*/
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_WARNINGS
+# pragma warning( disable : 4996 )
+#endif
+
+/* Features */
+#if TSK_UNDER_WINDOWS
+# define HAVE_GETTIMEOFDAY 0
+#else
+# define HAVE_GETTIMEOFDAY 1
+#endif
+
+#if defined(ANDROID)
+# define HAVE_CLOCK_GETTIME 1
+#endif
+
+#include <stdint.h>
+#include <stddef.h>
+#include "tsk_common.h"
+
+
+#if HAVE_CONFIG_H
+# include "../config.h"
+#endif
+
+#endif /* _TINYSAK_H_ */
+
diff --git a/tinySAK/src/tsk.c b/tinySAK/src/tsk.c
new file mode 100644
index 0000000..93fc8e6
--- /dev/null
+++ b/tinySAK/src/tsk.c
@@ -0,0 +1,285 @@
+/**
+* @file tsk.c
+* @author Mamadou Diop <diopmamadou(at)doubango.org>
+* @version 1.0
+*
+* @section LICENSE
+*
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+#include "tsk.h"
+
+/** @mainpage tinySAK API Overview
+*
+* This file is an overview of <b>tinySAK</b> API.
+*
+* <b>tinySAK</b> (a.k.a <b>T</b>iny <b>S</b>wiss <b>A</b>rmy <b>K</b>nife) is a tiny but fully featured utility API.
+* This API is designed to efficiently work on embedded systems with limited memory and low computing power.<br>
+* This library provide a base object class to ease Object Oriented Programming in C. There are many other
+* features like multi-threading, time management, encoding, encryption or content management.
+* <h1>6 ANSI-C Object Programming</h1>
+* As you probably know, C is not an object oriented language.<br>
+* Today, OOP (Object-Oriented Programing) is the best way to program well designed softwares.<br>
+* In this chapter a “well-defined object” is a special C structure. All functions shown in this chapter are part of tinySAK project.<br>
+* To explain how well-defined objects are implemented and used, I will give an example based on “Person” object.<br>
+* The person object is declared like this:<br>
+* @code
+* typedef struct person_s
+{
+ TSK_DECLARE_OBJECT; // Mandatory
+
+ char* name;
+ struct person_s* girlfriend;
+}
+person_t;
+* @endcode
+<h2>6.1 Object Definition</h2>
+* An object definition could be considered as a class definition. The definition holds the object’s mandatory functions, size and a reference counter.<br>
+* The mandatory functions are the constructor, the destructor and the comparator.<br>
+* A C structure is defined as an object by using @ref TSK_DECLARE_OBJECT macro in its body.<br>
+* A pointer to an object definition shall point to a struct @ref tsk_object_def_s.<br>
+* @code
+typedef struct tsk_object_def_s
+{
+ //! The size of the object.
+ tsk_size_t size;
+ //! Pointer to the constructor.
+ tsk_object_t* (* constructor) (tsk_object_t *, va_list *);
+ //! Pointer to the destructor.
+ tsk_object_t* (* destructor) (tsk_object_t *);
+ //! Pointer to the comparator.
+ int (*comparator) (const tsk_object_t *, const tsk_object_t *);
+}
+tsk_object_def_t;
+* @endcode
+*
+* <p>
+* An object is created in two phases. The first phase consists of dynamically allocating the object on the heap; this is why its size is mandatory in the object definition structure. When a new object is allocated on the heap, all its members (char*, void*, int, long …) will be zeroed. In the second phase, the newly created object will be initialized by calling the supplied constructor. To perform these two phases, you should call @ref tsk_object_new() or @ref tsk_object_new_2().
+* </p>
+* <p>
+* An object is destroyed in two phases. The first phase consists of freeing its members (void*, char* …). It’s the destructor which is responsible of this task. In the second phase, the object itself is destroyed. As the object cannot destroy itself, you should use @ref tsk_object_unref() or @ref tsk_object_delete() to perform these two phases. The difference between these two functions is explained in the coming sections.
+* </p>
+* A well-defined object must never be freed using free() standard C function.<br>
+* Below, an example of how to declare an object definition:<br>
+* @code
+* //(Object defnition)
+ static const tsk_object_def_t person_def_t =
+ {
+ sizeof(person_t),
+ person_ctor,
+ person_dtor,
+ person_cmp
+ };
+* @endcode
+* <h2>6.2 Constructor</h2>
+* The constructor is only responsible for the initialization and won’t allocate the object. When passed to the constructor, the object is already allocated.<br>
+* Here is an example:<br>
+* @code
+// (constructor)
+static tsk_object_t* person_ctor(tsk_object_t * self, va_list * app)
+{
+ person_t *person = self;
+ if(person){
+ person->name = tsk_strdup(va_arg(*app, const char *));
+ }
+ return self;
+ }
+* @endcode
+* <h2>6.3 Destructor</h2>
+* The destructor will free the object’s members and won’t destroy the object itself (Phase 1). The destructor function must return a pointer to itself to allow the caller to perform the second phase.<br>
+* Here is an example:<br>
+* @code
+// (destructor)
+ static tsk_object_t * person_dtor(tsk_object_t * self)
+ {
+ person_t *person = self;
+ if(person){
+ TSK_FREE(person->name);
+ tsk_object_unref(person->girlfriend);
+ }
+ return self;
+ }
+* @endcode
+* <h2>6.4 Comparator</h2>
+* The comparator function is used to compare two well-defined objects. The objects to compare shall have the same definition (or type). <br>
+* Here is an example:<br>
+* @code
+// (comparator)
+static int person_cmp(const tsk_object_t *_p1, const tsk_object_t *_p2)
+ {
+ const person_t *p1 = _p1;
+ const person_t *p1 = _p2;
+ int ret;
+
+ // do they have the same name?
+ if((ret = tsk_stricmp(p1->name, p2->name))){
+ return ret;
+ }
+ // do they have the same girlfriend?
+ if((ret = tsk_object_cmp(p1->girlfriend, p2->girlfriend))){
+ return ret;
+ }
+
+ // they are the same
+ return 0;
+ }
+* @endcode
+<h2>6.5 Reference counting</h2>
+* Reference counting is used to emulate garbage collection. Each well-defined object contains a reference counter field which indicates how many object have a reference to the actual object.<br>
+* When an object is created (see below) the counter value is initialized to 1; this is automatically done and you have nothing to do. The counter is incremented by 1 when you call @ref tsk_object_ref() and decremented (by 1) when you call @ref tsk_object_unref().<br>
+* When the counter value reaches zero, then the object is garbaged (freed).<br>
+*
+* <h2>6.6 Inheritence</h2>
+* As you expect, inheritance is not supported in ANSI-C. <br>
+* As any C Structure could be casted to a pointer to its first element, inheritance could be achieved like this:<br>
+* @code
+#include "tsk.h"
+// (a student is a person)
+typedef struct student_s
+{
+ person_t* person; // Must be the first element
+ char* school;
+}
+student_t;
+
+// (as a student is a person you can do)
+student_t* s = tsk_null;
+//....
+((person_t*)s)->name = tsk_strdup("bob");
+* @endcode
+*
+* As @code person_t is a well-defined object, then @code student_t is also well-defined.<br>
+* <h2>6.7 Usage</h2>
+* Once the object’s definition is declared and all its mandatory functions implemented, it is used like this:<br>
+* @code
+// creates a person: will call the constructor
+person_t* bob = tsk_object_new(&person_def_t, "bob");
+// creates bob's girlfriend
+bob->girlfriend = tsk_object_new(&person_def_t, "alice");
+// deletes bob: will delete both bob and bob's girlfriend field by calling their destructors
+tsk_object_unref(bob);
+* @endcode
+* As it’s hard to guest which parameters the construct expects, it’s common to use macro (or function) helpers. In our example the macro will look like this:
+* @code
+// create a person
+#define PERSON_CREATE(name) tsk_object_new(&person_def_t, (const char*)name)
+* @endcode
+*
+* As the destructor has fixed parameters, there is a common macro to destroy all kind of well-defined objects. <br>
+* TSK_OBJECT_SAFE_FREE() is used to destroy any object. <br>
+* The object will be freed only if; when decremented by 1 the reference count of the object is equal to zero. In all case (freed or not) the pointer value will be set to NULL.<br>
+* The above example can be rewritten like this:<br>
+* @code
+#include "tsk.h"
+
+// create a person: will call the constructor
+person_t* bob = PERSON_CREATE("bob");
+// create bob's girlfriend
+bob->girlfriend = PERSON_CREATE("alice");
+// delete bob: will delete both bob and bob's girlfriend field by calling their destructors
+TSK_OBJECT_SAFE_FREE(bob);
+* @endcode
+*
+* <h2>6.8 Lists</h2>
+*
+* <h2>7 Threading</h2>
+* The framework provides an operating system agnostic threading functions for both WIN32 and Unix-like systems.<br>
+*
+* <h2>7.1 Threads</h2>
+* You don’t need thousands of functions to manage threads. In the Framework we only need to create, pause and destroy threads.<br>
+* Threads can be created using @ref tsk_thread_create() and joined using @ref tsk_thread_join().<br>
+* You can temporary cease the executing of a thread by calling @ref tsk_thread_sleep().<br>
+* @code
+#include "tsk.h"
+
+void* MyThreadFunction(void *arg)
+{
+ printf("arg=%d", *((int*)arg));
+ return tsk_null;
+}
+
+void test_threads()
+{
+ void* tid[1] = {tsk_null}; // thread id
+ int arg = 112; // arg to pass to the function
+
+ // creates the thread
+ tsk_thread_create(&tid[0], MyThreadFunction, &arg);
+
+ // joins the thread
+ tsk_thread_join(&(tid[0]));
+}
+* @endcode
+*
+* <h2>7.2 Mutexes</h2>
+* Mutexes (Mutual exclusion) are used to protect a portion of code or function against concurrent access. Concurrent access happens when two or several threads try to execute the same portion of code at nearly the same time.<br>
+* @code
+#include "tsk.h"
+
+// create the mutext
+tsk_mutex_handle_t *mutex = tsk_mutex_create();
+
+tsk_mutex_lock(mutex);
+// ...portion of code to protect
+tsk_mutex_unlock(mutex);
+
+// destroy the mutex
+tsk_mutex_destroy(&mutex);
+* @endcode
+* Mutexes are not well-defined objects; you should use @ref tsk_mutex_destroy instead of TSK_OBJECT_SAFE_FREE() to destroy them.<br>
+*
+* <h2>7.3 Thread-Safe Objects</h2>
+*
+* Any C Structure could be declared as thread-safe using @ref TSK_DECLARE_SAFEOBJ macro. It’s not mandatory for the object to be well-defined.<br>
+* A thread-safe object is initialized using @ref tsk_safeobj_init() and deinitilized using @ref tsk_safeobj_deinit(). To lock and unlock a portion of code which accesses the object you should use @ref tsk_safeobj_lock() and @ref tsk_safeobj_unlock() respectively.<br>
+*
+* <h2>7.4 Semaphores</h2>
+* Only counting semaphores are supported by the framework.
+* Counting semaphores are used to control the access to a portion of code which might be executed by multiple threads. A thread will have rights to execute the portion of code only if the semaphore’s internal counter value is different than zero. Before executing the code to control, a thread should decrement the counter to check if it has permit.<br>
+* @code
+#include "tsk.h"
+
+// (create the semaphore)
+tsk_semaphore_handle_t *sem = tsk_semaphore_create();
+// (increment the counter)
+tsk_semaphore_increment(sem);
+// (decrement the counter)
+tsk_semaphore_decrement(sem);
+// (destoy the semaphore)
+tsk_semaphore_destroy(&sem);
+* @endcode
+* Semaphores are not well-defined objects; you should use @ref tsk_semaphore_destroy instead of TSK_OBJECT_SAFE_FREE() to destroy them.<br>
+* Mutexes are binary semaphores (counter value is always equals to 1 or 0).<br>
+*
+* <h2>7.5 Condition Variables</h2>
+* Condition variables are used to control the access to a portion of code which might be executed by multiple threads. Each thread will block until a certain condition is signaled or ms milliseconds have passed.<br>
+* @ref tsk_condwait_create is used to create a condition variable, @ref tsk_condwait_wait() to wait indefinitely until the condition is signaled and @ref tsk_condwait_timedwait() to wait until the condition is signaled or ms milliseconds have passed.<br>
+* @ref tsk_condwait_signal() is used to alert the first waiting thread that the condition is now true and @ref tsk_condwait_broadcast() is used to alert all waiting threads.<br>
+* Condition variables are not well-defined objects; you should use @ref tsk_condwait_destroy() instead of TSK_OBJECT_SAFE_FREE() to destroy them.<br>
+*
+* <h2>7.6 Runnable</h2>
+* A <i>runnable</i> object is a well-defined object and is declared using @ref TSK_DECLARE_RUNNABLE() macro.<br>
+* A <i>runnable</i> object must be explicitly started using @ref tsk_runnable_start() and is implicitly stopped when destroyed. You can explicitly stop the object by calling @ref tsk_runnable_stop().<br>
+*
+* <h2>8 Final Sate Machine</h2>
+*
+* <h2>9 Timer Manager</h2>
+*
+*/
+
+
diff --git a/tinySAK/src/tsk.h b/tinySAK/src/tsk.h
new file mode 100644
index 0000000..2fa06ed
--- /dev/null
+++ b/tinySAK/src/tsk.h
@@ -0,0 +1,70 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk.h
+ * @brief This file contains all headers needed to export public API functions.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+
+#ifndef _TINYSAK_SAK_H_
+#define _TINYSAK_SAK_H_
+
+#include "tinysak_config.h"
+
+TSK_BEGIN_DECLS
+
+#include "tsk_list.h"
+#include "tsk_string.h"
+#include "tsk_buffer.h"
+#include "tsk_memory.h"
+#include "tsk_url.h"
+#include "tsk_params.h"
+#include "tsk_options.h"
+#include "tsk_fsm.h"
+
+#include "tsk_time.h"
+#include "tsk_timer.h"
+#include "tsk_condwait.h"
+#include "tsk_mutex.h"
+#include "tsk_semaphore.h"
+#include "tsk_thread.h"
+#include "tsk_runnable.h"
+#include "tsk_safeobj.h"
+#include "tsk_object.h"
+
+#include "tsk_debug.h"
+
+#include "tsk_ppfcs16.h"
+#include "tsk_sha1.h"
+#include "tsk_md5.h"
+#include "tsk_hmac.h"
+#include "tsk_base64.h"
+#include "tsk_uuid.h"
+#include "tsk_ragel_state.h"
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_SAK_H_ */
+
diff --git a/tinySAK/src/tsk_base64.c b/tinySAK/src/tsk_base64.c
new file mode 100644
index 0000000..d94ef5c
--- /dev/null
+++ b/tinySAK/src/tsk_base64.c
@@ -0,0 +1,236 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_base64.c
+ * @brief Base64 encoder and decoder as per RFC 4648.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tsk_base64.h"
+
+#include "tsk_memory.h"
+
+/**@defgroup tsk_base64_group Base64 encoder/decoder as per RFC 4648.
+* @brief Provides base64 encoder and decoder functions.
+*/
+
+/** Pad char.*/
+#define TSK_BASE64_PAD '='
+
+/** Encoding block size. */
+#define TSK_BASE64_ENCODE_BLOCK_SIZE 3 /* 24-bit input group */
+/** Decoding block size. */
+#define TSK_BASE64_DECODE_BLOCK_SIZE 4
+
+/*==================================================================
+ Value Encoding Value Encoding Value Encoding Value Encoding
+ 0 A 17 R 34 i 51 z
+ 1 B 18 S 35 j 52 0
+ 2 C 19 T 36 k 53 1
+ 3 D 20 U 37 l 54 2
+ 4 E 21 V 38 m 55 3
+ 5 F 22 W 39 n 56 4
+ 6 G 23 X 40 o 57 5
+ 7 H 24 Y 41 p 58 6
+ 8 I 25 Z 42 q 59 7
+ 9 J 26 a 43 r 60 8
+ 10 K 27 b 44 s 61 9
+ 11 L 28 c 45 t 62 +
+ 12 M 29 d 46 u 63 /
+ 13 N 30 e 47 v
+ 14 O 31 f 48 w (pad) =
+ 15 P 32 g 49 x
+ 16 Q 33 h 50 y
+
+ RFC 4548 - Table 1: The Base 64 Alphabet
+*/
+
+/**@ingroup tsk_base64_group
+* Encodes arbitrary data into base64 format.
+* @param input The input data to encode in base64 format.
+* @param input_size The size of the @a input data.
+* @param output A pointer where to copy the encoded data.
+* If you don't know what will be the size of the output result then set the pointer value to NULL to let the function allocate it of you.
+* In all case it is up to you to free the @a ouput.
+* You can also use @ref TSK_BASE64_ENCODE_LEN to allocate the buffer before calling this method.
+*
+* @retval The size of the encoded data (sizeof(@a output))
+*/
+tsk_size_t tsk_base64_encode(const uint8_t* input, tsk_size_t input_size, char **output)
+{
+ static const char* TSK_BASE64_ENCODE_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+ /*=================================================================================
+ content T S K
+ ASCII 0x54 0x53 0x4B
+ Binary 0101 0100 0101 0011 0100 1011
+ ------------------------------------------------------------------------------
+ ------------------------------------------------------------------------------
+ Packs of 6bits 010101 000101 001101 001011
+ Indexes 21 5 13 11
+ Base64 encoded V F N L <=== HERE IS THE RESULT OF tsk_base64_encode("TSK")
+ */
+
+ tsk_size_t i = 0;
+ tsk_size_t output_size = 0;
+
+ /* Caller provided his own buffer? */
+ if(!*output){
+ *output = tsk_calloc(1, (TSK_BASE64_ENCODE_LEN(input_size)+1));
+ }
+
+ /* Too short? */
+ if(input_size < TSK_BASE64_ENCODE_BLOCK_SIZE){
+ goto quantum;
+ }
+
+ do{
+ *(*output + output_size++) = TSK_BASE64_ENCODE_ALPHABET [ input[i]>> 2 ];
+ *(*output + output_size++) = TSK_BASE64_ENCODE_ALPHABET [ (input[i]<<4 | input[i+1]>>4) & 0x3F ];
+ *(*output + output_size++) = TSK_BASE64_ENCODE_ALPHABET [ (input[i+1]<<2 | input[i+2]>>6) & 0x3F ];
+ *(*output + output_size++) = TSK_BASE64_ENCODE_ALPHABET [ input[i+2] & 0x3F ];
+
+ i += TSK_BASE64_ENCODE_BLOCK_SIZE;
+ }
+ while(( i+ TSK_BASE64_ENCODE_BLOCK_SIZE) <= input_size);
+
+quantum:
+
+ if((input_size - i) == 1){
+ /* The final quantum of encoding input is exactly 8 bits; here, the
+ final unit of encoded output will be two characters followed by
+ two "=" padding characters.
+ */
+ *(*output + output_size++) = TSK_BASE64_ENCODE_ALPHABET [ input[i]>> 2 ];
+ *(*output + output_size++) = TSK_BASE64_ENCODE_ALPHABET [ input[i]<<4 & 0x3F ];
+ *(*output + output_size++) = TSK_BASE64_PAD, *(*output + output_size++) = TSK_BASE64_PAD;
+ }
+ else if((input_size-i) == 2){
+ /* The final quantum of encoding input is exactly 16 bits; here, the
+ final unit of encoded output will be three characters followed by
+ one "=" padding character.
+ */
+ *(*output + output_size++) = TSK_BASE64_ENCODE_ALPHABET [ input[i]>> 2 ];
+ *(*output + output_size++) = TSK_BASE64_ENCODE_ALPHABET [ (input[i]<<4 | input[i+1]>>4) & 0x3F ];
+ *(*output + output_size++) = TSK_BASE64_ENCODE_ALPHABET [ (input[i+1]<<2 | input[i+2]>>6) & 0x3F ];
+ *(*output + output_size++) = TSK_BASE64_PAD;
+ }
+
+ return output_size;
+}
+
+/**@ingroup tsk_base64_group
+* Decodes arbitrary base64 data.
+* @param input The input base64 data to decode.
+* @param input_size The size of the @a input data.
+* @param output A pointer where to copy the decoded data.
+* If you don't know what will be the size of the output result then set the pointer value to NULL to let the function allocate it of you.
+* In all case it is up to you to free the @a ouput.
+* You can also use @ref TSK_BASE64_DECODE_LEN to allocate the buffer before calling this method.
+*
+* @retval The size of the decoded data (sizeof(@a output))
+*/
+tsk_size_t tsk_base64_decode(const uint8_t* input, tsk_size_t input_size, char **output)
+{
+ static const uint8_t TSK_BASE64_DECODE_ALPHABET[256] =
+ {
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1,
+ 62,
+ -1, -1, -1,
+ 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
+ -1, -1, -1, -1, -1, -1, -1,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ -1, -1, -1, -1, -1, -1,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1,
+ };
+
+ tsk_size_t i, pay_size;
+ tsk_size_t output_size = 0;
+
+ /* Caller provided his own buffer? */
+ if(!*output){
+ *output = tsk_calloc(1, (TSK_BASE64_DECODE_LEN(input_size)+1));
+ }
+
+ /* Count pads and remove them from the base64 string */
+ for(i = input_size, pay_size = input_size; i > 0; i--){
+ if(input[i-1] == TSK_BASE64_PAD) {
+ pay_size--;
+ }
+ else{
+ break;
+ }
+ }
+
+ /* Reset i */
+ i = 0;
+
+ if(pay_size < TSK_BASE64_DECODE_BLOCK_SIZE){
+ goto quantum;
+ }
+
+ do{
+ *(*output + output_size++) = (TSK_BASE64_DECODE_ALPHABET [ input[i] ]<< 2
+ | TSK_BASE64_DECODE_ALPHABET [ input[i+1] ]>>4);
+ *(*output + output_size++) = (TSK_BASE64_DECODE_ALPHABET [ input[i+1] ]<< 4
+ | TSK_BASE64_DECODE_ALPHABET [ input[i+2] ]>>2);
+ *(*output + output_size++) = (TSK_BASE64_DECODE_ALPHABET [ input[i+2] ]<<6
+ | TSK_BASE64_DECODE_ALPHABET [ input[i+3] ]);
+
+ i += TSK_BASE64_DECODE_BLOCK_SIZE;
+ }
+ while(( i+ TSK_BASE64_DECODE_BLOCK_SIZE) <= pay_size);
+
+quantum:
+
+ if((input_size - pay_size) == 1){
+ *(*output + output_size++) = (TSK_BASE64_DECODE_ALPHABET [ input[i] ]<< 2
+ | TSK_BASE64_DECODE_ALPHABET [ input[i+1] ]>>4);
+ *(*output + output_size++) = (TSK_BASE64_DECODE_ALPHABET [ input[i+1] ]<< 4
+ | TSK_BASE64_DECODE_ALPHABET [ input[i+2] ]>>2);
+ }
+ else if((input_size-pay_size) == 2){
+ *(*output + output_size++) = (TSK_BASE64_DECODE_ALPHABET [ input[i] ]<< 2
+ | TSK_BASE64_DECODE_ALPHABET [ input[i+1] ]>>4);
+ }
+
+ return output_size;
+}
diff --git a/tinySAK/src/tsk_base64.h b/tinySAK/src/tsk_base64.h
new file mode 100644
index 0000000..369688c
--- /dev/null
+++ b/tinySAK/src/tsk_base64.h
@@ -0,0 +1,53 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_base64.h
+ * @brief Base64 encoder and decoder as per RFC 4648.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef TINYSAK_BASE64_H
+#define TINYSAK_BASE64_H
+
+#include "tinysak_config.h"
+
+TSK_BEGIN_DECLS
+
+/**@ingroup tsk_base64_group
+* Guess the output(encoded) size.
+* @param IN_LEN The input size.
+*/
+#define TSK_BASE64_ENCODE_LEN(IN_LEN) ((2 + (IN_LEN) - (((IN_LEN) + 2) % 3)) * 4 / 3)
+/**@ingroup tsk_base64_group
+* Guess the output(decoded) size.
+* @param IN_LEN The input size.
+*/
+#define TSK_BASE64_DECODE_LEN(IN_LEN) (((IN_LEN * 3)/4) + 2)
+
+TINYSAK_API tsk_size_t tsk_base64_encode(const uint8_t* input, tsk_size_t input_size, char **output);
+TINYSAK_API tsk_size_t tsk_base64_decode(const uint8_t* input, tsk_size_t input_size, char **output);
+
+TSK_END_DECLS
+
+#endif /* TINYSAK_BASE64_H */
diff --git a/tinySAK/src/tsk_binaryutils.c b/tinySAK/src/tsk_binaryutils.c
new file mode 100644
index 0000000..6702e20
--- /dev/null
+++ b/tinySAK/src/tsk_binaryutils.c
@@ -0,0 +1,33 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_binaryutils.c
+ * @brief Utility functions for binary manipulation.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tsk_binaryutils.h"
+
+/**@defgroup tsk_binaryutils_group Binary utility functions.
+*/
diff --git a/tinySAK/src/tsk_binaryutils.h b/tinySAK/src/tsk_binaryutils.h
new file mode 100644
index 0000000..79943ba
--- /dev/null
+++ b/tinySAK/src/tsk_binaryutils.h
@@ -0,0 +1,157 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_binaryutils.h
+ * @brief Binary utils.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_BINARYUTILS_H_
+#define _TINYSAK_BINARYUTILS_H_
+
+#include "tinysak_config.h"
+
+#include <stdio.h>
+
+TSK_BEGIN_DECLS
+
+/**@ingroup tsk_binaryutils_group
+* Reverse (bit per bit) a 2-byte value.
+* @param value The 2-byte value to reverse.
+*/
+#define TSK_BINARY_REVERSE_2BYTE(value) ((Tsk_BitReverseTable256[value & 0xff] << 8) | (Tsk_BitReverseTable256[(value >> 8)]))
+
+/**@ingroup tsk_binaryutils_group
+* Converts to uint8_t pointer.
+*/
+#define TSK_TO_U8(buffer) ((uint8_t*)buffer)
+/**@ingroup tsk_binaryutils_group
+* Gets the value of the fist byte.
+*/
+#define TSK_BINARY_GET_1BYTE(buffer) *TSK_TO_U8(buffer)// 1-byte
+
+/**@ingroup tsk_binaryutils_group
+* Converts from Little to Big endian.
+*/
+static uint16_t TSK_LSB_2_MSB( void const * buffer )
+{
+ const uint8_t* dummy = (const uint8_t*)buffer;
+ return ( ((uint16_t)dummy[0] << 8) | dummy[1] );
+}
+
+/**@ingroup tsk_binaryutils_group
+* @def TSK_BINARY_GET_2BYTES
+* Gets the first 2-bytes value.
+*/
+/**@ingroup tsk_binaryutils_group
+* @def TSK_BINARY_SET_2BYTES
+* Sets the first 2-bytes value.
+*/
+
+#if 0 /*BIG_ENDIAN*/// Do not change this (it's for my own tests)
+# define TSK_BINARY_GET_2BYTES(buffer) *((uint16_t*)buffer)
+# define TSK_BINARY_SET_2BYTES(buffer, value) *((uint16_t*)buffer)=value
+#else
+# define TSK_BINARY_GET_2BYTES(buffer) TSK_LSB_2_MSB(buffer)
+# define TSK_BINARY_SET_2BYTES(buffer, value) \
+ {uint16_t __value__ = value; \
+ uint8_t*__buffer__ = buffer; \
+ (__buffer__[0]) = (__value__ >> 8); \
+ (__buffer__[1]) = (__value__ & 0xff);}
+#endif
+
+/////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////
+
+// RFC 3320 - 7.3. Uploading UDVM bytecode
+static const uint16_t sigcomp_encoding_destination[]
+= { 0, 128, 192, 256, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960, 1024 };
+
+// RFC 3320 - 7.2. Accessing Stored State
+static const uint8_t sigcomp_encoding_partial_id_length[]
+= { 0, 6, 9, 12 };
+
+// RFC 3320 - 3.3.1. Memory Size and UDVM Cycles
+static const uint8_t sigcomp_encoding_cycles_per_bit[]
+= { 16, 32, 64, 128 };
+static const uint32_t sigcomp_encoding_state_memory_size[]
+= { 0, 2048, 4096, 8192, 16384, 32768, 65536, 131072 };
+static const uint32_t sigcomp_encoding_decompression_memory_size[]
+= { 0, 2048, 4096, 8192, 16384, 32768, 65536, 131072 }; // the bit pattern 000 cannot be used.
+
+// 3.3.1. Memory Size and UDVM Cycles
+// 3.3. SigComp Parameters
+static const uint8_t sigcomp_encoding_cpb[]
+= { 16, 32, 64, 128 };
+static const uint32_t sigcomp_encoding_sms[]
+= { 0, 2048, 4096, 8192, 16384, 32768, 65536, 131072 };
+static const uint32_t sigcomp_encoding_dms[]
+= { 0, 2048, 4096, 8192, 16384, 32768, 65536, 131072 }; // the bit pattern 000 cannot be used.
+
+
+// RFC 3320: Figure 10: Bytecode for a multitype (%) operand
+static const int8_t operand_multitype_indexes [256] =
+{
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+9,
+10,
+-1, -1, -1, -1,
+3, 3,
+4, 4, 4, 4, 4, 4, 4, 4,
+6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
+};
+
+// Used LSB<->MSB bits reverse/swap
+/**@ingroup tsk_binaryutils_group
+* Lookup table for bit reversing.
+*/
+static const unsigned char Tsk_BitReverseTable256[] =
+{
+ 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0,
+ 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8, 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8,
+ 0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4, 0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4,
+ 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC, 0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC,
+ 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2, 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2,
+ 0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA, 0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA,
+ 0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6, 0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6,
+ 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE, 0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE,
+ 0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1, 0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1,
+ 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9, 0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9,
+ 0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5, 0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5,
+ 0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED, 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD,
+ 0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3, 0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3,
+ 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB, 0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB,
+ 0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7, 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,
+ 0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF
+};
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_BINARYUTILS_H_ */
+
diff --git a/tinySAK/src/tsk_buffer.c b/tinySAK/src/tsk_buffer.c
new file mode 100644
index 0000000..4ae1f4c
--- /dev/null
+++ b/tinySAK/src/tsk_buffer.c
@@ -0,0 +1,363 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_buffer.c
+ * @brief Buffer manager.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tsk_buffer.h"
+
+#include "tsk_memory.h"
+#include "tsk_debug.h"
+
+#if defined(_WIN32_WCE)
+# include "tsk_string.h" /* tsk_strlen() */
+#endif
+
+
+#include <stdio.h>
+#include <string.h>
+
+/**@defgroup tsk_buffer_group Buffer management.
+*/
+
+#if defined(_MSC_VER) || TSK_UNDER_WINDOWS
+# define vsnprintf _vsnprintf
+#endif
+
+/**@ingroup tsk_buffer_group
+* Creates new buffer.
+* @param data A pointer to the data to copy into the newly created buffer.
+* @param size The size of the data to copy.
+* @retval A new buffer object.
+* @sa @ref tsk_buffer_create_null
+*/
+tsk_buffer_t* tsk_buffer_create(const void* data, tsk_size_t size)
+{
+ return tsk_object_new(tsk_buffer_def_t, data, size);
+}
+
+/**@ingroup tsk_buffer_group
+* Creates a new empty buffer.
+* @retval A new empty buffer object.
+* @sa tsk_buffer_create.
+*/
+tsk_buffer_t* tsk_buffer_create_null()
+{
+ return tsk_buffer_create(tsk_null, 0);
+}
+
+/**@ingroup tsk_buffer_group
+* Appends new data to the buffer.
+* @param self The buffer to append to. The buffer should be created using @ref tsk_buffer_create or @ref tsk_buffer_create_null.
+* @param format A string with embedded tag to be substituted.
+* @param ... List of parameters.
+* @retval Zero if succeed and non-zero error code otherwise.
+* @sa @ref tsk_buffer_append.
+*
+* @code
+* tsk_buffer_t* buffer = tsk_buffer_create_null();
+* tsk_buffer_append_2(buffer, "str1=%s, c1=%c and val1=%x", "str1", 'c', 0x2554);
+* printf(TSK_BUFFER_TO_STRING(buffer));
+* TSK_OBJECT_SAFE_FREE(buffer);
+* @endcode
+*/
+int tsk_buffer_append_2(tsk_buffer_t* self, const char* format, ...)
+{
+ /*
+ * I suppose that sizeof(char) = 1-byte
+ */
+ int len = 0;
+ va_list ap;
+ char *buffer;
+ tsk_size_t oldsize;
+ va_list ap2;
+
+ if(!self){
+ return -1;
+ }
+
+ oldsize = self->size;
+ buffer = (char*)TSK_BUFFER_DATA(self);
+
+ /* initialize variable arguments (needed for 64bit platforms where vsnprintf will change the va_list) */
+ va_start(ap, format);
+ va_start(ap2, format);
+
+ /* compute destination len for windows mobile
+ */
+#if defined(_WIN32_WCE)
+ {
+ int n;
+ len = (tsk_strlen(format)*2);
+ buffer = tsk_realloc(buffer, (oldsize+len));
+ for(;;){
+ if( (n = vsnprintf((char*)(buffer + oldsize), len, format, ap)) >= 0 && (n<=len) ){
+ len = n;
+ break;
+ }
+ else{
+ len += 10;
+ buffer = tsk_realloc(buffer, (oldsize+len));
+ }
+ }
+ }
+#else
+ len = vsnprintf(tsk_null, 0, format, ap);
+ buffer = tsk_realloc(buffer, oldsize+len+1);
+ vsnprintf((buffer + oldsize), len
+#if !defined(_MSC_VER) || defined(__GNUC__)
+ +1
+#endif
+ , format, ap2);
+#endif
+
+ /* reset variable arguments */
+ va_end(ap);
+ va_end(ap2);
+
+ self->data = buffer;
+ self->size = (oldsize+len);
+
+ return 0;
+}
+
+/**@ingroup tsk_buffer_group
+* Appends data to the buffer.
+* @param self The buffer to append to. The buffer should be created using @ref tsk_buffer_create or @ref tsk_buffer_create_null.
+* @param data The data to append to the buffer.
+* @param size The size of the @a data to append.
+* @retval Zero if succeed and non-zero error code otherwise.
+* @sa @ref tsk_buffer_append_2.
+*
+* @code
+* tsk_buffer_t* buffer = tsk_buffer_create_null();
+* tsk_buffer_append(buffer, "doubango", tsk_strlen("doubango"));
+* printf(TSK_BUFFER_TO_STRING(buffer));
+* TSK_OBJECT_SAFE_FREE(buffer);
+* @endcode
+*/
+int tsk_buffer_append(tsk_buffer_t* self, const void* data, tsk_size_t size)
+{
+ if(self && data && size){
+ tsk_size_t oldsize = self->size;
+ tsk_size_t newsize = oldsize + size;
+
+ if(oldsize){
+ self->data = tsk_realloc(self->data, newsize);
+ }
+ else{
+ self->data = tsk_calloc(size, sizeof(uint8_t));
+ }
+
+ if(self->data){
+ memcpy((void*)(TSK_BUFFER_TO_U8(self) + oldsize), data, size);
+ self->size = newsize;
+ return 0;
+ }
+ }
+ else{
+ TSK_DEBUG_ERROR("Invalid parameter");
+ }
+ return -1;
+}
+
+/**@ingroup tsk_buffer_group
+* Reallocates the buffer.
+* @param self The buffer to realloc.
+* @param size The new size.
+* @retval Zero if succeed and non-zero error code otherwise.
+*/
+int tsk_buffer_realloc(tsk_buffer_t* self, tsk_size_t size)
+{
+ if(self)
+ {
+ if(size == 0){
+ return tsk_buffer_cleanup(self);
+ }
+
+ if(self->size == 0){
+ self->data = tsk_calloc(size, sizeof(uint8_t));
+ }
+ else{
+ self->data = tsk_realloc(self->data, size);
+ }
+
+ self->size = size;
+ return 0;
+ }
+ return -1;
+}
+
+/**@ingroup tsk_buffer_group
+* Removes a chunck of data from the buffer.
+* @param self The buffer from which to remove the chunck.
+* @param position The chunck start position.
+* @param size The size of the chunck.
+* @retval Zero if succeed and non-zero error code otherwise.
+*/
+int tsk_buffer_remove(tsk_buffer_t* self, tsk_size_t position, tsk_size_t size)
+{
+ if(self && self->data && size){
+ if((position == 0) && ((position + size) >= self->size)){ /* Very common case. */
+ return tsk_buffer_cleanup(self);
+ }
+ else if((position + size) < self->size){
+ memcpy(((uint8_t*)self->data) + position, ((uint8_t*)self->data) + position + size,
+ self->size-(position+size));
+ return tsk_buffer_realloc(self, (self->size-size));
+ }
+ }
+ return -1;
+}
+
+/**@ingroup tsk_buffer_group
+* Inserts a chunck of data into the buffer.
+* @param self The buffer to insert to.
+* @param position The starting position to insert to.
+* @param data A pointer to the chunck to insert.
+* @param size The size of the chunck.
+* @retval Zero if succeed and non-zero error code otherwise.
+*/
+int tsk_buffer_insert(tsk_buffer_t* self, tsk_size_t position, const void* data, tsk_size_t size)
+{
+ if(self && size)
+ {
+ int ret;
+ tsk_size_t tomove;
+
+ if(position > self->size){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -2;
+ }
+
+ tomove = (self->size - position);
+
+ if((ret = tsk_buffer_realloc(self, (self->size + size)))){
+ return ret;
+ }
+ memmove(((uint8_t*)self->data) + position + size, ((uint8_t*)self->data) + position,
+ tomove/*self->size - (position + size)*/);
+
+
+ if(data){
+ memcpy(((uint8_t*)self->data) + position, data, size);
+ }
+ else{
+ memset(((uint8_t*)self->data) + position, 0, size);
+ }
+
+ return 0;
+ }
+ return -1;
+}
+
+/**@ingroup tsk_buffer_group
+* Cleanups the internal data and reset the size.
+* @param self The buffer holding the internal data to free.
+* @retval Zero if succeed and non-zero error code otherwise.
+*/
+int tsk_buffer_cleanup(tsk_buffer_t* self)
+{
+ if(self && self->data){
+ tsk_free(&(self->data));
+ self->size = 0;
+ }
+ return 0;
+}
+
+/**@ingroup tsk_buffer_group
+* Takes the ownership of the @a data. If the destination buffer had data, then it will
+* be cleaned up.
+* @param self The buffer
+* @param data
+* @param size
+* @retval Zero if succeed and non-zero error code otherwise.
+*/
+int tsk_buffer_takeownership(tsk_buffer_t* self, void** data, tsk_size_t size)
+{
+ if(!self || !data || !*data || !size){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+
+ if(self->data){
+ tsk_free(&(self->data));
+ }
+ self->data = *data;
+ self->size = size;
+ *data = tsk_null;
+
+ return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+//=================================================================================================
+// Buffer object definition
+//
+static tsk_object_t* tsk_buffer_ctor(tsk_object_t * self, va_list * app)
+{
+ tsk_buffer_t *buffer = self;
+ const void *data = va_arg(*app, const void *);
+ tsk_size_t size = va_arg(*app, tsk_size_t);
+
+ if(data && size){
+ buffer->data = tsk_calloc((size+1), sizeof(uint8_t));
+ memcpy(buffer->data, data, size);
+ buffer->size = size;
+ }
+ return self;
+}
+
+static tsk_object_t* tsk_buffer_dtor(tsk_object_t * self)
+{
+ tsk_buffer_t *buffer = self;
+ if(buffer){
+ TSK_FREE(buffer->data);
+ buffer->size = 0;
+ }
+
+ return self;
+}
+
+static const tsk_object_def_t tsk_buffer_def_s =
+{
+ sizeof(tsk_buffer_t),
+ tsk_buffer_ctor,
+ tsk_buffer_dtor,
+ tsk_null,
+};
+const tsk_object_def_t *tsk_buffer_def_t = &tsk_buffer_def_s;
+
diff --git a/tinySAK/src/tsk_buffer.h b/tinySAK/src/tsk_buffer.h
new file mode 100644
index 0000000..b5df8aa
--- /dev/null
+++ b/tinySAK/src/tsk_buffer.h
@@ -0,0 +1,102 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_buffer.h
+ * @brief Buffer manager.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_BUFFER_H_
+#define _TINYSAK_BUFFER_H_
+
+#include "tinysak_config.h"
+#include "tsk_list.h"
+
+/**@ingroup tsk_buffer_group
+* @def TSK_BUFFER
+* Converts to @ref tsk_buffer_t object.
+* @param self @ref tsk_buffer_t object.
+*/
+/**@ingroup tsk_buffer_group
+* @def TSK_BUFFER_DATA
+* Gets the internal buffer.
+* @param self @ref tsk_buffer_t object.
+*/
+/**@ingroup tsk_buffer_group
+* @def TSK_BUFFER_SIZE
+* Gets the size of the internal buffer.
+* @param self @ref tsk_buffer_t object.
+*/
+
+TSK_BEGIN_DECLS
+
+
+#define TSK_BUFFER(self) ((tsk_buffer_t*)self)
+#define TSK_BUFFER_DATA(self) (self ? TSK_BUFFER(self)->data : tsk_null)
+#define TSK_BUFFER_SIZE(self) (self ? TSK_BUFFER(self)->size : 0)
+
+/**@ingroup tsk_buffer_group
+* @def TSK_BUFFER_TO_STRING
+* Gets a the internal buffer as a pointer to a string (const char*).
+* @param self @ref tsk_buffer_t object.
+*/
+/**@ingroup tsk_buffer_group
+* @def TSK_BUFFER_TO_U8
+* Gets a the internal buffer as a pointer to an unsigned string (uint8_t*).
+* @param self @ref tsk_buffer_t object.
+*/
+#define TSK_BUFFER_TO_STRING(self) (self ? (const char*)TSK_BUFFER_DATA(self) : tsk_null)
+#define TSK_BUFFER_TO_U8(self) (self ? (uint8_t*)TSK_BUFFER_DATA(self) : tsk_null)
+
+/**@ingroup tsk_buffer_group
+* Buffer object.
+*/
+typedef struct tsk_buffer_s
+{
+ TSK_DECLARE_OBJECT;
+
+ void *data; /**< Interanl data. */
+ tsk_size_t size; /**< The size of the internal data. */
+}
+tsk_buffer_t;
+
+typedef tsk_list_t tsk_buffers_L_t; /**<@ingroup tsk_buffer_group List of @ref tsk_buffer_t elements. */
+
+TINYSAK_API tsk_buffer_t* tsk_buffer_create(const void* data, tsk_size_t size);
+TINYSAK_API tsk_buffer_t* tsk_buffer_create_null();
+
+TINYSAK_API int tsk_buffer_append_2(tsk_buffer_t* self, const char* format, ...);
+TINYSAK_API int tsk_buffer_append(tsk_buffer_t* self, const void* data, tsk_size_t size);
+TINYSAK_API int tsk_buffer_realloc(tsk_buffer_t* self, tsk_size_t size);
+TINYSAK_API int tsk_buffer_remove(tsk_buffer_t* self, tsk_size_t position, tsk_size_t size);
+TINYSAK_API int tsk_buffer_insert(tsk_buffer_t* self, tsk_size_t position, const void*data, tsk_size_t size);
+TINYSAK_API int tsk_buffer_cleanup(tsk_buffer_t* self);
+TINYSAK_API int tsk_buffer_takeownership(tsk_buffer_t* self, void** data, tsk_size_t size);
+
+TINYSAK_GEXTERN const tsk_object_def_t *tsk_buffer_def_t;
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_BUFFER_H_ */
+
diff --git a/tinySAK/src/tsk_common.h b/tinySAK/src/tsk_common.h
new file mode 100644
index 0000000..2383f4d
--- /dev/null
+++ b/tinySAK/src/tsk_common.h
@@ -0,0 +1,70 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_common.h
+ * Commons.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+
+#ifndef _TINYSAK_COMMON_H_
+#define _TINYSAK_COMMON_H_
+
+typedef int tsk_boolean_t;
+#define tsk_bool_t tsk_boolean_t
+
+/**@def tsk_true
+* True (1).
+*/
+/**@def tsk_false
+* False (0).
+*/
+#define tsk_true 1
+#define tsk_false 0
+
+#define TSK_MIN(a,b) (((a) < (b)) ? (a) : (b))
+#define TSK_MAX(a,b) (((a) > (b)) ? (a) : (b))
+#define TSK_ABS(a) (((a)< 0) ? -(a) : (a))
+
+// used to avoid doing *((uint32_t*)ptr) which don't respect memory alignment on
+// some embedded platforms
+#define TSK_TO_UINT32(u8_ptr) (((uint32_t)(u8_ptr)[0]) | ((uint32_t)(u8_ptr)[1])<<8 | ((uint32_t)(u8_ptr)[2])<<16 | ((uint32_t)(u8_ptr)[3])<<24)
+#define TSK_TO_UINT16(u8_ptr) (((uint16_t)(u8_ptr)[0]) | ((uint16_t)(u8_ptr)[1])<<8)
+
+typedef int tsk_ssize_t; /**< Signed size */
+typedef unsigned int tsk_size_t; /**< Unsigned size */
+
+#if !defined(va_copy)
+# define tsk_va_copy(D, S) ((D) = (S))
+#else
+# define tsk_va_copy(D, S) va_copy((D), (S))
+#endif
+
+#ifdef NULL
+#define tsk_null NULL /**< Null pointer */
+#else
+#define tsk_null 0 /**< Null pointer */
+#endif
+
+#endif /* _TINYSAK_COMMON_H_ */
diff --git a/tinySAK/src/tsk_condwait.c b/tinySAK/src/tsk_condwait.c
new file mode 100644
index 0000000..08f9c89
--- /dev/null
+++ b/tinySAK/src/tsk_condwait.c
@@ -0,0 +1,303 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_condwait.c
+ * @brief Pthread/Windows functions for waiting an signaling on condition variables.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+
+#include "tsk_condwait.h"
+#include "tsk_memory.h"
+#include "tsk_debug.h"
+#include "tsk_time.h"
+#include <time.h>
+
+#if TSK_UNDER_WINDOWS
+# include <windows.h>
+# include "tsk_errno.h"
+# define CONDWAIT_S void
+ typedef HANDLE CONDWAIT_T;
+# define TIMED_OUT WAIT_TIMEOUT
+#else
+# include <sys/time.h>
+# include <pthread.h>
+# define CONDWAIT_S pthread_cond_t
+ typedef CONDWAIT_S* CONDWAIT_T;
+# define TIMED_OUT ETIMEDOUT
+#endif
+
+#if defined(__GNUC__) || defined (__SYMBIAN32__)
+# include <errno.h>
+#endif
+
+/**@defgroup tsk_condwait_group Pthread/Windows functions for waiting and signaling on condition variables (conwait).
+* @code
+* tsk_condwait_handle_t *condwait = tsk_condwait_create();
+* @endcode
+*
+* In thread-1:
+* @code
+* // Bock the current thread until the condition is opened or until 1000ms have passed.
+* int ret = tsk_condwait_timedwait(condwait, 1000);
+* @endcode
+*
+* In thread-2:
+* @code
+* // Wakes up
+* int ret = tsk_condwait_signal(condwait);
+* // or tsk_condwait_broadcast(condwait)
+* @endcode
+*
+* To free the condwait object:
+* @code
+* tsk_condwait_destroy(&condwait);
+* @endcode
+*/
+
+/**@ingroup tsk_condwait_group
+* Represents both PThread an Windows condwait object.
+*/
+typedef struct tsk_condwait_s
+{
+ CONDWAIT_T pcond; /**< Pthread handle pointing to the internal condwait object. */
+#if !TSK_UNDER_WINDOWS
+ tsk_mutex_handle_t* mutex; /**< Locker. */
+#endif
+}
+tsk_condwait_t;
+
+/**@ingroup tsk_condwait_group
+* Creates new conwait handle. You MUST call @ref tsk_condwait_destroy to free the handle.
+* @retval New condwait handle.
+* @sa @ref tsk_condwait_destroy.
+*/
+tsk_condwait_handle_t* tsk_condwait_create()
+{
+ tsk_condwait_t *condwait = tsk_calloc(1, sizeof(tsk_condwait_t));
+
+ if(condwait)
+ {
+#if TSK_UNDER_WINDOWS
+ condwait->pcond = CreateEvent(NULL, TRUE, FALSE, NULL);
+ if(!condwait->pcond)
+ {
+ TSK_FREE(condwait);
+ }
+#else
+ condwait->pcond = (CONDWAIT_T)tsk_calloc(1, sizeof(CONDWAIT_S));
+ if(pthread_cond_init(condwait->pcond, 0))
+ {
+ TSK_DEBUG_ERROR("Failed to initialize the new conwait.");
+ }
+
+ if(!(condwait->mutex = tsk_mutex_create()))
+ {
+ pthread_cond_destroy(condwait->pcond);
+
+ TSK_FREE(condwait);
+ TSK_DEBUG_ERROR("Failed to initialize the internal mutex.");
+ }
+#endif
+ }
+
+ if(!condwait)
+ {
+ TSK_DEBUG_ERROR("Failed to create new conwait.");
+ }
+ return condwait;
+}
+
+/**@ingroup tsk_condwait_group
+* Block the current thread until the condition is opened.
+* @param handle CondWait handle created using @ref tsk_condwait_create.
+* @retval Zero if succeed and non-zero otherwise.
+* @sa @ref tsk_condwait_timedwait.
+*/
+int tsk_condwait_wait(tsk_condwait_handle_t* handle)
+{
+ int ret = EINVAL;
+ tsk_condwait_t *condwait = (tsk_condwait_t*)handle;
+
+#if TSK_UNDER_WINDOWS
+ if((ret = (WaitForSingleObject(condwait->pcond, INFINITE) == WAIT_FAILED) ? -1 : 0)){
+ TSK_DEBUG_ERROR("WaitForSingleObject function failed: %d", ret);
+ }
+#else
+ if(condwait && condwait->mutex){
+ tsk_mutex_lock(condwait->mutex);
+ if(ret = pthread_cond_wait(condwait->pcond, (pthread_mutex_t*)condwait->mutex))
+ {
+ TSK_DEBUG_ERROR("pthread_cond_wait function failed: %d", ret);
+ }
+ tsk_mutex_unlock(condwait->mutex);
+ }
+#endif
+ return ret;
+}
+
+/**@ingroup tsk_condwait_group
+* Block the current thread until the condition is opened or until @a ms milliseconds have passed.
+* @param handle condwait handle created using @ref tsk_condwait_create.
+* @param ms The number of milliseconds to wait for a given condition.
+* @retval Zero if succeed and non-zero error code otherwise.
+* @sa @ref tsk_condwait_wait.
+*/
+int tsk_condwait_timedwait(tsk_condwait_handle_t* handle, uint64_t ms)
+{
+#if TSK_UNDER_WINDOWS
+ DWORD ret = WAIT_FAILED;
+#else
+ int ret = EINVAL;
+#endif
+ tsk_condwait_t *condwait = (tsk_condwait_t*)handle;
+
+#if TSK_UNDER_WINDOWS
+ if((ret = WaitForSingleObject(condwait->pcond, (DWORD)ms)) != WAIT_OBJECT_0)
+ {
+ if(ret == TIMED_OUT){
+ /* TSK_DEBUG_INFO("WaitForSingleObject function timedout: %d", ret); */
+ }
+ else{
+ TSK_DEBUG_ERROR("WaitForSingleObject function failed: %d", ret);
+ }
+ return ((ret == TIMED_OUT) ? 0 : ret);
+ }
+#else
+ if(condwait && condwait->mutex)
+ {
+ struct timespec ts = {0, 0};
+ struct timeval tv = {0, 0};
+ /*int rc =*/ tsk_gettimeofday(&tv, 0);
+
+ ts.tv_sec = ( tv.tv_sec + ((long)ms/1000) );
+ ts.tv_nsec += ( (tv.tv_usec * 1000) + ((long)ms % 1000 * 1000000) );
+ if(ts.tv_nsec > 999999999) ts.tv_sec+=1, ts.tv_nsec = ts.tv_nsec % 1000000000;
+
+ tsk_mutex_lock(condwait->mutex);
+ if(ret = pthread_cond_timedwait(condwait->pcond, (pthread_mutex_t*)condwait->mutex, &ts)){
+ if(ret == TIMED_OUT){
+ /* TSK_DEBUG_INFO("pthread_cond_timedwait function timedout: %d", ret); */
+ }
+ else{
+ TSK_DEBUG_ERROR("pthread_cond_timedwait function failed: %d", ret);
+ }
+ }
+
+ tsk_mutex_unlock(condwait->mutex);
+
+ return ((ret == TIMED_OUT) ? 0 : ret);
+ }
+#endif
+
+ return ret;
+}
+
+/**@ingroup tsk_condwait_group
+* Wakes up at least one thread that is currently waiting.
+* @param handle CondWait handle created using @ref tsk_condwait_create.
+* @retval Zero if succeed and non-zero otherwise.
+* @sa @ref tsk_condwait_broadcast.
+*/
+int tsk_condwait_signal(tsk_condwait_handle_t* handle)
+{
+ int ret = EINVAL;
+ tsk_condwait_t *condwait = (tsk_condwait_t*)handle;
+
+#if TSK_UNDER_WINDOWS
+ if(ret = ((SetEvent(condwait->pcond) && ResetEvent(condwait->pcond)) ? 0 : -1)){
+ ret = GetLastError();
+ TSK_DEBUG_ERROR("SetEvent/ResetEvent function failed: %d", ret);
+ }
+#else
+ if(condwait && condwait->mutex){
+ tsk_mutex_lock(condwait->mutex);
+
+ if(ret = pthread_cond_signal(condwait->pcond))
+ {
+ TSK_DEBUG_ERROR("pthread_cond_signal function failed: %d", ret);
+ }
+ tsk_mutex_unlock(condwait->mutex);
+ }
+#endif
+ return ret;
+}
+
+
+/**@ingroup tsk_condwait_group
+* Wakes up all threads that are currently waiting for the condition.
+* @param handle CondWait handle created using @ref tsk_condwait_create.
+* @retval Zero if succeed and non-zero otherwise.
+* @sa @ref tsk_condwait_signal.
+*/
+int tsk_condwait_broadcast(tsk_condwait_handle_t* handle)
+{
+ int ret = EINVAL;
+ tsk_condwait_t *condwait = (tsk_condwait_t*)handle;
+
+#if TSK_UNDER_WINDOWS
+ if(ret = ((SetEvent(condwait->pcond) && ResetEvent(condwait->pcond)) ? 0 : -1))
+ {
+ ret = GetLastError();
+ TSK_DEBUG_ERROR("SetEvent function failed: %d", ret);
+ }
+#else
+ if(condwait && condwait->mutex)
+ {
+ tsk_mutex_lock(condwait->mutex);
+ if(ret = pthread_cond_broadcast(condwait->pcond))
+ {
+ TSK_DEBUG_ERROR("pthread_cond_broadcast function failed: %d", ret);
+ }
+ tsk_mutex_unlock(condwait->mutex);
+ }
+#endif
+
+ return ret;
+}
+
+/**@ingroup tsk_condwait_group
+* Safely free a condwait variable previously created using @ref tsk_condwait_create.
+* @param handle The condwait handle to free.
+* @sa @ref tsk_condwait_create
+*/
+void tsk_condwait_destroy(tsk_condwait_handle_t** handle)
+{
+ tsk_condwait_t **condwait = (tsk_condwait_t**)handle;
+
+ if(condwait && *condwait){
+#if TSK_UNDER_WINDOWS
+ CloseHandle((*condwait)->pcond);
+#else
+ tsk_mutex_destroy(&((*condwait)->mutex));
+ pthread_cond_destroy((*condwait)->pcond);
+ TSK_FREE((*condwait)->pcond);
+#endif
+ tsk_free((void**)condwait);
+ }
+ else{
+ TSK_DEBUG_WARN("Cannot free an uninitialized condwait object");
+ }
+}
+
diff --git a/tinySAK/src/tsk_condwait.h b/tinySAK/src/tsk_condwait.h
new file mode 100644
index 0000000..b35b45c
--- /dev/null
+++ b/tinySAK/src/tsk_condwait.h
@@ -0,0 +1,53 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_condwait.h
+ * @brief Pthread CondWait
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_CONDWAIT_H_
+#define _TINYSAK_CONDWAIT_H_
+
+#include "tinysak_config.h"
+#include "tsk_mutex.h"
+
+TSK_BEGIN_DECLS
+
+/**@ingroup tsk_condwait_group
+* An opaque handle to a condwait object.
+*/
+typedef void tsk_condwait_handle_t;
+
+TINYSAK_API tsk_condwait_handle_t* tsk_condwait_create();
+TINYSAK_API int tsk_condwait_wait(tsk_condwait_handle_t* handle);
+TINYSAK_API int tsk_condwait_timedwait(tsk_condwait_handle_t* handle, uint64_t ms);
+TINYSAK_API int tsk_condwait_signal(tsk_condwait_handle_t* handle);
+TINYSAK_API int tsk_condwait_broadcast(tsk_condwait_handle_t* handle);
+TINYSAK_API void tsk_condwait_destroy(tsk_condwait_handle_t** handle);
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_CONDWAIT_H_ */
+
diff --git a/tinySAK/src/tsk_debug.c b/tinySAK/src/tsk_debug.c
new file mode 100644
index 0000000..6ff1bcf
--- /dev/null
+++ b/tinySAK/src/tsk_debug.c
@@ -0,0 +1,76 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_debug.c
+ * @brief Utility functions for debugging purpose.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tsk_debug.h"
+
+/**@defgroup tsk_debug_group Utility functions for debugging purpose.
+*/
+
+#if TSK_HAVE_DEBUG_H
+// Nothing to do --> all is up to the end-user application
+#else
+
+const void* tsk_debug_arg_data = tsk_null;
+tsk_debug_f tsk_debug_info_cb = tsk_null;
+tsk_debug_f tsk_debug_warn_cb = tsk_null;
+tsk_debug_f tsk_debug_error_cb = tsk_null;
+tsk_debug_f tsk_debug_fatal_cb = tsk_null;
+
+void tsk_debug_set_arg_data(const void* arg_data){
+ tsk_debug_arg_data = arg_data;
+}
+const void* tsk_debug_get_arg_data(){
+ return tsk_debug_arg_data;
+}
+void tsk_debug_set_info_cb(tsk_debug_f cb){
+ tsk_debug_info_cb = cb;
+}
+tsk_debug_f tsk_debug_get_info_cb(){
+ return tsk_debug_info_cb;
+}
+void tsk_debug_set_warn_cb(tsk_debug_f cb){
+ tsk_debug_warn_cb = cb;
+}
+tsk_debug_f tsk_debug_get_warn_cb(){
+ return tsk_debug_warn_cb;
+}
+void tsk_debug_set_error_cb(tsk_debug_f cb){
+ tsk_debug_error_cb = cb;
+}
+tsk_debug_f tsk_debug_get_error_cb(){
+ return tsk_debug_error_cb;
+}
+void tsk_debug_set_fatal_cb(tsk_debug_f cb){
+ tsk_debug_fatal_cb = cb;
+}
+tsk_debug_f tsk_debug_get_fatal_cb(){
+ return tsk_debug_fatal_cb;
+}
+
+#endif /* TSK_HAVE_DEBUG_H */
diff --git a/tinySAK/src/tsk_debug.h b/tinySAK/src/tsk_debug.h
new file mode 100644
index 0000000..90b9618
--- /dev/null
+++ b/tinySAK/src/tsk_debug.h
@@ -0,0 +1,125 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_debug.h
+ * @brief Useful functions for debugging purpose.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_DEBUG_H_
+#define _TINYSAK_DEBUG_H_
+
+#include "tinysak_config.h"
+#include <stdio.h>
+
+TSK_BEGIN_DECLS
+
+#if !defined(DEBUG_LEVEL)
+# define DEBUG_LEVEL DEBUG_LEVEL_ERROR
+#endif
+
+/**@ingroup tsk_debug_group
+* @def DEBUG_LEVEL_INFO
+* @a INFO level (4). This is the lowest possible level and will turn on all logging.
+*/
+/**@ingroup tsk_debug_group
+* @def DEBUG_LEVEL_WARN
+* @a WARN level (3). Warning are error which could change the normal process without blocking the application.
+*/
+/**@ingroup tsk_debug_group
+* @def DEBUG_LEVEL_ERROR
+* @a ERROR level (2). This level log error which might change the application behavior.
+*/
+/**@ingroup tsk_debug_group
+* @def DEBUG_LEVEL_FATAL
+* @a FATAL level (1). This level log fatal errors which might abort the application.
+*/
+#define DEBUG_LEVEL_INFO 4
+#define DEBUG_LEVEL_WARN 3
+#define DEBUG_LEVEL_ERROR 2
+#define DEBUG_LEVEL_FATAL 1
+
+#if TSK_HAVE_DEBUG_H
+# include <my_debug.h>
+#else
+ typedef int (*tsk_debug_f)(const void* arg, const char* fmt, ...);
+
+ /* INFO */
+# if (DEBUG_LEVEL >= DEBUG_LEVEL_INFO)
+# define TSK_DEBUG_INFO(FMT, ...) \
+ if(tsk_debug_get_info_cb()) \
+ tsk_debug_get_info_cb()(tsk_debug_get_arg_data(), "*INFO: " FMT "\n", ##__VA_ARGS__); \
+ else \
+ fprintf(stderr, "*INFO: " FMT "\n", ##__VA_ARGS__);
+# else
+# define TSK_DEBUG_INFO(FMT, ...) ((void)0)
+# endif
+ /* WARN */
+# if (DEBUG_LEVEL >= DEBUG_LEVEL_WARN)
+# define TSK_DEBUG_WARN(FMT, ...) \
+ if(tsk_debug_get_warn_cb()) \
+ tsk_debug_get_warn_cb()(tsk_debug_get_arg_data(), "**WARN: function: \"%s()\" \nfile: \"%s\" \nline: \"%u\" \nMSG: " FMT "\n", __FUNCTION__, __FILE__, __LINE__, ##__VA_ARGS__); \
+ else \
+ fprintf(stderr, "**WARN: function: \"%s()\" \nfile: \"%s\" \nline: \"%u\" \nMSG: " FMT "\n", __FUNCTION__, __FILE__, __LINE__, ##__VA_ARGS__);
+# else
+# define TSK_DEBUG_WARN(FMT, ...) ((void)0)
+# endif
+ /* ERROR */
+# if (DEBUG_LEVEL >= DEBUG_LEVEL_ERROR)
+# define TSK_DEBUG_ERROR(FMT, ...) \
+ if(tsk_debug_get_error_cb()) \
+ tsk_debug_get_error_cb()(tsk_debug_get_arg_data(), "***ERROR: function: \"%s()\" \nfile: \"%s\" \nline: \"%u\" \nMSG: " FMT "\n", __FUNCTION__, __FILE__, __LINE__, ##__VA_ARGS__); \
+ else \
+ fprintf(stderr, "***ERROR: function: \"%s()\" \nfile: \"%s\" \nline: \"%u\" \nMSG: " FMT "\n", __FUNCTION__, __FILE__, __LINE__, ##__VA_ARGS__);
+# else
+# define TSK_DEBUG_ERROR(FMT, ...) ((void)0)
+# endif
+ /* FATAL */
+# if (DEBUG_LEVEL >= DEBUG_LEVEL_FATAL)
+# define TSK_DEBUG_FATAL(FMT, ...) \
+ if(tsk_debug_get_fatal_cb()) \
+ tsk_debug_get_fatal_cb()(tsk_debug_get_arg_data(), "****FATAL: function: \"%s()\" \nfile: \"%s\" \nline: \"%u\" \nMSG: " FMT "\n", __FUNCTION__, __FILE__, __LINE__, ##__VA_ARGS__); \
+ else \
+ fprintf(stderr, "****FATAL: function: \"%s()\" \nfile: \"%s\" \nline: \"%u\" \nMSG: " FMT "\n", __FUNCTION__, __FILE__, __LINE__, ##__VA_ARGS__);
+# else
+# define TSK_DEBUG_FATAL(FMT, ...) ((void)0)
+# endif
+TINYSAK_API void tsk_debug_set_arg_data(const void*);
+TINYSAK_API const void* tsk_debug_get_arg_data();
+TINYSAK_API void tsk_debug_set_info_cb(tsk_debug_f );
+TINYSAK_API tsk_debug_f tsk_debug_get_info_cb();
+TINYSAK_API void tsk_debug_set_warn_cb(tsk_debug_f );
+TINYSAK_API tsk_debug_f tsk_debug_get_warn_cb();
+TINYSAK_API void tsk_debug_set_error_cb(tsk_debug_f );
+TINYSAK_API tsk_debug_f tsk_debug_get_error_cb( );
+TINYSAK_API void tsk_debug_set_fatal_cb(tsk_debug_f );
+TINYSAK_API tsk_debug_f tsk_debug_get_fatal_cb( );
+
+#endif /* TSK_HAVE_DEBUG_H */
+
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_DEBUG_H_ */
+
diff --git a/tinySAK/src/tsk_errno.h b/tinySAK/src/tsk_errno.h
new file mode 100644
index 0000000..22c4fb4
--- /dev/null
+++ b/tinySAK/src/tsk_errno.h
@@ -0,0 +1,93 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_mutex.h
+ * @brief ERRNO.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_ERRNO_H_
+#define _TINYSAK_ERRNO_H_
+
+#include "tinysak_config.h"
+
+TSK_BEGIN_DECLS
+
+#ifndef _WIN32_WCE
+# include <errno.h>
+#else
+#define EPERM 1
+#define ENOENT 2
+#define ESRCH 3
+#define EINTR 4
+#define EIO 5
+#define ENXIO 6
+#define E2BIG 7
+#define ENOEXEC 8
+#define EBADF 9
+#define ECHILD 10
+#define EAGAIN 11
+#define ENOMEM 12
+#define EACCES 13
+#define EFAULT 14
+#define EBUSY 16
+#define EEXIST 17
+#define EXDEV 18
+#define ENODEV 19
+#define ENOTDIR 20
+#define EISDIR 21
+#define ENFILE 23
+#define EMFILE 24
+#define ENOTTY 25
+#define EFBIG 27
+#define ENOSPC 28
+#define ESPIPE 29
+#define EROFS 30
+#define EMLINK 31
+#define EPIPE 32
+#define EDOM 33
+#define EDEADLK 36
+#define ENAMETOOLONG 38
+#define ENOLCK 39
+#define ENOSYS 40
+#define ENOTEMPTY 41
+
+/* Error codes used in the Secure CRT functions */
+
+#ifndef RC_INVOKED
+#if !defined(_SECURECRT_ERRCODE_VALUES_DEFINED)
+#define _SECURECRT_ERRCODE_VALUES_DEFINED
+#define EINVAL 22
+#define ERANGE 34
+#define EILSEQ 42
+#define STRUNCATE 80
+#endif
+#endif
+
+#endif
+
+TSK_END_DECLS
+
+#endif
+
diff --git a/tinySAK/src/tsk_fsm.c b/tinySAK/src/tsk_fsm.c
new file mode 100644
index 0000000..8acd511
--- /dev/null
+++ b/tinySAK/src/tsk_fsm.c
@@ -0,0 +1,311 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_fsm.c
+ * @brief Finite-state machine (FSM) implementation.
+ * @sa http://en.wikipedia.org/wiki/Finite-state_machine.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tsk_fsm.h"
+#include "tsk_memory.h"
+#include "tsk_debug.h"
+
+/**@defgroup tsk_fsm_group Finite-state machine (FSM) implementation.
+*/
+
+int tsk_fsm_exec_nothing(va_list *app){ return 0/*success*/; }
+tsk_bool_t tsk_fsm_cond_always(const void* data1, const void* data2) { return tsk_true; }
+
+/**@ingroup tsk_fsm_group
+*/
+tsk_fsm_t* tsk_fsm_create(tsk_fsm_state_id state_curr, tsk_fsm_state_id state_term)
+{
+ return tsk_object_new(tsk_fsm_def_t, state_curr, state_term);
+}
+
+/**@ingroup tsk_fsm_group
+*/
+tsk_fsm_entry_t* tsk_fsm_entry_create()
+{
+ return tsk_object_new(tsk_fsm_entry_def_t);
+}
+
+/**@ingroup tsk_fsm_group
+* Add entries (states) to the FSM.
+* @param self The FSM.
+* @param ... One of these helper macros: @b TSK_FSM_ADD_*. MUST end with
+* @b TSK_FSM_ADD_NULL.
+* @retval Zero if succeed and non-zero error code otherwise.
+*/
+int tsk_fsm_set(tsk_fsm_t* self, ...)
+{
+ va_list args;
+ int guard;
+
+ if(!self){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+
+ va_start(args, self);
+ while((guard = va_arg(args, int))){
+ tsk_fsm_entry_t* entry;
+ if((entry = tsk_fsm_entry_create())){
+ entry->from = va_arg(args, tsk_fsm_state_id);
+ entry->action = va_arg(args, tsk_fsm_action_id);
+ entry->cond = va_arg(args, tsk_fsm_cond);
+ entry->to = va_arg(args, tsk_fsm_state_id);
+ entry->exec = va_arg(args, tsk_fsm_exec);
+ entry->desc = va_arg(args, const char*);
+
+ tsk_list_push_descending_data(self->entries, (void**)&entry);
+ }
+ }
+ va_end(args);
+
+ return 0;
+}
+
+/**@ingroup tsk_fsm_group
+* Sets the @a callback function to call when the FSM enter in the final state.
+* @param self The FSM.
+* @param callback The callback function to call.
+* @param callbackdata Opaque data (user-data) to pass to the callback function.
+* @retval Zero if succeed and non-zero error code otherwise.
+*/
+int tsk_fsm_set_callback_terminated(tsk_fsm_t* self, tsk_fsm_onterminated_f callback, const void* callbackdata)
+{
+ if(self){
+ self->callback_term = callback;
+ self->callback_data = callbackdata;
+ return 0;
+ }
+ else{
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+}
+
+/**@ingroup tsk_fsm_group
+* Execute an @a action. This action will probably change the current state of the FSM.
+* @param self The FSM.
+* @param action The id of the action to execute.
+* @param cond_data1 The first opaque data to pass to the @a condition function.
+* @param cond_data2 The first opaque data to pass to the @a condition function.
+* @param ... Variable parameters to pass to the @a exec function.
+* @retval Zero if succeed and non-zero error code otherwise.
+*/
+int tsk_fsm_act(tsk_fsm_t* self, tsk_fsm_action_id action, const void* cond_data1, const void* cond_data2, ...)
+{
+ tsk_list_item_t *item;
+ va_list ap;
+ tsk_bool_t found = tsk_false;
+ tsk_bool_t terminates = tsk_false; /* thread-safeness -> DO NOT REMOVE THIS VARIABLE */
+ int ret_exec = 0; /* success */
+
+ if(!self){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+ if(tsk_fsm_terminated(self)){
+ TSK_DEBUG_WARN("The FSM is in the final state.");
+ return -2;
+ }
+
+ // lock
+ tsk_safeobj_lock(self);
+
+ va_start(ap, cond_data2);
+ tsk_list_foreach(item, self->entries)
+ {
+ tsk_fsm_entry_t* entry = item->data;
+ if((entry->from != tsk_fsm_state_any) && (entry->from != self->current)){
+ continue;
+ }
+
+ if((entry->action != tsk_fsm_action_any) && (entry->action != action)){
+ continue;
+ }
+
+ // check condition
+ if(entry->cond(cond_data1, cond_data2)){
+ // For debug information
+ if(self->debug){
+ TSK_DEBUG_INFO("State machine: %s", entry->desc);
+ }
+
+ if(entry->to != tsk_fsm_action_any){ /* Stay at the current state if dest. state is Any */
+ self->current = entry->to;
+ }
+
+ if(entry->exec){
+ if((ret_exec = entry->exec(&ap))){
+ TSK_DEBUG_INFO("State machine: Exec function failed. Moving to terminal state.");
+ }
+ }
+ else{ /* Nothing to execute */
+ ret_exec = 0;
+ }
+
+ terminates = (ret_exec || (self->current == self->term));
+ found = tsk_true;
+ break;
+ }
+ }
+ va_end(ap);
+
+ // unlock
+ tsk_safeobj_unlock(self);
+
+ /* Only call the callback function after unlock. */
+ if(terminates){
+ self->current = self->term;
+ if(self->callback_term){
+ self->callback_term(self->callback_data);
+ }
+ }
+ if(!found){
+ TSK_DEBUG_WARN("State machine: No matching state found.");
+ }
+
+ return ret_exec;
+}
+
+tsk_bool_t tsk_fsm_terminated(tsk_fsm_t* self)
+{
+ if(self){
+ return (self->current == self->term);
+ }
+ else{
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return tsk_true;
+ }
+}
+
+
+//=================================================================================================
+// fsm object definition
+//
+static tsk_object_t* tsk_fsm_ctor(tsk_object_t * self, va_list * app)
+{
+ tsk_fsm_t *fsm = self;
+ if(fsm){
+ fsm->current = va_arg(*app, tsk_fsm_state_id);
+ fsm->term = va_arg(*app, tsk_fsm_state_id);
+
+ fsm->entries = tsk_list_create();
+
+#if defined(DEBUG) || defined(_DEBUG)
+ fsm->debug = 1; /* default value, could be changed at any time */
+#endif
+ tsk_safeobj_init(fsm);
+ }
+
+ return self;
+}
+
+static tsk_object_t* tsk_fsm_dtor(tsk_object_t * self)
+{
+ tsk_fsm_t *fsm = self;
+ if(fsm){
+ /* If not in the terminal state ==>do it */
+ /*if(fsm->current != fsm->term){
+ tsk_safeobj_lock(fsm);
+ if(fsm->callback_term){
+ fsm->callback_term(fsm->callback_data);
+ }
+ tsk_safeobj_unlock(fsm);
+ }*/
+ tsk_safeobj_deinit(fsm);
+
+ TSK_OBJECT_SAFE_FREE(fsm->entries);
+ }
+
+ return self;
+}
+
+static const tsk_object_def_t tsk_fsm_def_s =
+{
+ sizeof(tsk_fsm_t),
+ tsk_fsm_ctor,
+ tsk_fsm_dtor,
+ tsk_null,
+};
+const tsk_object_def_t *tsk_fsm_def_t = &tsk_fsm_def_s;
+
+//=================================================================================================
+// fsm entry object definition
+//
+static tsk_object_t* tsk_fsm_entry_ctor(tsk_object_t * self, va_list * app)
+{
+ tsk_fsm_entry_t *fsm_entry = self;
+ if(fsm_entry){
+ }
+
+ return self;
+}
+
+static tsk_object_t* tsk_fsm_entry_dtor(tsk_object_t * self)
+{
+ tsk_fsm_entry_t *fsm_entry = self;
+ if(fsm_entry){
+ /* desc is "const char*" => should not be deleted */
+ /* TSK_FREE(fsm_entry->desc); */
+ }
+
+ return self;
+}
+static int tsk_fsm_entry_cmp(const tsk_object_t *_entry1, const tsk_object_t *_entry2)
+{
+ const tsk_fsm_entry_t* entry1 = _entry1;
+ const tsk_fsm_entry_t* entry2 = _entry2;
+ if(entry1 && entry2){
+ /* Put "Any" states at the bottom. (Strong)*/
+ if(entry1->from == tsk_fsm_state_any){
+ return -20;
+ }
+ else if(entry2->from == tsk_fsm_state_any){
+ return +20;
+ }
+
+ /* Put "Any" actions at the bottom. (Weak)*/
+ if(entry1->action == tsk_fsm_action_any){
+ return -10;
+ }
+ else if(entry1->action == tsk_fsm_action_any){
+ return +10;
+ }
+ }
+ return 0;
+}
+
+static const tsk_object_def_t tsk_fsm_entry_def_s =
+{
+ sizeof(tsk_fsm_entry_t),
+ tsk_fsm_entry_ctor,
+ tsk_fsm_entry_dtor,
+ tsk_fsm_entry_cmp,
+};
+const tsk_object_def_t *tsk_fsm_entry_def_t = &tsk_fsm_entry_def_s;
diff --git a/tinySAK/src/tsk_fsm.h b/tinySAK/src/tsk_fsm.h
new file mode 100644
index 0000000..b7639aa
--- /dev/null
+++ b/tinySAK/src/tsk_fsm.h
@@ -0,0 +1,178 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_fsm.h
+ * @brief Finite-state machine (FSM) implementation.
+ * @sa http://en.wikipedia.org/wiki/Finite-state_machine.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_FSM_H_
+#define _TINYSAK_FSM_H_
+
+#include "tinysak_config.h"
+#include "tsk_list.h"
+#include "tsk_safeobj.h"
+
+/**@ingroup tsk_fsm_group
+* @def TSK_FSM_ONTERMINATED
+*/
+
+TSK_BEGIN_DECLS
+
+#define TSK_FSM_ONTERMINATED_F(self) (tsk_fsm_onterminated_f)(self)
+
+/**@ingroup tsk_fsm_group
+* @def tsk_fsm_state_any
+*/
+/**@ingroup tsk_fsm_group
+* @def tsk_fsm_state_default
+*/
+/**@ingroup tsk_fsm_group
+* @def tsk_fsm_state_none
+*/
+/**@ingroup tsk_fsm_group
+* @def tsk_fsm_state_final
+*/
+#define tsk_fsm_state_any -0xFFFF
+#define tsk_fsm_state_default -0xFFF0
+#define tsk_fsm_state_none -0xFF00
+#define tsk_fsm_state_final -0xF000
+
+/**@ingroup tsk_fsm_group
+* @def tsk_fsm_action_any
+*/
+#define tsk_fsm_action_any -0xFFFF
+
+/**@ingroup tsk_fsm_group
+* @def tsk_fsm_state_id_t
+*/
+/**@ingroup tsk_fsm_group
+* @def tsk_fsm_action_id_t
+*/
+/**@ingroup tsk_fsm_group
+* @def tsk_fsm_cond
+*/
+/**@ingroup tsk_fsm_group
+* @def tsk_fsm_exec
+*/
+/**@ingroup tsk_fsm_group
+* @def tsk_fsm_onterminated
+*/
+
+typedef int tsk_fsm_state_id;
+typedef int tsk_fsm_action_id;
+typedef tsk_bool_t (*tsk_fsm_cond)(const void*, const void*);
+typedef int (*tsk_fsm_exec)(va_list *app);
+typedef int (*tsk_fsm_onterminated_f)(const void*);
+
+
+/**@ingroup tsk_fsm_group
+* @def TSK_FSM_ADD
+*/
+/**@ingroup tsk_fsm_group
+* @def TSK_FSM_ADD_ALWAYS
+*/
+/**@ingroup tsk_fsm_group
+* @def TSK_FSM_ADD_NOTHING
+*/
+/**@ingroup tsk_fsm_group
+* @def TSK_FSM_ADD_ALWAYS_NOTHING
+*/
+/**@ingroup tsk_fsm_group
+* @def TSK_FSM_ADD_DEFAULT
+*/
+/**@ingroup tsk_fsm_group
+* @def TSK_FSM_ADD_NULL
+*/
+#define TSK_FSM_ADD(from, action, cond, to, exec, desc)\
+ 1,\
+ (tsk_fsm_state_id)from, \
+ (tsk_fsm_action_id)action, \
+ (tsk_fsm_cond)cond, \
+ (tsk_fsm_state_id)to, \
+ (tsk_fsm_exec)exec, \
+ (const char*)desc
+#define TSK_FSM_ADD_ALWAYS(from, action, to, exec, desc) TSK_FSM_ADD(from, action, tsk_fsm_cond_always, to, exec, desc)
+#define TSK_FSM_ADD_NOTHING(from, action, cond, desc) TSK_FSM_ADD(from, action, cond, from, tsk_fsm_exec_nothing, desc)
+#define TSK_FSM_ADD_ALWAYS_NOTHING(from, desc) TSK_FSM_ADD(from, tsk_fsm_action_any, tsk_fsm_cond_always, from, tsk_fsm_exec_nothing, desc)
+#define TSK_FSM_ADD_DEFAULT()
+#define TSK_FSM_ADD_NULL()\
+ tsk_null
+
+/**@ingroup tsk_fsm_group
+* FSM entry.
+*/
+typedef struct tsk_fsm_entry_s
+{
+ TSK_DECLARE_OBJECT;
+
+ tsk_fsm_state_id from;
+ tsk_fsm_action_id action;
+ tsk_fsm_cond cond;
+ tsk_fsm_state_id to;
+ tsk_fsm_exec exec;
+ const char* desc;
+}
+tsk_fsm_entry_t;
+
+/**@ingroup tsk_fsm_group
+* List of @ref tsk_fsm_entry_t elements.
+*/
+typedef tsk_list_t tsk_fsm_entries_L_t;
+
+/**@ingroup tsk_fsm_group
+* FSM.
+*/
+typedef struct tsk_fsm_s
+{
+ TSK_DECLARE_OBJECT;
+
+ unsigned debug:1;
+ tsk_fsm_state_id current;
+ tsk_fsm_state_id term;
+ tsk_fsm_entries_L_t* entries;
+
+ tsk_fsm_onterminated_f callback_term;
+ const void* callback_data;
+
+ TSK_DECLARE_SAFEOBJ;
+}
+tsk_fsm_t;
+
+TINYSAK_API tsk_fsm_t* tsk_fsm_create(tsk_fsm_state_id state_curr, tsk_fsm_state_id state_term);
+
+TINYSAK_API int tsk_fsm_exec_nothing(va_list *app);
+TINYSAK_API tsk_bool_t tsk_fsm_cond_always(const void*, const void*);
+TINYSAK_API int tsk_fsm_set(tsk_fsm_t* self, ...);
+TINYSAK_API int tsk_fsm_set_callback_terminated(tsk_fsm_t* self, tsk_fsm_onterminated_f callback, const void* callbackdata);
+TINYSAK_API int tsk_fsm_act(tsk_fsm_t* self, tsk_fsm_action_id action, const void* cond_data1, const void* cond_data2, ...);
+TINYSAK_API tsk_bool_t tsk_fsm_terminated(tsk_fsm_t* self);
+
+TINYSAK_GEXTERN const tsk_object_def_t *tsk_fsm_def_t;
+TINYSAK_GEXTERN const tsk_object_def_t *tsk_fsm_entry_def_t;
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_FSM_H_ */
diff --git a/tinySAK/src/tsk_hmac.c b/tinySAK/src/tsk_hmac.c
new file mode 100644
index 0000000..5e30d21
--- /dev/null
+++ b/tinySAK/src/tsk_hmac.c
@@ -0,0 +1,226 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_hmac.c
+ * @brief HMAC: Keyed-Hashing for Message Authentication (RFC 2104) / FIPS-198-1.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tsk_hmac.h"
+
+#include "tsk_string.h"
+#include "tsk_buffer.h"
+
+#include <string.h>
+
+/**@defgroup tsk_hmac_group Keyed-Hashing for Message Authentication (RFC 2104/ FIPS-198-1).
+*/
+
+/**@ingroup tsk_hmac_group
+*/
+typedef enum tsk_hash_type_e { md5, sha1 } tsk_hash_type_t;
+
+int tsk_hmac_xxxcompute(const uint8_t* input, tsk_size_t input_size, const char* key, tsk_size_t key_size, tsk_hash_type_t type, uint8_t* digest)
+{
+#define TSK_MAX_BLOCK_SIZE TSK_SHA1_BLOCK_SIZE
+
+ tsk_size_t i, newkey_size;
+
+ tsk_size_t block_size = type == md5 ? TSK_MD5_BLOCK_SIZE : TSK_SHA1_BLOCK_SIZE; // Only SHA-1 and MD5 are supported for now
+ tsk_size_t digest_size = type == md5 ? TSK_MD5_DIGEST_SIZE : TSK_SHA1_DIGEST_SIZE;
+ char hkey [TSK_MAX_BLOCK_SIZE];
+
+ uint8_t ipad [TSK_MAX_BLOCK_SIZE];
+ uint8_t opad [TSK_MAX_BLOCK_SIZE];
+
+
+ memset(ipad, 0, sizeof(ipad));
+ memset(opad, 0, sizeof(ipad));
+
+ /*
+ * H(K XOR opad, H(K XOR ipad, input))
+ */
+
+ // Check key len
+ if (key_size > block_size){
+ if(type == md5){
+ TSK_MD5_DIGEST_CALC(key, key_size, (uint8_t*)hkey);
+ }
+ else if(type == sha1){
+ TSK_SHA1_DIGEST_CALC((uint8_t*)key, key_size, hkey);
+ }
+ else return -3;
+
+ newkey_size = digest_size;
+ }
+ else{
+ memcpy(hkey, key, key_size);
+ newkey_size = key_size;
+ }
+
+ memcpy(ipad, hkey, newkey_size);
+ memcpy(opad, hkey, newkey_size);
+
+ /* [K XOR ipad] and [K XOR opad]*/
+ for (i=0; i<block_size; i++){
+ ipad[i] ^= 0x36;
+ opad[i] ^= 0x5c;
+ }
+
+
+ {
+ tsk_buffer_t *passx; // pass1 or pass2
+ int pass1_done = 0;
+
+ passx = tsk_buffer_create(ipad, block_size); // pass1
+ tsk_buffer_append(passx, input, input_size);
+
+digest_compute:
+ if(type == md5){
+ TSK_MD5_DIGEST_CALC(TSK_BUFFER_TO_U8(passx), TSK_BUFFER_SIZE(passx), digest);
+ }
+ else{
+ TSK_SHA1_DIGEST_CALC(TSK_BUFFER_TO_U8(passx), TSK_BUFFER_SIZE(passx), (char*)digest);
+ }
+
+ if(pass1_done){
+ TSK_OBJECT_SAFE_FREE(passx);
+ goto pass1_and_pass2_done;
+ }
+ else{
+ pass1_done = 1;
+ }
+
+ tsk_buffer_cleanup(passx);
+ tsk_buffer_append(passx, opad, block_size); // pass2
+ tsk_buffer_append(passx, digest, digest_size);
+
+ goto digest_compute;
+ }
+
+pass1_and_pass2_done:
+
+ return 0;
+}
+
+
+/**@ingroup tsk_hmac_group
+ *
+ * Calculate HMAC-MD5 hash (hexa-string) as per RFC 2104.
+ *
+ * @author Mamadou
+ * @date 12/29/2009
+ *
+ * @param [in,out] input The input data.
+ * @param input_size The size of the input.
+ * @param [in,out] key The input key.
+ * @param key_size The size of the input key.
+ * @param [out] result Pointer to the result.
+ *
+ * @return Zero if succeed and non-zero error code otherwise.
+**/
+int hmac_md5_compute(const uint8_t* input, tsk_size_t input_size, const char* key, tsk_size_t key_size, tsk_md5string_t *result)
+{
+ tsk_md5digest_t digest;
+ int ret;
+
+ if((ret = hmac_md5digest_compute(input, input_size, key, key_size, digest))){
+ return ret;
+ }
+ tsk_str_from_hex(digest, TSK_MD5_DIGEST_SIZE, *result);
+ (*result)[TSK_MD5_STRING_SIZE] = '\0';
+
+ return 0;
+}
+
+
+/**@ingroup tsk_hmac_group
+ *
+ * Calculate HMAC-MD5 hash (bytes) as per RFC 2104.
+ *
+ * @author Mamadou
+ * @date 12/29/2009
+ *
+ * @param [in,out] input The input data.
+ * @param input_size The Size of the input.
+ * @param [in,out] key The input key.
+ * @param key_size The size of the input key.
+ * @param result Pointer to the result.
+ *
+ * @return Zero if succeed and non-zero error code otherwise.
+**/
+int hmac_md5digest_compute(const uint8_t* input, tsk_size_t input_size, const char* key, tsk_size_t key_size, tsk_md5digest_t result)
+{
+ return tsk_hmac_xxxcompute(input, input_size, key, key_size, md5, result);
+}
+
+/**@ingroup tsk_hmac_group
+ *
+ * Calculate HMAC-SHA-1 hash (hexa-string) as per RFC 2104.
+ *
+ * @author Mamadou
+ * @date 12/29/2009
+ *
+ * @param [in,out] input The input data.
+ * @param input_size The Size of the input.
+ * @param [in,out] key The input key.
+ * @param key_size The size of the input key.
+ * @param [out] result Pointer to the result.
+ *
+ * @return Zero if succeed and non-zero error code otherwise.
+**/
+int hmac_sha1_compute(const uint8_t* input, tsk_size_t input_size, const char* key, tsk_size_t key_size, tsk_sha1string_t *result)
+{
+ tsk_sha1digest_t digest;
+ int ret;
+
+ if((ret = hmac_sha1digest_compute(input, input_size, key, key_size, digest))){
+ return ret;
+ }
+ tsk_str_from_hex((uint8_t*)digest, TSK_SHA1_DIGEST_SIZE, *result);
+ (*result)[TSK_SHA1_STRING_SIZE] = '\0';
+
+ return 0;
+}
+
+/**@ingroup tsk_hmac_group
+ *
+ * Calculate HMAC-SHA-1 hash (bytes) as per RFC 2104.
+ *
+ * @author Mamadou
+ * @date 12/29/2009
+ *
+ * @param [in,out] input If non-null, the input.
+ * @param input_size The size of the input.
+ * @param [in,out] key The input key.
+ * @param key_size The size of the input key.
+ * @param result Pointer to the result.
+ *
+ * @return Zero if succeed and non-zero error code otherwise.
+**/
+int hmac_sha1digest_compute(const uint8_t* input, tsk_size_t input_size, const char* key, tsk_size_t key_size, tsk_sha1digest_t result)
+{
+ return tsk_hmac_xxxcompute(input, input_size, key, key_size, sha1, (uint8_t*)result);
+}
+
diff --git a/tinySAK/src/tsk_hmac.h b/tinySAK/src/tsk_hmac.h
new file mode 100644
index 0000000..e680ee6
--- /dev/null
+++ b/tinySAK/src/tsk_hmac.h
@@ -0,0 +1,49 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_hmac.h
+ * @brief HMAC: Keyed-Hashing for Message Authentication (RFC 2104) / FIPS-198-1.
+ * HMAC-MD5 and HMAC-SHA-1 are also implemented.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_HMAC_H_
+#define _TINYSAK_HMAC_H_
+
+#include "tinysak_config.h"
+
+#include "tsk_sha1.h"
+#include "tsk_md5.h"
+
+TSK_BEGIN_DECLS
+
+TINYSAK_API int hmac_md5_compute(const uint8_t* input, tsk_size_t input_size, const char* key, tsk_size_t key_size, tsk_md5string_t *result);
+TINYSAK_API int hmac_md5digest_compute(const uint8_t* input, tsk_size_t input_size, const char* key, tsk_size_t key_size, tsk_md5digest_t result);
+
+TINYSAK_API int hmac_sha1_compute(const uint8_t* input, tsk_size_t input_size, const char* key, tsk_size_t key_size, tsk_sha1string_t *result);
+TINYSAK_API int hmac_sha1digest_compute(const uint8_t* input, tsk_size_t input_size, const char* key, tsk_size_t key_size, tsk_sha1digest_t result);
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_HMAC_H_ */
diff --git a/tinySAK/src/tsk_list.c b/tinySAK/src/tsk_list.c
new file mode 100644
index 0000000..d441bfc
--- /dev/null
+++ b/tinySAK/src/tsk_list.c
@@ -0,0 +1,604 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_list.c
+ * @brief Linked list.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tsk_list.h"
+#include "tsk_memory.h"
+#include "tsk_debug.h"
+
+//#include <assert.h>
+#include <string.h>
+
+// FIXME: remove asserts
+
+/**@defgroup tsk_list_group Linked list.
+* For more information about linked list you can visit http://en.wikipedia.org/wiki/Linked_list.
+*/
+
+/** tsk_list_find_by_item
+*/
+static int tsk_list_find_by_item(const tsk_list_item_t* item, const void* _item)
+{
+ return (item == (const tsk_list_item_t*)_item) ? 0 : -1;
+}
+
+/**@ingroup tsk_list_group
+* Creates a linked list object.
+* You MUST use @ref TSK_OBJECT_SAFE_FREE() to safely free the object.
+*/
+tsk_list_t* tsk_list_create()
+{
+ return tsk_object_new(tsk_list_def_t);
+}
+
+/**@ingroup tsk_list_group
+* Create and initialize an item to be added to a linked list.
+* You MUST use @ref TSK_OBJECT_SAFE_FREE() to safely free the object.
+*/
+tsk_list_item_t* tsk_list_item_create()
+{
+ return tsk_object_new(tsk_list_item_def_t);
+}
+
+/**@ingroup tsk_list_group
+* Locks the list to avoid concurrent access. The list should be unlocked using
+* @ref tsk_list_unlock.
+* @param list The list to lock.
+* @retval zero if succeed and non-zero error code otherwise.
+* @sa @ref tsk_list_unlock
+*/
+int tsk_list_lock(tsk_list_t* list)
+{
+ if(list){
+ if(!list->mutex){
+ list->mutex = tsk_mutex_create();
+ }
+ return tsk_mutex_lock(list->mutex);
+ }
+ else{
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+}
+
+/**@ingroup tsk_list_group
+* UnLocks a previously locked list.
+* @param list The list to unlock.
+* @retval zero if succeed and non-zero error code otherwise.
+* @sa @ref tsk_list_lock
+*/
+int tsk_list_unlock(tsk_list_t* list)
+{
+ if(list && list->mutex){
+ return tsk_mutex_unlock(list->mutex);
+ }
+ else{
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+}
+
+/**@ingroup tsk_list_group
+* Remove an free an item from the @a list.
+* @param list the list from which to remove the @a item.
+* @param item the item to remove (and free) from the @a list.
+*/
+void tsk_list_remove_item(tsk_list_t* list, tsk_list_item_t* item)
+{
+ tsk_list_remove_item_by_pred(list, tsk_list_find_by_item, (const void*)item);
+}
+
+/**@ingroup tsk_list_group
+* Pops an object from the @a list.
+* @param list The list from which to pop the object.
+* @param tskobj Any valid object(declared using @ref TSK_DECLARE_OBJECT) to remove.
+* @retval The item.
+*/
+tsk_list_item_t* tsk_list_pop_item_by_data(tsk_list_t* list, const tsk_object_t * tskobj)
+{
+ if(list){
+ tsk_list_item_t *prev = tsk_null;
+ tsk_list_item_t *curr = prev = list->head;
+
+ while(curr){
+ if(!tsk_object_cmp(curr->data, tskobj)){
+ if(prev == curr){
+ /* Found at first position. */
+ if(list->head == list->tail){
+ /* There was only one item */
+ list->head = list->tail = tsk_null;
+ }
+ else{
+ list->head = curr->next;
+ }
+ }
+ else {
+ if(curr == list->tail){
+ /* Found at last position */
+ list->tail = prev;
+ list->tail->next = tsk_null;
+ }
+ else{
+ prev->next = curr->next;
+ }
+ }
+
+ return curr;
+ }
+
+ prev = curr;
+ curr = curr->next;
+ }
+ }
+
+ return 0;
+}
+
+/**@ingroup tsk_list_group
+* Removes an object from the @a list.
+* @param list The list from which to remove the object.
+* @param tskobj Any valid object(declared using @ref TSK_DECLARE_OBJECT) to remove.
+*/
+void tsk_list_remove_item_by_data(tsk_list_t* list, const tsk_object_t * tskobj)
+{
+ tsk_list_item_t* item;
+ if((item = tsk_list_pop_item_by_data(list, tskobj))){
+ tsk_object_unref(item);
+ }
+}
+
+/**@ingroup tsk_list_group
+* Pops an item from the @a list using a predicate function.
+* @param list The list from which to pop the item.
+* @param predicate The predicate function used to match the item.
+* @param data Arbitrary data to pass to the predicate function.
+* @retval The item
+*/
+tsk_list_item_t* tsk_list_pop_item_by_pred(tsk_list_t* list, tsk_list_func_predicate predicate, const void * data)
+{
+ if(list){
+ tsk_list_item_t *prev = tsk_null;
+ tsk_list_item_t *curr = prev = list->head;
+
+ while(curr){
+ if(!predicate(curr, data)){
+ if(prev == curr){
+ /* Found at first position. */
+ if(list->head == list->tail){
+ /* There was only one item */
+ list->head = list->tail = tsk_null;
+ }
+ else{
+ list->head = curr->next;
+ }
+ }
+ else {
+ if(curr == list->tail){
+ /* Found at last position */
+ list->tail = prev;
+ list->tail->next = tsk_null;
+ }
+ else{
+ prev->next = curr->next;
+ }
+ }
+
+ return curr;
+ }
+
+ prev = curr;
+ curr = curr->next;
+ }
+ }
+
+ return 0;
+}
+
+/**@ingroup tsk_list_group
+* Removes an item from the @a list using a predicate function.
+* @param list The list from which to remove the item.
+* @param predicate The predicate function used to match the item.
+* @param data Arbitrary data to pass to the predicate function.
+*/
+void tsk_list_remove_item_by_pred(tsk_list_t* list, tsk_list_func_predicate predicate, const void * data)
+{
+ tsk_list_item_t* item;
+ if((item = tsk_list_pop_item_by_pred(list, predicate, data))){
+ tsk_object_unref(item);
+ }
+}
+
+/**@ingroup tsk_list_group
+* Clean up and remove all items from the @a list.
+* @param list The list ro clean up.
+*/
+void tsk_list_clear_items(tsk_list_t* list)
+{
+ if(list){
+ tsk_list_item_t* next = tsk_null;
+ tsk_list_item_t* curr = list->head;
+
+ while(curr){
+ next = curr->next;
+ tsk_object_unref(curr);
+ curr = next;
+ }
+ list->head = tsk_null;
+ list->tail = tsk_null;
+ }
+}
+
+/**@ingroup tsk_list_group
+* Pops first item from the @a list. The item will be definitely removed from the list.
+* @param list The list from which to pop the item.
+* @retval The first item. It is up to you to free the returned item (@ref TSK_OBJECT_SAFE_FREE(item)).
+*/
+tsk_list_item_t* tsk_list_pop_first_item(tsk_list_t* list)
+{
+ tsk_list_item_t* item = tsk_null;
+ if(list){
+ item = list->head;
+ if(list->head){
+ if(list->head->next){
+ list->head = list->head->next;
+ }
+ else{
+ list->head = list->tail = tsk_null;
+ }
+ }
+ }
+
+ return item;
+}
+
+/**@ingroup tsk_list_group
+* Add an item to the @a list.
+* @param list The destination @a list.
+* @param item The @a item to add.
+* @param back Indicates whether to put the item back or not.
+*/
+void tsk_list_push_item(tsk_list_t* list, tsk_list_item_t** item, tsk_bool_t back)
+{
+ // do not test
+ tsk_bool_t first = !list->head;
+
+ if(back && list->tail){
+ list->tail->next = *item, list->tail = *item, (*item)->next = tsk_null;
+ }
+ else {
+ (*item)->next = list->head, list->head = *item;
+ }
+
+ if(first){
+ list->tail = list->head = *item, list->tail->next = tsk_null;
+ }
+ (*item) = tsk_null;
+}
+
+/**@ingroup tsk_list_group
+* Add an item to the list in ascending or descending order.
+* @param list The destination @a list.
+* @param item The @a item to add.
+* @param ascending Indicates whether to put the @a item in ascending order or not.
+*/
+void tsk_list_push_filtered_item(tsk_list_t* list, tsk_list_item_t** item, tsk_bool_t ascending)
+{
+ if(list)
+ {
+ tsk_list_item_t *prev = tsk_null;
+ tsk_list_item_t *curr = prev = list->head;
+
+ while(curr)
+ {
+ int diff = tsk_object_cmp((*item), curr);
+ if((diff </*=*/ 0 && ascending) || (diff >/*=*/0 && !ascending)){
+ if(curr == list->head){
+ tsk_list_push_front_item(list, item);
+ }
+ else{
+ (*item)->next = curr;
+ prev->next = (*item);
+ }
+
+ return;
+ }
+
+ prev = curr;
+ curr = curr->next;
+ }
+
+ tsk_list_push_back_item(list, item);
+ }
+}
+
+/**@ingroup tsk_list_group
+* Add all items in @a src into @a dest.
+* @param dest The destination list.
+* @param src The source list.
+* @param back Indicates whether to put the list back or not.
+**/
+int tsk_list_push_list(tsk_list_t* dest, const tsk_list_t* src, tsk_bool_t back)
+{
+ const tsk_list_item_t* curr = (src)->head;
+ tsk_object_t* copy;
+
+ if(!dest || !src){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+
+ while(curr){
+ copy = tsk_object_ref(curr->data);
+ tsk_list_push_data(dest, (void**)&copy, back);
+
+ curr = curr->next;
+ }
+ return 0;
+}
+
+/**@ingroup tsk_list_group
+* Add an opaque data to the @a list.
+* @param list The destination @a list.
+* @param data The @a data to add.
+* @param back Indicates whether to put the item back or not.
+*/
+int tsk_list_push_data(tsk_list_t* list, void** data, tsk_bool_t back)
+{
+ if(list && data && *data){
+ tsk_list_item_t *item = tsk_list_item_create();
+ item->data = *data;
+
+ tsk_list_push_item(list, &item, back);
+ (*data) = tsk_null;
+
+ return 0;
+ }
+ else{
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+}
+
+/**@ingroup tsk_list_group
+* Add an opaque data to the list in ascending or descending order.
+* @param list The destination @a list.
+* @param data The @a data to add.
+* @param ascending Indicates whether to put the @a data in ascending order or not.
+*/
+int tsk_list_push_filtered_data(tsk_list_t* list, void** data, tsk_bool_t ascending)
+{
+ if(list && data && *data){
+ tsk_list_item_t *item = tsk_list_item_create();
+ item->data = *data;
+
+ tsk_list_push_filtered_item(list, &item, ascending);
+ (*data) = tsk_null;
+
+ return 0;
+ }
+ else{
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+}
+
+/**@ingroup tsk_list_group
+* Find an item from a list.
+* @param list The @a list holding the item.
+* @param tskobj The @a object to find.
+* @retval A @ref tsk_list_item_t item if found and NULL otherwize.
+*/
+const tsk_list_item_t* tsk_list_find_item_by_data(const tsk_list_t* list, const tsk_object_t* tskobj)
+{
+ if(list && tskobj){
+ tsk_list_item_t *item;
+ tsk_list_foreach(item, list){
+ if(!tsk_object_cmp(item->data, tskobj)){
+ return item;
+ }
+ }
+ }
+
+ return 0;
+}
+
+/**@ingroup tsk_list_group
+* Find first item matching criteria defined by the @a predicate.
+* @param list the list to query
+* @param predicate the predicate against which to test each item
+* @param data data passed to the predicate function for comparaison
+* @retval the item which match the criteria and NULL otherwise
+* @sa @ref tsk_list_find_item_by_data
+*/
+const tsk_list_item_t* tsk_list_find_item_by_pred(const tsk_list_t* list, tsk_list_func_predicate predicate, const void* data)
+{
+ if(predicate){
+ const tsk_list_item_t *item;
+ tsk_list_foreach(item, list){
+ if(!predicate(item, data)){
+ return item;
+ }
+ }
+ }
+ else{
+ TSK_DEBUG_WARN("Cannot use an uninitialized predicate function");
+ }
+ return tsk_null;
+}
+
+/**@ingroup tsk_list_group
+* Find first item matching criteria defined by the @a predicate.
+* @param list the list to query
+* @param predicate the predicate against which to test each item
+* @param data data passed to the predicate function for comparaison
+* @retval the data holded by the item which match the criteria and NULL otherwise
+* @sa @ref tsk_list_find_item_by_pred
+*/
+const tsk_object_t* tsk_list_find_object_by_pred(const tsk_list_t* list, tsk_list_func_predicate predicate, const void* data)
+{
+ const tsk_list_item_t *item;
+ if((item = tsk_list_find_item_by_pred(list, predicate, data))){
+ return item->data;
+ }
+ else{
+ return tsk_null;
+ }
+}
+
+/**@ingroup tsk_list_group
+* Counts the number of item matching the predicate.
+* @param list The list containing the items to count
+* @param predicate The predicate to use to match the items
+* @param data Data passed to the predicate function for comparaison
+* @retval The number of item matching the predicate
+*/
+tsk_size_t tsk_list_count(const tsk_list_t* list, tsk_list_func_predicate predicate, const void* data)
+{
+ tsk_size_t count = 0;
+ if(predicate && list){
+ const tsk_list_item_t *item;
+ tsk_list_foreach(item, list){
+ if(!predicate(item, data)){
+ ++count;
+ }
+ }
+ }
+ else{
+ TSK_DEBUG_ERROR("Invalid parameter");
+ }
+
+ return count;
+}
+
+
+
+
+
+
+
+
+
+
+
+//=================================================================================================
+// Item object definition
+//
+static tsk_object_t* tsk_list_item_ctor(tsk_object_t * self, va_list * app)
+{
+ tsk_list_item_t *item = self;
+ if(item){
+ }
+ return self;
+}
+
+static tsk_object_t* tsk_list_item_dtor(tsk_object_t *self)
+{
+ tsk_list_item_t *item = self;
+ if(item){
+ item->data = tsk_object_unref(item->data);
+ }
+ else{
+ TSK_DEBUG_WARN("Cannot free an uninitialized item");
+ }
+ return item;
+}
+
+static int tsk_list_item_cmp(const tsk_object_t *_item1, const tsk_object_t *_item2)
+{
+ const tsk_list_item_t* item1 = _item1;
+ const tsk_list_item_t* item2 = _item2;
+
+ if(item1 && item2){
+ return tsk_object_cmp(item1->data, item2->data);
+ }
+ else return -1;
+}
+
+static const tsk_object_def_t tsk_list_item_def_s =
+{
+ sizeof(tsk_list_item_t),
+ tsk_list_item_ctor,
+ tsk_list_item_dtor,
+ tsk_list_item_cmp,
+};
+const tsk_object_def_t *tsk_list_item_def_t = &tsk_list_item_def_s;
+
+//=================================================================================================
+// List object definition
+//
+static tsk_object_t* tsk_list_ctor(tsk_object_t *self, va_list *app)
+{
+ tsk_list_t *list = self;
+ if(list){
+ }
+
+ return self;
+}
+
+static tsk_object_t* tsk_list_dtor(tsk_object_t *self)
+{
+ tsk_list_t *list = self;
+ if(list){
+#if 0
+ /* Not thread-safe */
+ tsk_list_item_t* next = tsk_null;
+ tsk_list_item_t* curr = list->head;
+
+ while(curr){
+ next = curr->next;
+ /*curr =*/ tsk_object_unref(curr);
+ curr = next;
+ }
+#else
+ /* Thread-safe method */
+ tsk_list_item_t* item;
+ while((item = tsk_list_pop_first_item(list))){
+ tsk_object_unref(item);
+ }
+#endif
+
+ /* destroy the on-demand mutex */
+ if(list->mutex){
+ tsk_mutex_destroy(&list->mutex);
+ }
+ }
+ else{
+ TSK_DEBUG_WARN("Cannot free an uninitialized list");
+ }
+ return list;
+}
+
+static const tsk_object_def_t tsk_list_def_s =
+{
+ sizeof(tsk_list_t),
+ tsk_list_ctor,
+ tsk_list_dtor,
+ tsk_null,
+};
+const tsk_object_def_t *tsk_list_def_t = &tsk_list_def_s;
+
diff --git a/tinySAK/src/tsk_list.h b/tinySAK/src/tsk_list.h
new file mode 100644
index 0000000..9e2c5b8
--- /dev/null
+++ b/tinySAK/src/tsk_list.h
@@ -0,0 +1,135 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_list.h
+ * @brief Linked list. For more information about linked list you can visit http://en.wikipedia.org/wiki/Linked_list.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_LIST_H_
+#define _TINYSAK_LIST_H_
+
+#include "tinysak_config.h"
+#include "tsk_mutex.h"
+#include "tsk_object.h"
+
+TSK_BEGIN_DECLS
+
+/**@ingroup tsk_list_group
+* Check if the the linked list is empty or not.
+* This function will fail if the list is NULL.
+*/
+#define TSK_LIST_IS_EMPTY(self) ((self) ? (!(self)->head) : tsk_true)
+
+#define TSK_LIST_IS_FIRST(self, item) ((self) ? ((self)->head == item) : tsk_false)
+#define TSK_LIST_IS_LAST(self, item) ((self) ? ((self)->tail == item) : tsk_false)
+
+#define TSK_LIST_FIRST_DATA(self) (((self) && (self)->head) ? (self)->head->data : tsk_null)
+
+/**@ingroup tsk_list_group
+* Item for linked list.
+*/
+typedef struct tsk_list_item_s
+{
+ TSK_DECLARE_OBJECT;
+ void* data; /**< Opaque data. */
+ struct tsk_list_item_s* next; /**< Next item. */
+}
+tsk_list_item_t;
+
+/**@ingroup tsk_list_group
+* Linked list.
+*/
+typedef struct tsk_list_s
+{
+ TSK_DECLARE_OBJECT;
+
+ tsk_list_item_t* head; /**< The head of the linked list. */
+ tsk_list_item_t* tail; /**< The tail of the linked list. */
+ tsk_mutex_handle_t* mutex; /**< on-demand mutex. */
+}
+tsk_list_t;
+
+/**@ingroup tsk_list_group
+* Function predicate used to match an item.
+* @param item The current item to match.
+* @param data Arbitrary data holding the object to compare.
+* @retval 0 if match and <0 if first<second and >0 otherwise
+*/
+typedef int (*tsk_list_func_predicate)(const tsk_list_item_t* item, const void* data);
+
+
+/**@ingroup tsk_list_group
+* Loop through the linked list.
+* @param item The current item.
+* @param list Pointer to the list for which we want to get items.
+*
+*/
+#define tsk_list_foreach(item, list) for(item = list ? list->head : tsk_null; item; item = item->next)
+
+TINYSAK_API tsk_list_t* tsk_list_create();
+TINYSAK_API tsk_list_item_t* tsk_list_item_create();
+
+TINYSAK_API int tsk_list_lock(tsk_list_t* list);
+TINYSAK_API int tsk_list_unlock(tsk_list_t* list);
+
+TINYSAK_API void tsk_list_remove_item(tsk_list_t* list, tsk_list_item_t* item);
+TINYSAK_API tsk_list_item_t* tsk_list_pop_item_by_data(tsk_list_t* list, const tsk_object_t * tskobj);
+TINYSAK_API void tsk_list_remove_item_by_data(tsk_list_t* list, const tsk_object_t * tskobj);
+TINYSAK_API void tsk_list_remove_item_by_pred(tsk_list_t* list, tsk_list_func_predicate predicate, const void * data);
+TINYSAK_API tsk_list_item_t* tsk_list_pop_item_by_pred(tsk_list_t* list, tsk_list_func_predicate predicate, const void * data);
+TINYSAK_API void tsk_list_clear_items(tsk_list_t* list);
+
+TINYSAK_API tsk_list_item_t* tsk_list_pop_first_item(tsk_list_t* list);
+TINYSAK_API void tsk_list_push_item(tsk_list_t* list, tsk_list_item_t** item, tsk_bool_t back);
+#define tsk_list_push_back_item(list, item) tsk_list_push_item(list, item, tsk_true)
+#define tsk_list_push_front_item(list, item) tsk_list_push_item(list, item, tsk_false)
+TINYSAK_API void tsk_list_push_filtered_item(tsk_list_t* list, tsk_list_item_t** item, tsk_bool_t ascending);
+#define tsk_list_push_ascending_item(list, item) tsk_list_pushfiltered_item(list, item, tsk_true)
+#define tsk_list_push_descending_item(list, item) tsk_list_pushfiltered_item(list, item, tsk_false)
+
+TINYSAK_API int tsk_list_push_list(tsk_list_t* destination, const tsk_list_t* source, tsk_bool_t back);
+#define tsk_list_pushback_list(destination, source) tsk_list_push_list(destination, source, tsk_true)
+#define tsk_list_pushfront_list(destination, source) tsk_list_push_list(destination, source, tsk_false)
+
+TINYSAK_API int tsk_list_push_data(tsk_list_t* list, void** data, tsk_bool_t back);
+#define tsk_list_push_back_data(list, data) tsk_list_push_data(list, data, tsk_true)
+#define tsk_list_push_front_data(list, data) tsk_list_push_data(list, data, tsk_false)
+TINYSAK_API int tsk_list_push_filtered_data(tsk_list_t* list, void** data, tsk_bool_t ascending);
+#define tsk_list_push_ascending_data(list, data) tsk_list_push_filtered_data(list, data, tsk_true)
+#define tsk_list_push_descending_data(list, data) tsk_list_push_filtered_data(list, data, tsk_false)
+
+TINYSAK_API const tsk_list_item_t* tsk_list_find_item_by_data(const tsk_list_t* list, const tsk_object_t * tskobj);
+TINYSAK_API const tsk_list_item_t* tsk_list_find_item_by_pred(const tsk_list_t* list, tsk_list_func_predicate predicate, const void* data);
+TINYSAK_API const tsk_object_t* tsk_list_find_object_by_pred(const tsk_list_t* list, tsk_list_func_predicate predicate, const void* data);
+TINYSAK_API tsk_size_t tsk_list_count(const tsk_list_t* list, tsk_list_func_predicate predicate, const void* data);
+
+TINYSAK_GEXTERN const tsk_object_def_t *tsk_list_def_t;
+TINYSAK_GEXTERN const tsk_object_def_t *tsk_list_item_def_t;
+
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_LIST_H_ */
+
diff --git a/tinySAK/src/tsk_md5.c b/tinySAK/src/tsk_md5.c
new file mode 100644
index 0000000..111cc3c
--- /dev/null
+++ b/tinySAK/src/tsk_md5.c
@@ -0,0 +1,276 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_md5.c
+ * @brief Implements Message-Digest algorithm 5 (RFC 1321).
+ *
+ * @author Colin Plumb
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tsk_md5.h"
+
+#include "tsk_string.h"
+
+#include <string.h>
+
+/**@defgroup tsk_md5_group MD5 (RFC 1321) utility functions.
+ * The code in this file is a modified version of an implementation placed in the public domain by the following persons:
+ * @author Colin Plumb
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+*/
+
+/**@ingroup tsk_md5_group
+*/
+#if defined(_BIG_ENDIAN)
+void tsk_byteReverse(uint32_t *buf, unsigned words)
+{
+ uint8_t *p = (uint8_t *)buf;
+
+ do{
+ *buf++ = (uint32_t)((unsigned)p[3] << 8 | p[2]) << 16 |
+ ((unsigned)p[1] << 8 | p[0]);
+ p += 4;
+ }
+ while (--words);
+}
+#else
+#define tsk_byteReverse(buf,words) /* do nothing*/
+#endif
+
+/**@ingroup tsk_md5_group
+ * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
+ * initialization constants.
+ */
+void tsk_md5init(tsk_md5context_t *ctx)
+{
+ ctx->buf[0] = 0x67452301;
+ ctx->buf[1] = 0xefcdab89;
+ ctx->buf[2] = 0x98badcfe;
+ ctx->buf[3] = 0x10325476;
+
+ ctx->bytes[0] = 0;
+ ctx->bytes[1] = 0;
+}
+
+/**@ingroup tsk_md5_group
+ * Update context to reflect the concatenation of another buffer full
+ * of bytes.
+ */
+void tsk_md5update(tsk_md5context_t *ctx, uint8_t const *buf, tsk_size_t len)
+{
+ uint32_t t;
+
+ /* Update byte count */
+
+ t = ctx->bytes[0];
+ if ((ctx->bytes[0] = t + len) < t)
+ ctx->bytes[1]++; /* Carry from low to high */
+
+ t = 64 - (t & 0x3f); /* Space available in ctx->in (at least 1) */
+ if (t > len)
+ {
+ memcpy((uint8_t *)ctx->in + 64 - t, buf, len);
+ return ;
+ }
+ /* First chunk is an odd size */
+ memcpy((uint8_t *)ctx->in + 64 - t, buf, t);
+ tsk_byteReverse(ctx->in, 16);
+ tsk_md5transform(ctx->buf, ctx->in);
+ buf += t;
+ len -= t;
+
+ /* Process data in 64-byte chunks */
+ while (len >= 64)
+ {
+ memcpy(ctx->in, buf, 64);
+ tsk_byteReverse(ctx->in, 16);
+ tsk_md5transform(ctx->buf, ctx->in);
+ buf += 64;
+ len -= 64;
+ }
+
+ /* Handle any remaining bytes of data. */
+ memcpy(ctx->in, buf, len);
+}
+
+/**@ingroup tsk_md5_group
+ * Final wrapup - pad to 64-byte boundary with the bit pattern
+ * 1 0* (64-bit count of bits processed, MSB-first)
+ */
+void tsk_md5final(tsk_md5digest_t digest, tsk_md5context_t *ctx)
+{
+ int count = ctx->bytes[0] & 0x3f; /* Number of bytes in ctx->in */
+ uint8_t *p = (uint8_t *)ctx->in + count;
+
+ /* Set the first char of padding to 0x80. There is always room. */
+ *p++ = 0x80;
+
+ /* Bytes of padding needed to make 56 bytes (-8..55) */
+ count = 56 - 1 - count;
+
+ if (count < 0)
+ { /* Padding forces an extra block */
+ memset(p, 0, count + 8);
+ tsk_byteReverse(ctx->in, 16);
+ tsk_md5transform(ctx->buf, ctx->in);
+ p = (uint8_t *)ctx->in;
+ count = 56;
+ }
+ memset(p, 0, count);
+ tsk_byteReverse(ctx->in, 14);
+
+ /* Append length in bits and transform */
+ ctx->in[14] = ctx->bytes[0] << 3;
+ ctx->in[15] = ctx->bytes[1] << 3 | ctx->bytes[0] >> 29;
+ tsk_md5transform(ctx->buf, ctx->in);
+
+ tsk_byteReverse(ctx->buf, 4);
+ memcpy(digest, ctx->buf, 16);
+ memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
+}
+
+/* The four core functions - F1 is optimized somewhat */
+
+/* #define F1(x, y, z) (x & y | ~x & z) */
+#define F1(x, y, z) (z ^ (x & (y ^ z)))
+#define F2(x, y, z) F1(z, x, y)
+#define F3(x, y, z) (x ^ y ^ z)
+#define F4(x, y, z) (y ^ (x | ~z))
+
+/* This is the central step in the MD5 algorithm. */
+#define MD5STEP(f,w,x,y,z,in,s) \
+(w += f(x,y,z) + in, w = (w<<s | w>>(32-s)) + x)
+
+/**@ingroup tsk_md5_group
+ * The core of the MD5 algorithm, this alters an existing MD5 hash to
+ * reflect the addition of 16 longwords of new data. MD5Update blocks
+ * the data and converts bytes into longwords for this routine.
+ */
+void tsk_md5transform(uint32_t buf[4], uint32_t const in[TSK_MD5_DIGEST_SIZE])
+{
+ register uint32_t a, b, c, d;
+
+ a = buf[0];
+ b = buf[1];
+ c = buf[2];
+ d = buf[3];
+
+ MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7);
+ MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12);
+ MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17);
+ MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22);
+ MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7);
+ MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12);
+ MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17);
+ MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22);
+ MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7);
+ MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12);
+ MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17);
+ MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22);
+ MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7);
+ MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12);
+ MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17);
+ MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22);
+
+ MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5);
+ MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9);
+ MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14);
+ MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20);
+ MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5);
+ MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9);
+ MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14);
+ MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20);
+ MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5);
+ MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9);
+ MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14);
+ MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20);
+ MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5);
+ MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9);
+ MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14);
+ MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20);
+
+ MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4);
+ MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11);
+ MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16);
+ MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23);
+ MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4);
+ MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11);
+ MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16);
+ MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23);
+ MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4);
+ MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11);
+ MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16);
+ MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23);
+ MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4);
+ MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11);
+ MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16);
+ MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23);
+
+ MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6);
+ MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10);
+ MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15);
+ MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21);
+ MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6);
+ MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10);
+ MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15);
+ MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21);
+ MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6);
+ MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10);
+ MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15);
+ MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21);
+ MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6);
+ MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10);
+ MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15);
+ MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21);
+
+ buf[0] += a;
+ buf[1] += b;
+ buf[2] += c;
+ buf[3] += d;
+}
+
+
+/**@ingroup tsk_md5_group
+ *
+ * @brief Calculate MD5 HASH for @a input data.
+ *
+ * @param input The input data.
+ * @param size The size of the input data.
+ * @param result MD5 hash result as Hexadecimal string.
+ *
+ * @return Zero if succeed and non-zero error code otherwise.
+**/
+int tsk_md5compute(const char* input, tsk_size_t size, tsk_md5string_t *result)
+{
+ tsk_md5digest_t digest;
+
+ if(!result | !*result) return -1;
+
+ (*result)[TSK_MD5_STRING_SIZE] = '\0';
+
+ TSK_MD5_DIGEST_CALC(input, size, digest);
+ tsk_str_from_hex(digest, TSK_MD5_DIGEST_SIZE, *result);
+
+ return 0;
+}
diff --git a/tinySAK/src/tsk_md5.h b/tinySAK/src/tsk_md5.h
new file mode 100644
index 0000000..4bcd209
--- /dev/null
+++ b/tinySAK/src/tsk_md5.h
@@ -0,0 +1,94 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_md5.h
+ * @brief Implements Message-Digest algorithm 5 (RFC 1321).
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_MD5_H_
+#define _TINYSAK_MD5_H_
+
+#include "tinysak_config.h"
+
+TSK_BEGIN_DECLS
+
+/**@ingroup tsk_md5_group
+* @def TSK_MD5_DIGEST_SIZE
+*/
+/**@ingroup tsk_md5_group
+* @def TSK_MD5_BLOCK_SIZE
+*/
+/**@ingroup tsk_md5_group
+* @def TSK_MD5_EMPTY
+*/
+/**@ingroup tsk_md5_group
+* @def TSK_MD5_STRING_SIZE
+*/
+/**@ingroup tsk_md5_group
+* @def tsk_md5string_t
+*/
+/**@ingroup tsk_md5_group
+* @def tsk_md5digest_t
+*/
+/**@ingroup TSK_MD5_DIGEST_CALC
+* @def tsk_md5digest_t
+*/
+
+
+#define TSK_MD5_DIGEST_SIZE 16
+#define TSK_MD5_BLOCK_SIZE 64
+
+#define TSK_MD5_EMPTY "d41d8cd98f00b204e9800998ecf8427e"
+
+#define TSK_MD5_STRING_SIZE (TSK_MD5_DIGEST_SIZE*2)
+typedef char tsk_md5string_t[TSK_MD5_STRING_SIZE+1]; /**< Hexadecimal MD5 string. */
+typedef uint8_t tsk_md5digest_t[TSK_MD5_DIGEST_SIZE]; /**< MD5 digest bytes. */
+
+#define TSK_MD5_DIGEST_CALC(input, input_size, digest) \
+ { \
+ tsk_md5context_t ctx; \
+ tsk_md5init(&ctx); \
+ tsk_md5update(&ctx, (const uint8_t*)(input), (input_size)); \
+ tsk_md5final((digest), &ctx); \
+ }
+
+typedef struct tsk_md5context_s
+{
+ uint32_t buf[4];
+ uint32_t bytes[2];
+ uint32_t in[16];
+}
+tsk_md5context_t;
+
+TINYSAK_API void tsk_md5init(tsk_md5context_t *context);
+TINYSAK_API void tsk_md5update(tsk_md5context_t *context, uint8_t const *buf, tsk_size_t len);
+TINYSAK_API void tsk_md5final(tsk_md5digest_t digest, tsk_md5context_t *context);
+TINYSAK_API void tsk_md5transform(uint32_t buf[4], uint32_t const in[TSK_MD5_DIGEST_SIZE]);
+TINYSAK_API int tsk_md5compute(const char* input, tsk_size_t size, tsk_md5string_t *result);
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_MD5_H_ */
+
diff --git a/tinySAK/src/tsk_memory.c b/tinySAK/src/tsk_memory.c
new file mode 100644
index 0000000..4a5d29f
--- /dev/null
+++ b/tinySAK/src/tsk_memory.c
@@ -0,0 +1,124 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_memory.c
+ * @brief Useful memory management functions to handle memory.
+ * As I'm a lazy man, some definition come from <ahref="http://www.cplusplus.com">this website</a>
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tsk_memory.h"
+#include "tsk_debug.h"
+
+#include <stdarg.h>
+#include <ctype.h>
+#include <stdio.h>
+
+/**@defgroup tsk_memory_group Utility functions for memory management.
+*/
+
+/**@ingroup tsk_memory_group
+* Allocates a block of size bytes of memory, returning a pointer to the beginning of the block.
+* The content of the newly allocated block of memory is not initialized, remaining with indeterminate values.
+* @param size Size of the memory block, in bytes.
+* @retval On success, a pointer to the memory block allocated by the function.
+* It is up to you to free the returned pointer.
+*/
+void* tsk_malloc(tsk_size_t size)
+{
+ void *ret = malloc(size);
+ if(!ret){
+ TSK_DEBUG_ERROR("Memory allocation failed");
+ }
+
+ return ret;
+}
+
+/**@ingroup tsk_memory_group
+* Reallocate memory block.
+* In case that ptr is NULL, the function behaves exactly as @a tsk_malloc, assigning a new block of size bytes and returning a pointer to the beginning of it.
+* The function may move the memory block to a new location, in which case the new location is returned. The content of the memory block is preserved up to the lesser of the
+* new and old sizes, even if the block is moved. If the new size is larger, the value of the newly allocated portion is indeterminate.
+* In case that the size is 0, the memory previously allocated in ptr is deallocated as if a call to free was made, and a NULL pointer is returned.
+* @param ptr Pointer to a memory block previously allocated with malloc, calloc or realloc to be reallocated.
+* If this is NULL, a new block is allocated and a pointer to it is returned by the function.
+* @param size New size for the memory block, in bytes.
+* If it is 0 and ptr points to an existing block of memory, the memory block pointed by ptr is deallocated and a NULL pointer is returned.
+* @retval A pointer to the reallocated memory block, which may be either the same as the ptr argument or a new location.
+* The type of this pointer is void*, which can be cast to the desired type of data pointer in order to be dereferenceable.
+* If the function failed to allocate the requested block of memory, a NULL pointer is returned.
+* It is up to you to free the returned pointer.
+*/
+void* tsk_realloc (void* ptr, tsk_size_t size)
+{
+ void *ret = tsk_null;
+
+ if(ptr){
+ if(!(ret = realloc(ptr, size))){
+ TSK_DEBUG_ERROR("Memory reallocation failed");
+ }
+ }
+ else{
+ if(!(ret = calloc(size, 1))){
+ TSK_DEBUG_ERROR("Memory allocation failed");
+ }
+ }
+
+ return ret;
+}
+
+/**@ingroup tsk_memory_group
+* Deallocate space in memory.
+* @param ptr Pointer to a memory block previously allocated with @a tsk_malloc, @a tsk_calloc or @a tsk_realloc to be deallocated.
+* If a null pointer is passed as argument, no action occurs.
+*/
+void tsk_free(void** ptr)
+{
+ if(ptr && *ptr){
+ free(*ptr);
+ *ptr = tsk_null;
+ }
+}
+
+/**@ingroup tsk_memory_group
+* Allocates a block of memory for an array of num elements, each of them size bytes long, and initializes all its bits to zero.
+* The effective result is the allocation of an zero-initialized memory block of (num * size) bytes.
+* @param num Number of elements to be allocated
+* @param size Size of elements
+* @retval A pointer to the memory block allocated by the function. The type of this pointer is always void*, which can be cast to the desired type of data pointer in order to be dereferenceable.
+* If the function failed to allocate the requested block of memory, a NULL pointer is returned.
+* It is up to you to free the returned pointer.
+*/
+void* tsk_calloc(tsk_size_t num, tsk_size_t size)
+{
+ void* ret = 0;
+ if(num && size){
+ ret = calloc(num, size);
+ if(!ret){
+ TSK_DEBUG_ERROR("Memory allocation failed. num=%u and size=%u", num, size);
+ }
+ }
+
+ return ret;
+}
diff --git a/tinySAK/src/tsk_memory.h b/tinySAK/src/tsk_memory.h
new file mode 100644
index 0000000..49b67b8
--- /dev/null
+++ b/tinySAK/src/tsk_memory.h
@@ -0,0 +1,59 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_memory.h
+ * @brief Useful memory management functions to handle memory.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_MEMORY_H_
+#define _TINYSAK_MEMORY_H_
+
+#include "tinysak_config.h"
+
+#include <stdlib.h> /* tsk_size_t */
+
+/**@ingroup tsk_memory_group
+* @def TSK_SAFE_FREE
+* Safely free the memory pointed by @a ptr.
+*/
+/**@ingroup tsk_memory_group
+* @def TSK_FREE
+* Safely free the memory pointed by @a ptr.
+*/
+
+TSK_BEGIN_DECLS
+
+#define TSK_SAFE_FREE(ptr) (void)tsk_free((void**)(&ptr));
+#define TSK_FREE(ptr) TSK_SAFE_FREE(ptr)
+
+TINYSAK_API void* tsk_malloc(tsk_size_t size);
+TINYSAK_API void* tsk_realloc (void * ptr, tsk_size_t size);
+TINYSAK_API void tsk_free(void** ptr);
+TINYSAK_API void* tsk_calloc(tsk_size_t num, tsk_size_t size);
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_MEMORY_H_ */
+
diff --git a/tinySAK/src/tsk_mutex.c b/tinySAK/src/tsk_mutex.c
new file mode 100644
index 0000000..6e417db
--- /dev/null
+++ b/tinySAK/src/tsk_mutex.c
@@ -0,0 +1,167 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_mutex.c
+ * @brief Pthread/Windows Mutex utility functions.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tsk_mutex.h"
+#include "tsk_memory.h"
+#include "tsk_debug.h"
+
+#if TSK_UNDER_WINDOWS
+# include <windows.h>
+# include "tsk_errno.h"
+ typedef HANDLE MUTEX_T;
+# define MUTEX_S void
+# define TSK_ERROR_NOT_OWNER ERROR_NOT_OWNER
+#else
+# include <pthread.h>
+# define MUTEX_S pthread_mutex_t
+ typedef MUTEX_S* MUTEX_T;
+# define TSK_ERROR_NOT_OWNER EPERM
+#endif
+
+#if defined(__GNUC__) || defined(__SYMBIAN32__)
+# include <errno.h>
+#endif
+
+// FIXME: Momory leaks in mutex
+
+/**@defgroup tsk_mutex_group Pthread/Windows Mutex utility functions.
+*/
+
+/**@ingroup tsk_mutex_group
+* Creates new recursive mutex handle.
+* @retval New mutex handle. It is up to you free the returned handle using @ref tsk_mutex_destroy.
+* @sa @ref tsk_mutex_destroy.
+*/
+tsk_mutex_handle_t* tsk_mutex_create()
+{
+ MUTEX_T handle = tsk_null;
+
+#if TSK_UNDER_WINDOWS
+ handle = CreateMutex(NULL, FALSE, NULL);
+#else
+ int ret;
+ pthread_mutexattr_t mta;
+
+ if((ret = pthread_mutexattr_init(&mta))){
+ TSK_DEBUG_ERROR("pthread_mutexattr_init failed with error code %d", ret);
+ return tsk_null;
+ }
+ if((ret = pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_RECURSIVE))){
+ TSK_DEBUG_ERROR("pthread_mutexattr_settype failed with error code %d", ret);
+ pthread_mutexattr_destroy(&mta);
+ return tsk_null;
+ }
+
+ /* if we are here: all is ok */
+ handle = tsk_calloc(1, sizeof(MUTEX_S));
+ if(pthread_mutex_init((MUTEX_T)handle, &mta)){
+ TSK_FREE(handle);
+ }
+ pthread_mutexattr_destroy(&mta);
+#endif
+
+ if(!handle){
+ TSK_DEBUG_ERROR("Failed to create new mutex.");
+ }
+ return handle;
+}
+
+/**@ingroup tsk_mutex_group
+* Lock a mutex. You must use @ref tsk_mutex_unlock to unlock the mutex.
+* @param handle The handle of the mutex to lock.
+* @retval Zero if succeed and non-zero error code otherwise.
+* @sa @ref tsk_mutex_unlock.
+*/
+int tsk_mutex_lock(tsk_mutex_handle_t* handle)
+{
+ int ret = EINVAL;
+ if(handle)
+ {
+#if TSK_UNDER_WINDOWS
+ if((ret = WaitForSingleObject((MUTEX_T)handle , INFINITE)) == WAIT_FAILED)
+#else
+ if(ret = pthread_mutex_lock((MUTEX_T)handle))
+#endif
+ {
+ TSK_DEBUG_ERROR("Failed to lock the mutex: %d", ret);
+ }
+ }
+ return ret;
+}
+
+/**@ingroup tsk_mutex_group
+* Unlock a mutex previously locked using @ref tsk_mutex_lock.
+* @param handle The handle of the mutex to unlock.
+* @retval Zero if succeed and non-zero otherwise.
+* @sa @ref tsk_mutex_lock.
+*/
+int tsk_mutex_unlock(tsk_mutex_handle_t* handle)
+{
+ int ret = EINVAL;
+ if(handle)
+ {
+#if TSK_UNDER_WINDOWS
+ if((ret = ReleaseMutex((MUTEX_T)handle) ? 0 : -1)){
+ ret = GetLastError();
+#else
+ if(ret = pthread_mutex_unlock((MUTEX_T)handle))
+ {
+#endif
+ if(ret == TSK_ERROR_NOT_OWNER){
+ TSK_DEBUG_WARN("The calling thread does not own the mutex: %d", ret);
+ }
+ else{
+ TSK_DEBUG_ERROR("Failed to unlock the mutex: %d", ret);
+ }
+ }
+ }
+ return ret;
+}
+
+/**@ingroup tsk_mutex_group
+* Free/destroy a mutex.
+* @param handle The mutex to free.
+* @sa @ref tsk_mutex_create.
+*/
+void tsk_mutex_destroy(tsk_mutex_handle_t** handle)
+{
+ if(handle && *handle){
+#if TSK_UNDER_WINDOWS
+ CloseHandle((MUTEX_T)*handle);
+ *handle = 0;
+#else
+ pthread_mutex_destroy((MUTEX_T)*handle);
+ tsk_free(handle);
+#endif
+ }
+ else{
+ TSK_DEBUG_WARN("Cannot free an uninitialized mutex");
+ }
+}
+
diff --git a/tinySAK/src/tsk_mutex.h b/tinySAK/src/tsk_mutex.h
new file mode 100644
index 0000000..f37387c
--- /dev/null
+++ b/tinySAK/src/tsk_mutex.h
@@ -0,0 +1,50 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_mutex.h
+ * @brief Pthread Mutex.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_MUTEX_H_
+#define _TINYSAK_MUTEX_H_
+
+#include "tinysak_config.h"
+
+TSK_BEGIN_DECLS
+
+/**@ingroup tsk_mutex_group
+* Mutex handle.
+*/
+typedef void tsk_mutex_handle_t;
+
+TINYSAK_API tsk_mutex_handle_t* tsk_mutex_create();
+TINYSAK_API int tsk_mutex_lock(tsk_mutex_handle_t* handle);
+TINYSAK_API int tsk_mutex_unlock(tsk_mutex_handle_t* handle);
+TINYSAK_API void tsk_mutex_destroy(tsk_mutex_handle_t** handle);
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_MUTEX_H_ */
+
diff --git a/tinySAK/src/tsk_object.c b/tinySAK/src/tsk_object.c
new file mode 100644
index 0000000..36984bf
--- /dev/null
+++ b/tinySAK/src/tsk_object.c
@@ -0,0 +1,224 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_object.c
+ * @brief Base object implementation.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tsk_object.h"
+#include "tsk_memory.h"
+#include "tsk_debug.h"
+#include "tsk_common.h"
+
+/**@defgroup tsk_object_group Base object implementation.
+* @brief Provides utility functions to ease Object Oriented Programming in C.
+*/
+
+#if defined (_DEBUG) || defined (DEBUG)
+# define TSK_DEBUG_OBJECTS 0
+static int tsk_objects_count = 0;
+#else
+# define TSK_DEBUG_OBJECTS 0
+#endif
+
+/** Object meta-data (definition).
+*/
+typedef struct tsk_object_header_s{
+ const void* base; /**< Opaque data holding a pointer to the actual meta-data(size, constructor, destructor and comparator) */
+ int refCount; /**< Reference counter. */
+}
+tsk_object_header_t;
+#define TSK_OBJECT_HEADER(object) ((tsk_object_header_t*)object)
+
+/**@ingroup tsk_object_group
+* Creates new object. The object MUST be declared using @ref TSK_DECLARE_OBJECT macro.
+* @param objdef The object meta-data (definition). For more infomation see @ref tsk_object_def_t.
+* @param ... List of parameters to pass to the constructor(defined in the meta-data).
+* @retval @ref tsk_object_t object with a reference counter equal to 1.
+* @sa @ref tsk_object_new_2.
+*/
+tsk_object_t* tsk_object_new(const tsk_object_def_t *objdef, ...)
+{
+ // Do not check "objdef", let the application die if it's null
+ tsk_object_t *newobj = tsk_calloc(1, objdef->size);
+ if(newobj){
+ (*(const tsk_object_def_t **) newobj) = objdef;
+ TSK_OBJECT_HEADER(newobj)->refCount = 1;
+ if(objdef->constructor){
+ va_list ap;
+ va_start(ap, objdef);
+ newobj = objdef->constructor(newobj, &ap);
+ va_end(ap);
+
+#if TSK_DEBUG_OBJECTS
+ TSK_DEBUG_INFO("N∞ objects:%d", ++tsk_objects_count);
+#endif
+ }
+ else{
+ TSK_DEBUG_WARN("No constructor found.");
+ }
+ }
+ else{
+ TSK_DEBUG_ERROR("Failed to create new tsk_object.");
+ }
+
+ return newobj;
+}
+
+/**@ingroup tsk_object_group
+* Creates new object. The object MUST be declared using @ref TSK_DECLARE_OBJECT macro.
+* @param objdef The object meta-data (definition). For more infomation see @ref tsk_object_def_t.
+* @param ap Variable argument list to pass to the constructor(defined in the meta-data).
+* @retval @ref tsk_object_t object with a reference counter equal to 1.
+* @sa @ref tsk_object_new.
+*/
+tsk_object_t* tsk_object_new_2(const tsk_object_def_t *objdef, va_list* ap)
+{
+ tsk_object_t *newobj = tsk_calloc(1, objdef->size);
+ if(newobj){
+ (*(const tsk_object_def_t **) newobj) = objdef;
+ TSK_OBJECT_HEADER(newobj)->refCount = 1;
+ if(objdef->constructor){
+ newobj = objdef->constructor(newobj, ap);
+
+#if TSK_DEBUG_OBJECTS
+ TSK_DEBUG_INFO("N∞ objects:%d", ++tsk_objects_count);
+#endif
+ }
+ else{
+ TSK_DEBUG_WARN("No constructor found.");
+ }
+ }
+ else{
+ TSK_DEBUG_ERROR("Failed to create new tsk_object.");
+ }
+
+ return newobj;
+}
+
+/**@ingroup tsk_object_group
+* Gets the size of an opaque object.
+* @param self The object for which we want to get the size.
+* The object MUST be declared using @ref TSK_DECLARE_OBJECT macro and created using @ref tsk_object_new or @ref tsk_object_new_2.
+* @retval The size of the object.
+*/
+tsk_size_t tsk_object_sizeof(const tsk_object_t *self)
+{
+ const tsk_object_def_t **objdef = (const tsk_object_def_t **)self;
+ if(objdef && *objdef){
+ return (*objdef)->size;
+ }
+ else{
+ TSK_DEBUG_ERROR("NULL object definition.");
+ return 0;
+ }
+}
+
+/**@ingroup tsk_object_group
+* Compares two well-defined objects.
+* If the meta-data (definition) of the first object (@a object1) do not include a function comparator then this method will amlways return -1.
+* @param object1 The first object to compare.
+* @param object2 The second object to compare.
+* @retval Zero if the two object are equal.
+* Positive value if @a object1 is greater than @a object2 and a negative value otherwise.
+*/
+int tsk_object_cmp(const tsk_object_t *object1, const tsk_object_t *object2)
+{
+ const tsk_object_def_t **objdef = (const tsk_object_def_t **)object1;
+
+ if(objdef && *objdef && (*objdef)->comparator){
+ return (*objdef)->comparator(object1, object2);
+ }
+ return -1;
+}
+
+/**@ingroup tsk_object_group
+* Increment the refrence counting of the object.<br>
+* Refernce counting: http://en.wikipedia.org/wiki/Reference_counting.<br>
+* The object MUST be declared using @ref TSK_DECLARE_OBJECT macro and created using @ref tsk_object_new or @ref tsk_object_new_2.
+* @param self The object holding the counter to increment.
+* @retval The new object (incremented).
+* @sa tsk_object_unref.
+*/
+tsk_object_t* tsk_object_ref(tsk_object_t *self)
+{
+ tsk_object_header_t* objhdr = TSK_OBJECT_HEADER(self);
+ if(objhdr && objhdr->refCount){
+ objhdr->refCount++;
+ return self;
+ }
+ return tsk_null;
+}
+
+/**@ingroup tsk_object_group
+* Decrement the refrence counting of the object.<br>
+* Refernce counting: http://en.wikipedia.org/wiki/Reference_counting.<br>
+* The object MUST be declared using @ref TSK_DECLARE_OBJECT macro and created using @ref tsk_object_new or @ref tsk_object_new_2.
+* @param self The object holding the counter to decrement.
+* @retval If the refernce counter is equal to zero then NULL is returned otherwise a new object (decremented) is returned.
+* @sa ref tsk_object_ref.
+* @sa ref TSK_OBJECT_SAFE_FREE.
+*/
+tsk_object_t* tsk_object_unref(tsk_object_t *self)
+{
+ if(self){
+ tsk_object_header_t* objhdr = TSK_OBJECT_HEADER(self);
+ if(objhdr->refCount){ // If refCount is == 0 then, nothing should happen.
+ if(!--objhdr->refCount){
+ tsk_object_delete(self);
+ return tsk_null;
+ }
+ }
+ else{
+ return tsk_null;
+ }
+ }
+ return self;
+}
+
+/**@ingroup tsk_object_group
+* Delete an object. This function will delete the object even if it's reference counter is greater than 1.
+* This mean that this function is not safe. You should use @ref TSK_OBJECT_SAFE_FREE to safely delete an object.
+* The object MUST be declared using @ref TSK_DECLARE_OBJECT macro and created using @ref tsk_object_new or @ref tsk_object_new_2.
+* @param self The object to delete.
+* @sa @ref TSK_OBJECT_SAFE_FREE.
+*/
+void tsk_object_delete(tsk_object_t *self)
+{
+ const tsk_object_def_t ** objdef = self;
+ if(self && *objdef){
+ if((*objdef)->destructor){
+ self = (*objdef)->destructor(self);
+#if TSK_DEBUG_OBJECTS
+ TSK_DEBUG_INFO("N∞ objects:%d", --tsk_objects_count);
+#endif
+ }
+ else{
+ TSK_DEBUG_WARN("No destructor found.");
+ }
+ free(self);
+ }
+}
+
diff --git a/tinySAK/src/tsk_object.h b/tinySAK/src/tsk_object.h
new file mode 100644
index 0000000..00ac3e7
--- /dev/null
+++ b/tinySAK/src/tsk_object.h
@@ -0,0 +1,173 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_object.h
+ * @brief Base object implementation.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef TSK_OBJECT_H
+#define TSK_OBJECT_H
+
+#include "tinysak_config.h"
+
+#include <stdarg.h>
+#include <stdio.h>
+
+TSK_BEGIN_DECLS
+
+/**@ingroup tsk_object_group
+* Plain object.
+*/
+typedef void tsk_object_t;
+
+/**@ingroup tsk_object_group
+* @def TSK_OBJECT_SAFE_FREE
+* Safely free any well-defined object. If the reference count of the object was equal to 1 then this
+ * object will be freed otherwise the refrence counter will be decremented.
+ * In all case this operation will set the pointer (the object itself) to NULL.<br>
+ * <b>Very Important</b>: Mutexes, Semaphores and CondVars are not well-defined objects. You should never use this macro to destroy them.
+ * @param self The object to free or unref.
+**/
+#define TSK_OBJECT_SAFE_FREE(self) if(self) tsk_object_unref(self), self = tsk_null
+
+/**@ingroup tsk_object_group
+* tag a structure as an object. If this macro is used then you MUST
+* provide a constructor and a destructor functions into an object definition (or meta-data).
+* @ref tsk_object_new or @ref tsk_object_new_2 are used to create the object and @ref tsk_object_unref or @ref tsk_object_delete to destroy it.
+* @code
+* typedef struct person_s{
+* TSK_DECLARE_OBJECT;
+* int id;
+* char* firstName;
+* char* lastName;
+* } person_t;
+* @endcode
+* To create the object:
+* @code
+* // person_def_t: See bellow to understand how to create an object definition.
+* person_t* person = tsk_object_new(person_def_t, "My First Name", "My last Name");
+* @endcode
+* To safely free the object:
+* @code
+* TSK_OBJECT_SAFE_FREE(person);
+* @endcode
+*/
+#define TSK_DECLARE_OBJECT \
+ const void* __base__; \
+ tsk_size_t refCount
+
+/**@ingroup tsk_object_group
+* Internal macro to get the definition of the object.
+*/
+#define TSK_OBJECT_DEF(self) ((const tsk_object_def_t*)self)
+
+/**@ingroup tsk_object_group
+* Meta-data used of define an object.
+* You MUST provide at least a constructor and a destructor. The comparator should
+* be provided if you would like to compare opaque object or sort linked lists.
+* @code
+*
+* // constructor
+* static void* person_create(tsk_object_t * self, va_list * app)
+* {
+* static int unique_id = 0;
+* person_t *person = self;
+* if(person){
+* person->id = ++unique_id;
+* person->firstName = tsk_strdup(va_arg(*app, const char *));
+* person->lastName = tsk_strdup(va_arg(*app, const char *));
+* }
+* return self;
+* }
+*
+* // destructor
+* static void* person_destroy(tsk_object_t * self)
+* {
+* person_t *person = self;
+* if(person){
+* TSK_FREE(person->firstName);
+* TSK_FREE(person->lastName);
+* }
+* return self;
+* }
+*
+* // comparator
+* static int person_cmp(const tsk_object_t *object1, const tsk_object_t *object1)
+* {
+* const person_t *person1 = object1;
+* const person_t *person2 = object2;
+*
+* return (person1 && person2) ? (person1->id - person2->id) : -1;
+* }
+*
+* // Meta-data (Object defnition)
+* static const tsk_object_def_t person_def_s =
+* {
+* sizeof(person_t),
+* person_create,
+* person_destroy,
+* person_cmp,
+* }person_def_t;
+*
+* @endcode
+* Now, to create your object:
+* @code
+* person_t* person = tsk_object_new(person_def_t, "My First Name", "My last Name"); // Will call "person_create" function.
+* @endcode
+* Or
+* @code
+* #define PERSON_CREATE(firstName, lastName) tsk_object_new(person_def_t, firstName, lastName)
+* person_t* person = PERSON_CREATE("My First Name", "My last Name") // For clarity, this form will be used in all projects declared using @ref TSK_DECLARE_OBJECT.
+* @endcode
+* To safely free your object:
+* @code
+* TSK_OBJECT_SAFE_FREE(person); // Will call "person_destroy" function.
+* @endcode
+*/
+typedef struct tsk_object_def_s
+{
+ //! The size of the object.
+ tsk_size_t size;
+ //! Pointer to the constructor.
+ tsk_object_t* (* constructor) (tsk_object_t *, va_list *);
+ //! Pointer to the destructor.
+ tsk_object_t* (* destructor) (tsk_object_t *);
+ //! Pointer to the comparator.
+ int (* comparator) (const tsk_object_t *, const tsk_object_t *);
+}
+tsk_object_def_t;
+
+TINYSAK_API tsk_object_t* tsk_object_new(const tsk_object_def_t *objdef, ...);
+TINYSAK_API tsk_object_t* tsk_object_new_2(const tsk_object_def_t *objdef, va_list* ap);
+TINYSAK_API tsk_size_t tsk_object_sizeof(const tsk_object_t *);
+TINYSAK_API int tsk_object_cmp(const void *self, const tsk_object_t *object);
+TINYSAK_API tsk_object_t* tsk_object_ref(tsk_object_t *self);
+TINYSAK_API tsk_object_t* tsk_object_unref(tsk_object_t *self);
+TINYSAK_API void tsk_object_delete(tsk_object_t *self);
+
+TSK_END_DECLS
+
+#endif /* TSK_OBJECT_H */
+
diff --git a/tinySAK/src/tsk_options.c b/tinySAK/src/tsk_options.c
new file mode 100644
index 0000000..7372427
--- /dev/null
+++ b/tinySAK/src/tsk_options.c
@@ -0,0 +1,242 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_options.c
+ * @brief Options.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tsk_options.h"
+#include "tsk_memory.h"
+#include "tsk_string.h"
+#include "tsk_common.h"
+
+#include <string.h>
+
+/**@defgroup tsk_options_group Options.
+*/
+
+/** Predicate function used to find an option by id.
+*/
+static int pred_find_option_by_id(const tsk_list_item_t *item, const void *id)
+{
+ if(item && item->data){
+ tsk_option_t *option = item->data;
+ return (option->id - *((int*)id));
+ }
+ return -1;
+}
+
+/**@ingroup tsk_options_group
+*/
+tsk_option_t* tsk_option_create(int id, const char* value)
+{
+ return tsk_object_new(TSK_OPTION_VA_ARGS(id, value));
+}
+
+/**@ingroup tsk_options_group
+*/
+tsk_option_t* tsk_option_create_null()
+{
+ return tsk_option_create(0, tsk_null);
+}
+
+
+/**@ingroup tsk_options_group
+* Checks if the supplied list of options contains an option with this @a id.
+* @param self The list of options into which to search.
+* @param id The id of the option to search.
+* @retval @ref tsk_true if the parameter exist and @ref tsk_false otherwise.
+*/
+tsk_bool_t tsk_options_have_option(const tsk_options_L_t *self, int id)
+{
+ if(self){
+ if(tsk_list_find_item_by_pred(self, pred_find_option_by_id, &id)){
+ return tsk_true;
+ }
+ }
+ return tsk_false;
+}
+
+/**@ingroup tsk_options_group
+* Adds an option to the list of options. If the option already exist(same id), then it's value will be updated.
+* @param self The destination list.
+* @param id The id of the option to add.
+* @param value The value of the option to add.
+* @retval Zero if succeed and -1 otherwise.
+*/
+int tsk_options_add_option(tsk_options_L_t **self, int id, const char* value)
+{
+ tsk_option_t *option;
+
+ if(!self) {
+ return -1;
+ }
+
+ if(!*self){
+ *self = tsk_list_create();
+ }
+
+ if((option = (tsk_option_t*)tsk_options_get_option_by_id(*self, id))){
+ tsk_strupdate(&option->value, value); /* Already exist ==> update the value. */
+ }
+ else{
+ option = tsk_option_create(id, value);
+ tsk_list_push_back_data(*self, (void**)&option);
+ }
+
+ return 0;
+}
+
+int tsk_options_add_option_2(tsk_options_L_t **self, const tsk_option_t* option)
+{
+ int ret = -1;
+ if(!self || !option || !option){
+ return ret;
+ }
+
+ ret = tsk_options_add_option(self, option->id, option->value);
+ return ret;
+}
+
+/**@ingroup tsk_options_group
+* Removes an option from the list of options.
+* @param self The source list.
+* @param id The id of the option to remove.
+* @retval Zero if succeed and -1 otherwise.
+*/
+int tsk_options_remove_option(tsk_options_L_t *self, int id)
+{
+ if(self){
+ tsk_list_remove_item_by_pred(self, pred_find_option_by_id, &id);
+ return 0;
+ }
+ return -1;
+}
+
+/**@ingroup tsk_options_group
+* Gets an option from the list of options by id.
+* @param self The source list.
+* @param id The id of the option to retrieve.
+* @retval @ref tsk_option_t if succeed and NULL otherwise.
+*/
+const tsk_option_t *tsk_options_get_option_by_id(const tsk_options_L_t *self, int id)
+{
+ if(self){
+ const tsk_list_item_t *item_const = tsk_list_find_item_by_pred(self, pred_find_option_by_id, &id);
+ if(item_const){
+ return item_const->data;
+ }
+ }
+ return 0;
+}
+
+/**@ingroup tsk_options_group
+* Gets the value of a option.
+* @param self The source list.
+* @param id The id of the option to retrieve.
+* @retval The value of the option if succeed and @ref tsk_null otherwise.
+*/
+const char *tsk_options_get_option_value(const tsk_options_L_t *self, int id)
+{
+ if(self){
+ const tsk_list_item_t *item_const = tsk_list_find_item_by_pred(self, pred_find_option_by_id, &id);
+ if(item_const && item_const->data){
+ return ((const tsk_option_t *)item_const->data)->value;
+ }
+ }
+ return tsk_null;
+}
+
+/**@ingroup tsk_options_group
+* Gets the value of a option.
+* @param self The source list.
+* @param id The id of the option to retrieve.
+* @retval The value of the option if succeed and -1 otherwise.
+*/
+int tsk_options_get_option_value_as_int(const tsk_options_L_t *self, int id)
+{
+ const char *value = tsk_options_get_option_value(self, id);
+ return value ? atoi(value) : -1;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+//=================================================================================================
+// option object definition
+//
+static tsk_object_t* tsk_option_ctor(tsk_object_t * self, va_list * app)
+{
+ tsk_option_t *option = self;
+ if(option){
+ int id = va_arg(*app, int);
+ const char* value = va_arg(*app, const char *);
+
+ option->id = id;
+ if(!tsk_strnullORempty(value)) {
+ option->value = tsk_strdup(value);
+ }
+ }
+
+ return self;
+}
+
+static tsk_object_t* tsk_option_dtor(tsk_object_t * self)
+{
+ tsk_option_t *option = self;
+ if(option){
+ TSK_FREE(option->value);
+ }
+
+ return self;
+}
+
+static const tsk_object_def_t tsk_option_def_s =
+{
+ sizeof(tsk_option_t),
+ tsk_option_ctor,
+ tsk_option_dtor,
+ tsk_null,
+};
+const tsk_object_def_t* tsk_option_def_t = &tsk_option_def_s;
+
diff --git a/tinySAK/src/tsk_options.h b/tinySAK/src/tsk_options.h
new file mode 100644
index 0000000..221b2d1
--- /dev/null
+++ b/tinySAK/src/tsk_options.h
@@ -0,0 +1,77 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_options.h
+ * @brief Options.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_OPTIONS_H_
+#define _TINYSAK_OPTIONS_H_
+
+#include "tinysak_config.h"
+#include "tsk_object.h"
+#include "tsk_list.h"
+#include "tsk_buffer.h"
+
+
+TSK_BEGIN_DECLS
+
+#define TSK_OPTION_VA_ARGS(id, value) tsk_option_def_t, (int)id, (const char*)value
+
+#define TSK_OPTION(self) ((tsk_option_t*)(self))
+
+/**@ingroup tsk_options_group
+* Parameter.
+*/
+typedef struct tsk_option_s
+{
+ TSK_DECLARE_OBJECT;
+
+ int id;
+ char* value;
+
+ tsk_bool_t tag;
+}
+tsk_option_t;
+
+typedef tsk_list_t tsk_options_L_t; /**< List of @ref tsk_option_t elements. */
+
+TINYSAK_API tsk_option_t* tsk_option_create(int id, const char* value);
+TINYSAK_API tsk_option_t* tsk_option_create_null();
+
+TINYSAK_API int tsk_options_have_option(const tsk_options_L_t *self, int id);
+TINYSAK_API int tsk_options_add_option(tsk_options_L_t **self, int id, const char* value);
+TINYSAK_API int tsk_options_add_option_2(tsk_options_L_t **self, const tsk_option_t* option);
+TINYSAK_API int tsk_options_remove_option(tsk_options_L_t *self, int id);
+TINYSAK_API const tsk_option_t *tsk_options_get_option_by_id(const tsk_options_L_t *self, int id);
+TINYSAK_API const char *tsk_options_get_option_value(const tsk_options_L_t *self, int id);
+TINYSAK_API int tsk_options_get_option_value_as_int(const tsk_options_L_t *self, int id);
+
+TINYSAK_GEXTERN const tsk_object_def_t *tsk_option_def_t;
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_OPTIONS_H_ */
+
diff --git a/tinySAK/src/tsk_params.c b/tinySAK/src/tsk_params.c
new file mode 100644
index 0000000..5fa15fd
--- /dev/null
+++ b/tinySAK/src/tsk_params.c
@@ -0,0 +1,378 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_params.c
+ * @brief SIP/MSRP/XCAP Parameters parser.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tsk_params.h"
+#include "tsk_memory.h"
+#include "tsk_string.h"
+#include "tsk_common.h"
+#include "tsk_debug.h"
+
+#include <string.h>
+
+/**@defgroup tsk_params_group SIP/MSRP/XCAP Parameters parser.
+*/
+
+/* Predicate function used to find a parameter by name (case-insensitive).
+*/
+static int pred_find_param_by_name(const tsk_list_item_t *item, const void *name)
+{
+ if(item && item->data){
+ tsk_param_t *param = item->data;
+ return tsk_stricmp(param->name, name);
+ }
+ return -1;
+}
+
+/**@ingroup tsk_params_group
+*/
+tsk_param_t* tsk_param_create(const char* name, const char* value)
+{
+ return tsk_object_new(TSK_PARAM_VA_ARGS(name, value));
+}
+
+/**@ingroup tsk_params_group
+*/
+tsk_param_t* tsk_param_create_null()
+{
+ return tsk_param_create(tsk_null, tsk_null);
+}
+
+/**@ingroup tsk_params_group
+* Converts a key-value-pair string (kvp) to @ref tsk_param_t object.
+* @param line The kvp (e.g. 'branch=z9hG4bK652hsge') string to parse.
+* @param size The size (length) of the kvp string.
+* @retval @ref tsk_param_t object.
+*/
+tsk_param_t *tsk_params_parse_param(const char* line, tsk_size_t size)
+{
+ if(line && size){
+ const char* start = line;
+ const char* end = (line + size);
+ const char* equal = strstr(line, "=");
+ tsk_param_t *param = tsk_param_create_null();
+
+ if(param && equal && equal<end){
+ if((param->name = tsk_calloc((equal-start)+1, sizeof(const char)))){
+ memcpy(param->name, start, (equal-start));
+ }
+
+ if((param->value = tsk_calloc((end-equal-1)+1, sizeof(const char)))){
+ memcpy(param->value, equal+1, (end-equal-1));
+ }
+ }
+ else if(param){
+ if((param->name = tsk_calloc((end-start)+1, sizeof(const char)))){
+ memcpy(param->name, start, (end-start));
+ }
+ }
+
+ return param;
+ }
+ return tsk_null;
+}
+/**@ingroup tsk_params_group
+* Checks if the supplied list of parameters contains a parameter named @a name (case-insensitive).
+* @param self The list of parameters into which to search.
+* @param name The name of the parameter to search.
+* @retval @ref tsk_true if the parameter exist and @ref tsk_false otherwise.
+*/
+tsk_bool_t tsk_params_have_param(const tsk_params_L_t *self, const char* name)
+{
+ if(self){
+ if(tsk_list_find_item_by_pred(self, pred_find_param_by_name, name)){
+ return tsk_true;
+ }
+ }
+ else{
+ TSK_DEBUG_ERROR("Invalid parameter");
+ }
+ return tsk_false;
+}
+
+/**@ingroup tsk_params_group
+* Adds a parameter to the list of parameters. If the parameter already exist(case-insensitive), then it's value will be updated.
+* @param self The destination list.
+* @param name The name of the parameter to add.
+* @param value The value of the parameter to add.
+* @retval Zero if succeed and -1 otherwise.
+*/
+int tsk_params_add_param(tsk_params_L_t **self, const char* name, const char* value)
+{
+ tsk_param_t *param;
+
+ if(!self || !name) {
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+
+ if(!*self){
+ *self = tsk_list_create();
+ }
+
+ if((param = (tsk_param_t*)tsk_params_get_param_by_name(*self, name))){
+ tsk_strupdate(&param->value, value); /* Already exist ==> update the value. */
+ }
+ else{
+ param = tsk_param_create(name, value);
+ tsk_list_push_back_data(*self, (void**)&param);
+ }
+
+ return 0;
+}
+
+int tsk_params_add_param_2(tsk_params_L_t **self, const tsk_param_t* param)
+{
+ if(!self || !param || !param){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+
+ return tsk_params_add_param(self, param->name, param->value);
+}
+
+/**@ingroup tsk_params_group
+* Removes a parameter from the list of parameters.
+* @param self The list from which to remove the parameter.
+* @param name The name(case-insensitive) of the parameter to remove.
+* @retval Zero if succeed and -1 otherwise.
+*/
+int tsk_params_remove_param(tsk_params_L_t *self, const char* name)
+{
+ if(self){
+ tsk_list_remove_item_by_pred(self, pred_find_param_by_name, name);
+ return 0;
+ }
+ else{
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+}
+
+/**@ingroup tsk_params_group
+* Gets a parameter from the list of parameters by name.
+* @param self The source list.
+* @param name The name(case-insensitive) of the parameter to retrieve.
+* @retval @ref tsk_param_t if succeed and @ref tsk_null otherwise.
+*/
+const tsk_param_t *tsk_params_get_param_by_name(const tsk_params_L_t *self, const char* name)
+{
+ if(self){
+ const tsk_list_item_t *item_const = tsk_list_find_item_by_pred(self, pred_find_param_by_name, name);
+ if(item_const){
+ return item_const->data;
+ }
+ }
+ else{
+ TSK_DEBUG_ERROR("Invalid parameter");
+ }
+ return tsk_null;
+}
+
+/**@ingroup tsk_params_group
+* Gets the value of a parameter.
+* @param self The source list.
+* @param name The name(case-insensitive) of the parameter to retrieve.
+* @retval The value of the parameter if succeed and NULL otherwise.
+*/
+const char *tsk_params_get_param_value(const tsk_params_L_t *self, const char* name)
+{
+ if(self && name){
+ const tsk_list_item_t *item_const = tsk_list_find_item_by_pred(self, pred_find_param_by_name, name);
+ if(item_const && item_const->data){
+ return ((const tsk_param_t *)item_const->data)->value;
+ }
+ }
+ else{
+ TSK_DEBUG_ERROR("Invalid parameter");
+ }
+ return tsk_null;
+}
+
+/**@ingroup tsk_params_group
+* Gets the value of a parameter.
+* @param self The source list.
+* @param name The name(case-insensitive) of the parameter to retrieve.
+* @retval The value of the parameter if succeed and -1 otherwise.
+*/
+int tsk_params_get_param_value_as_int(const tsk_params_L_t *self, const char* name)
+{
+ const char *value = tsk_params_get_param_value(self, name);
+ return value ? atoi(value) : -1;
+}
+
+/**@ingroup tsk_params_group
+* Serializes a @ref tsk_param_t object.
+* @param param The parameter to serialize.
+* @param output The output buffer.
+* @retval Zero if succeed and -1 otherwise.
+*/
+int tsk_params_param_tostring(const tsk_param_t *param, tsk_buffer_t* output)
+{
+ if(param){
+ return tsk_buffer_append_2(output, param->value?"%s=%s":"%s", param->name, param->value);
+ }
+ return -1;
+}
+
+/**@ingroup tsk_params_group
+* Serializes a @ref tsk_params_L_t object.
+* @param self The list of parameters to serialize.
+* @param separator The character to use as separator between params.
+* @param output The output buffer.
+* @retval Zero if succeed and non-zero error code otherwise.
+*/
+int tsk_params_tostring(const tsk_params_L_t *self, const char separator, tsk_buffer_t* output)
+{
+ int ret = -1;
+
+ if(self){
+ tsk_list_item_t *item;
+ ret = 0; // for empty lists
+ tsk_list_foreach(item, self){
+ tsk_param_t* param = item->data;
+ //tsk_params_param_tostring(param, output);
+ if(TSK_LIST_IS_FIRST(self, item)){
+ if(ret = tsk_buffer_append_2(output, param->value?"%s=%s":"%s", param->name, param->value)){
+ goto bail;
+ }
+ }
+ else{
+ if(ret = tsk_buffer_append_2(output, param->value?"%c%s=%s":"%c%s", separator, param->name, param->value)){
+ goto bail;
+ }
+ }
+ }
+ }
+
+bail:
+ return ret;
+}
+
+/**@ingroup tsk_params_group
+*/
+tsk_params_L_t* tsk_params_fromstring(const char* string, const char* separator, tsk_bool_t trim)
+{
+ tsk_params_L_t* params = tsk_null;
+ tsk_param_t* param;
+
+ int i = 0, index;
+ tsk_size_t size = tsk_strlen(string);
+
+#define PUSH_PARAM() \
+ if(!params){ \
+ params = tsk_list_create(); \
+ } \
+ if(trim){ \
+ if(param->name){ \
+ tsk_strtrim(&param->name); \
+ } \
+ if(param->value){ \
+ tsk_strtrim(&param->value); \
+ } \
+ } \
+ tsk_list_push_back_data(params, (void**)&param);
+
+ while((index = tsk_strindexOf((string + i), (size - i), separator)) != -1){
+ if((param = tsk_params_parse_param((string + i), index))){
+ PUSH_PARAM();
+ }
+ i += (index + 1);
+ }
+
+ // last one
+ if(i<(int)size){
+ if((param = tsk_params_parse_param((string + i), (size - i)))){
+ PUSH_PARAM();
+ }
+ }
+
+ return params;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+//=================================================================================================
+// param object definition
+//
+static tsk_object_t* tsk_param_ctor(tsk_object_t* self, va_list * app)
+{
+ tsk_param_t *param = self;
+ if(param){
+ const char* name = va_arg(*app, const char *);
+ const char* value = va_arg(*app, const char *);
+
+ if(!tsk_strnullORempty(name)) {
+ param->name = tsk_strdup(name);
+ if(!tsk_strnullORempty(value)) {
+ param->value = tsk_strdup(value);
+ }
+ }
+ }
+
+ return self;
+}
+
+static tsk_object_t* tsk_param_dtor(tsk_object_t* self)
+{
+ tsk_param_t *param = self;
+ if(param){
+ TSK_FREE(param->name);
+ TSK_FREE(param->value);
+ }
+
+ return self;
+}
+
+static const tsk_object_def_t tsk_param_def_s =
+{
+ sizeof(tsk_param_t),
+ tsk_param_ctor,
+ tsk_param_dtor,
+ tsk_null,
+};
+const tsk_object_def_t *tsk_param_def_t = &tsk_param_def_s;
+
diff --git a/tinySAK/src/tsk_params.h b/tinySAK/src/tsk_params.h
new file mode 100644
index 0000000..2c4a5de
--- /dev/null
+++ b/tinySAK/src/tsk_params.h
@@ -0,0 +1,83 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_params.h
+ * @brief SIP/MSRP/XCAP Parameters parser.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_PARAMS_H_
+#define _TINYSAK_PARAMS_H_
+
+#include "tinysak_config.h"
+#include "tsk_object.h"
+#include "tsk_list.h"
+#include "tsk_buffer.h"
+
+
+TSK_BEGIN_DECLS
+
+#define TSK_PARAM_VA_ARGS(name, value) tsk_param_def_t, (const char*)name, (const char*)value
+
+#define TSK_PARAM(self) ((tsk_param_t*)(self))
+
+/**@ingroup tsk_params_group
+* Parameter.
+*/
+typedef struct tsk_param_s
+{
+ TSK_DECLARE_OBJECT;
+
+ char *name;/**< The name of the parameter. */
+ char *value;/**< The value of the parameter. */
+
+ tsk_bool_t tag;/**< tag to be used for any use case (e.g. validity of the parameter, whether to ignore the param., ...). Default value: @ref tsk_false.*/
+}
+tsk_param_t;
+
+typedef tsk_list_t tsk_params_L_t; /**< List of @ref tsk_param_t elements. */
+
+TINYSAK_API tsk_param_t* tsk_param_create(const char* name, const char* value);
+TINYSAK_API tsk_param_t* tsk_param_create_null();
+
+TINYSAK_API tsk_param_t *tsk_params_parse_param(const char* line, tsk_size_t size);
+
+TINYSAK_API tsk_bool_t tsk_params_have_param(const tsk_params_L_t *self, const char* name);
+TINYSAK_API int tsk_params_add_param(tsk_params_L_t **self, const char* name, const char* value);
+TINYSAK_API int tsk_params_add_param_2(tsk_params_L_t **self, const tsk_param_t* param);
+TINYSAK_API int tsk_params_remove_param(tsk_params_L_t *self, const char* name);
+TINYSAK_API const tsk_param_t *tsk_params_get_param_by_name(const tsk_params_L_t *self, const char* name);
+TINYSAK_API const char *tsk_params_get_param_value(const tsk_params_L_t *self, const char* name);
+TINYSAK_API int tsk_params_get_param_value_as_int(const tsk_params_L_t *self, const char* name);
+
+TINYSAK_API int tsk_params_param_tostring(const tsk_param_t *param, tsk_buffer_t* output);
+TINYSAK_API int tsk_params_tostring(const tsk_params_L_t *self, const char separator, tsk_buffer_t* output);
+TINYSAK_API tsk_params_L_t* tsk_params_fromstring(const char* string, const char* separator, tsk_bool_t trim);
+
+TINYSAK_GEXTERN const tsk_object_def_t *tsk_param_def_t;
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_PARAMS_H_ */
+
diff --git a/tinySAK/src/tsk_ppfcs16.c b/tinySAK/src/tsk_ppfcs16.c
new file mode 100644
index 0000000..6fa8066
--- /dev/null
+++ b/tinySAK/src/tsk_ppfcs16.c
@@ -0,0 +1,82 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_ppfcs16.c
+ * @brief PPP in HDLC-like Framing (RFC 1662).
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+
+#include "tsk_ppfcs16.h"
+
+/**@defgroup tsk_ppfcs16_group PPP in HDLC-like Framing (RFC 1662).
+*/
+
+static uint16_t fcstab[256] =
+{
+ 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
+ 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
+ 0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e,
+ 0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876,
+ 0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd,
+ 0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5,
+ 0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c,
+ 0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974,
+ 0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb,
+ 0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3,
+ 0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a,
+ 0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72,
+ 0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9,
+ 0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1,
+ 0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738,
+ 0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70,
+ 0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7,
+ 0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff,
+ 0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036,
+ 0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e,
+ 0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5,
+ 0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd,
+ 0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134,
+ 0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c,
+ 0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3,
+ 0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb,
+ 0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232,
+ 0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a,
+ 0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1,
+ 0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9,
+ 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
+ 0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
+};
+
+/**@ingroup tsk_ppfcs16_group
+* Calculates a new fcs given the current fcs and the new data.
+*/
+uint16_t tsk_pppfcs16(register uint16_t fcs, register const uint8_t* cp, register int32_t len)
+{
+ while (len--){
+ fcs = (fcs >> 8) ^ fcstab[(fcs ^ *cp++) & 0xff];
+ }
+ return (fcs);
+}
+
diff --git a/tinySAK/src/tsk_ppfcs16.h b/tinySAK/src/tsk_ppfcs16.h
new file mode 100644
index 0000000..ae62968
--- /dev/null
+++ b/tinySAK/src/tsk_ppfcs16.h
@@ -0,0 +1,45 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_ppfcs16.h
+ * @brief PPP in HDLC-like Framing (RFC 1662).
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_PPFCS16_H_
+#define _TINYSAK_PPFCS16_H_
+
+#include "tinysak_config.h"
+
+TSK_BEGIN_DECLS
+
+#define TSK_PPPINITFCS16 0xffff /* Initial FCS value */
+#define TSK_PPPGOODFCS16 0xf0b8 /* Good final FCS value */
+
+TINYSAK_API uint16_t tsk_pppfcs16(register uint16_t fcs, register const uint8_t* cp, register int32_t len);
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_PPFCS16_H_ */
+
diff --git a/tinySAK/src/tsk_ppfcs32.c b/tinySAK/src/tsk_ppfcs32.c
new file mode 100644
index 0000000..2514648
--- /dev/null
+++ b/tinySAK/src/tsk_ppfcs32.c
@@ -0,0 +1,115 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_ppfcs32.c
+ * @brief PPP in HDLC-like Framing (RFC 1662).
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+
+#include "tsk_ppfcs32.h"
+
+/**@defgroup tsk_ppfcs32_group PPP in HDLC-like Framing (RFC 1662).
+*/
+
+static uint32_t fcstab_32[256] =
+{
+ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
+ 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
+ 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
+ 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
+ 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
+ 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
+ 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec,
+ 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5,
+ 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
+ 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
+ 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940,
+ 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
+ 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116,
+ 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f,
+ 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
+ 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d,
+ 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a,
+ 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
+ 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818,
+ 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
+ 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
+ 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457,
+ 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c,
+ 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
+ 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
+ 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb,
+ 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
+ 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9,
+ 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086,
+ 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
+ 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4,
+ 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad,
+ 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
+ 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683,
+ 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
+ 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
+ 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe,
+ 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7,
+ 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
+ 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
+ 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252,
+ 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
+ 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60,
+ 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79,
+ 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
+ 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f,
+ 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04,
+ 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
+ 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a,
+ 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
+ 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
+ 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21,
+ 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e,
+ 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
+ 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
+ 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45,
+ 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
+ 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db,
+ 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0,
+ 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
+ 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6,
+ 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
+ 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
+ 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
+};
+
+/**@ingroup tsk_ppfcs32_group
+* Calculates a new fcs given the current fcs and the new data.
+*/
+uint32_t tsk_pppfcs32(register uint32_t fcs, register const uint8_t* cp, register int32_t len)
+{
+ while (len--){
+ fcs = (((fcs) >> 8) ^ fcstab_32[((fcs) ^ (*cp++)) & 0xff]);
+ }
+
+ return (fcs);
+}
+
diff --git a/tinySAK/src/tsk_ppfcs32.h b/tinySAK/src/tsk_ppfcs32.h
new file mode 100644
index 0000000..2499e47
--- /dev/null
+++ b/tinySAK/src/tsk_ppfcs32.h
@@ -0,0 +1,45 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_ppfcs32.h
+ * @brief PPP in HDLC-like Framing (RFC 1662).
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_PPFCS32_H_
+#define _TINYSAK_PPFCS32_H_
+
+#include "tinysak_config.h"
+
+TSK_BEGIN_DECLS
+
+#define TSK_PPPINITFCS32 0xffffffff /* Initial FCS value */
+#define TSK_PPPGOODFCS32 0xdebb20e3 /* Good final FCS value */
+
+TINYSAK_API uint32_t tsk_pppfcs32(register uint32_t fcs, register const uint8_t* cp, register int32_t len);
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_PPFCS32_H_ */
+
diff --git a/tinySAK/src/tsk_ragel_state.c b/tinySAK/src/tsk_ragel_state.c
new file mode 100644
index 0000000..37ddaee
--- /dev/null
+++ b/tinySAK/src/tsk_ragel_state.c
@@ -0,0 +1,51 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_ragel_state.c
+ * @brief Ragel state for SIP, HTTP and MSRP parsing.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tsk_ragel_state.h"
+
+/**@defgroup tsk_ragel_state_group Ragel state for SIP, HTTP and MSRP parsing.
+*/
+
+/**@ingroup tsk_ragel_state_group
+* Initialize/Reset the ragel state with default values.
+* @param state The ragel @a state to initialize.
+* @param data The @a data to parse.
+* @param size The @a size of the data.
+*/
+void tsk_ragel_state_init(tsk_ragel_state_t *state, const char *data, tsk_size_t size)
+{
+ state->cs = 0;
+ state->p = data;
+ state->pe = state->p + size;
+ state->eof = 0;
+
+ state->tag_start = 0;
+ state->tag_end = 0;
+}
+
diff --git a/tinySAK/src/tsk_ragel_state.h b/tinySAK/src/tsk_ragel_state.h
new file mode 100644
index 0000000..6adb571
--- /dev/null
+++ b/tinySAK/src/tsk_ragel_state.h
@@ -0,0 +1,184 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_ragel_state.h
+ * @brief Ragel state for SIP, HTTP and MSRP parsing.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef TINYSAK_RAGEL_STATE_H
+#define TINYSAK_RAGEL_STATE_H
+
+#include "tinysak_config.h"
+#include "tsk_params.h"
+
+#include <string.h>
+
+TSK_BEGIN_DECLS
+
+
+#if defined(_MSC_VER)
+# define atoi64 _atoi64
+#else
+# define atoi64 atoll
+#endif
+
+/**@ingroup tsk_ragel_state_group
+*/
+#define TSK_SCANNER_SET_STRING(string) \
+ if(!string) \
+ { \
+ int len = (int)(te - ts); \
+ if(len >0) \
+ { \
+ string = tsk_calloc(len+1, sizeof(char)), memcpy(string, ts, len); \
+ } \
+ }
+
+/**@ingroup tsk_ragel_state_group
+*/
+#define TSK_PARSER_SET_STRING(string) \
+ { \
+ int len = (int)(p - tag_start); \
+ if(len && tag_start){ \
+ if(string){ \
+ TSK_FREE(string); \
+ } \
+ string = tsk_calloc(len+1, sizeof(char)), memcpy(string, tag_start, len); \
+ } \
+ }
+
+/**@ingroup tsk_ragel_state_group
+*/
+#define TSK_SCANNER_SET_INTEGER(integer) \
+ { \
+ int len = (int)(te - ts); \
+ if(len>=0) \
+ { \
+ char* tmp = tsk_calloc(len+1, sizeof(char)); \
+ memcpy(tmp, ts, len); \
+ integer = atoi(tmp); \
+ free(tmp); \
+ } \
+ }
+
+/**@ingroup tsk_ragel_state_group
+*/
+#define TSK_PARSER_SET_INTEGER_EX(retval, type, func) \
+ { \
+ int len = (int)(p - tag_start); \
+ if(len>=0) \
+ { \
+ char* tmp = tsk_calloc(len+1, sizeof(char)); \
+ memcpy(tmp, tag_start, len); \
+ retval = (type) func(tmp); \
+ free(tmp); \
+ } \
+ }
+/**@ingroup tsk_ragel_state_group
+* @def TSK_PARSER_SET_INTEGER
+*/
+/**@ingroup tsk_ragel_state_group
+* @def TSK_PARSER_SET_INT
+*/
+/**@ingroup tsk_ragel_state_group
+* @def TSK_PARSER_SET_UINT
+*/
+/**@ingroup tsk_ragel_state_group
+* @def TSK_PARSER_SET_FLOAT
+*/
+/**@ingroup tsk_ragel_state_group
+* @def TSK_PARSER_SET_DOUBLE
+*/
+#define TSK_PARSER_SET_INTEGER(retval) TSK_PARSER_SET_INTEGER_EX(retval, int, atoi)
+#define TSK_PARSER_SET_INT(retval) TSK_PARSER_SET_INTEGER(retval)
+#define TSK_PARSER_SET_UINT(retval) TSK_PARSER_SET_INTEGER_EX(retval, uint32_t, atoi64)
+#define TSK_PARSER_SET_FLOAT(retval) TSK_PARSER_SET_INTEGER_EX(retval, float, atof)
+#define TSK_PARSER_SET_DOUBLE(retval) TSK_PARSER_SET_INTEGER_EX(retval, double, atof)
+
+/**@ingroup tsk_ragel_state_group
+*/
+#define TSK_PARSER_ADD_PARAM(dest) \
+ { \
+ tsk_size_t len = (tsk_size_t)(p - tag_start); \
+ tsk_param_t *param = tsk_params_parse_param(tag_start, len); \
+ if(param) \
+ { \
+ if(!dest) dest = tsk_list_create(); \
+ tsk_list_push_back_data(dest, ((void**) &param)); \
+ } \
+ }
+
+/**@ingroup tsk_ragel_state_group
+*/
+#define TSK_SACANNER_ADD_PARAM(dest) \
+ { \
+ int len = (int)(te - ts); \
+ if(len >0) \
+ { \
+ tsk_param_t *param = tsk_params_parse_param(ts, len); \
+ if(param) \
+ { \
+ if(!dest) dest = tsk_list_create(); \
+ tsk_list_push_back_data(dest, ((void**) &param)); \
+ } \
+ } \
+ }
+
+/**@ingroup tsk_ragel_state_group
+*/
+#define TSK_PARSER_ADD_STRING(dest) \
+ { \
+ tsk_size_t len = (tsk_size_t)(p - tag_start); \
+ tsk_string_t *string = tsk_string_create(tsk_null); \
+ string->value = tsk_calloc(len+1, sizeof(char)), memcpy(string->value, tag_start, len); \
+ if(!dest) \
+ { \
+ dest = tsk_list_create(); \
+ } \
+ tsk_list_push_back_data(dest, ((void**) &string)); \
+ }
+
+/**@ingroup tsk_ragel_state_group
+* Ragel state.
+*/
+typedef struct tsk_ragel_state_s
+{
+ int cs; /**< Ragel current state. */
+ const char *p; /**< Data pointing to the buffer to parse. */
+ const char *pe; /**< Data end pointer. */
+ const char *eof; /**< End of the file (in our cas data) pointer. */
+
+ const char* tag_start; /**< Last tag start position set by ragel machine. */
+ const char* tag_end; /**< The end of the ragel tag. */
+}
+tsk_ragel_state_t;
+
+
+TINYSAK_API void tsk_ragel_state_init(tsk_ragel_state_t *state, const char *data, tsk_size_t size);
+
+TSK_END_DECLS
+
+#endif /* TINYSAK_RAGEL_STATE_H */
+
diff --git a/tinySAK/src/tsk_runnable.c b/tinySAK/src/tsk_runnable.c
new file mode 100644
index 0000000..7125b1e
--- /dev/null
+++ b/tinySAK/src/tsk_runnable.c
@@ -0,0 +1,236 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_runnable.c
+ * @brief Base class for runnable object.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tsk_runnable.h"
+#include "tsk_thread.h"
+#include "tsk_debug.h"
+
+/**@defgroup tsk_runnable_group Base class for runnable object.
+*/
+
+/**@ingroup tsk_runnable_group
+* Creates new Runnable object.
+* @retval @ref tsk_runnable_t.
+*/
+tsk_runnable_t* tsk_runnable_create()
+{
+ return tsk_object_new(tsk_runnable_def_t);
+}
+
+/**@ingroup tsk_runnable_group
+* Initializes a runnable object and allocate it's internal fields.
+* @param self The runnable object to initialize.
+* @param objdef Internal objects definition class.
+* @retval Zero if succeed and nonzero error code otherwise.
+* @sa tsk_runnable_deinit.
+*/
+static int tsk_runnable_init(tsk_runnable_t *self, const tsk_object_def_t *objdef)
+{
+ if(self && objdef){
+ if(self->initialized){
+ TSK_DEBUG_ERROR("Already initialized");
+ return -2;
+ }
+
+ self->semaphore = tsk_semaphore_create();
+ self->objdef = objdef;
+ self->objects = tsk_list_create();
+
+ self->initialized = tsk_true;
+ return 0;
+ }
+ TSK_DEBUG_ERROR("Invalid Parameter");
+ return -1;
+}
+
+/**@ingroup tsk_runnable_group
+* DeInitializes a runnable object.
+* @param self The runnable object to deinitialize.
+* @retval Zero if succeed and nonzero error code otherwise.
+* @sa tsk_runnable_init.
+*/
+static int tsk_runnable_deinit(tsk_runnable_t *self)
+{
+ if(self){
+ if(!self->initialized){
+ return 0; /* Already deinitialized */
+ }
+ else if(self->running){
+ TSK_DEBUG_ERROR("Cannot deinit a runnable object while running.");
+ return -3;
+ }
+
+ tsk_semaphore_destroy(&self->semaphore);
+ TSK_OBJECT_SAFE_FREE(self->objects);
+
+ self->initialized = tsk_false;
+
+ return 0;
+ }
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+}
+
+/**@ingroup tsk_runnable_group
+* Starts a runnable object.
+* @param self The runnable object to start.
+* @param objdef Internal objects definition (meta-data) class.
+* @retval Zero if succeed and nonzero error code otherwise.
+* @sa tsk_runnable_stop.
+*/
+int tsk_runnable_start(tsk_runnable_t *self, const tsk_object_def_t *objdef)
+{
+ if(self){
+ int ret = -1;
+ if(self->running) return -2;
+ else if(!self->run) return -3;
+ else if(tsk_runnable_init(self, objdef)) return -4;
+
+ /* call run() function in new thread. */
+ if((ret = tsk_thread_create(&(self->tid[0]), self->run, self))){
+ TSK_DEBUG_ERROR("Failed to start new thread.");
+ return ret;
+ }
+ // Do not set "running" to true here
+ // Problem: When you try to stop the thread before it start
+ // Will be done by "TSK_RUNNABLE_RUN_BEGIN" which is called into the thread
+ //self->running = tsk_true;
+
+ self->started = tsk_true;
+ return 0;
+ }
+ else{
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+}
+
+/**@ingroup tsk_runnable_group
+* To indicate whether the enqueued data is important or not.
+* @param self The runnable object
+* @param important @a tsk_true or @a tsk_false. If set to @a tsk_true, the thread will not be joined
+* until all data in the queue have been consumed.
+*/
+int tsk_runnable_set_important(tsk_runnable_t *self, tsk_bool_t important)
+{
+ if(self){
+ self->important = important;
+ return 0;
+ }
+ else{
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+}
+
+/**@ingroup tsk_runnable_group
+* Stops a runnable object.
+* @param self The runnable object to stop.
+* @retval Zero if succeed and nonzero error code otherwise.
+* @sa tsk_runnable_start.
+*/
+int tsk_runnable_stop(tsk_runnable_t *self)
+{
+ int ret = -1;
+ if(self){
+ if(!self->initialized) {
+ if(!self->running){
+ /* already deinitialized */
+ return 0;
+ }
+ else{
+ /* should never happen */
+ TSK_DEBUG_ERROR("Not initialized.");
+ return -2;
+ }
+ }
+ else if(!self->running) {
+
+ if(self->started){
+ tsk_size_t count = 0;
+ /* Thread is started but not running ==> Give it time.*/
+ while(++count <= 5){
+ tsk_thread_sleep(count * 200);
+ if(self->running){
+ goto stop;
+ }
+ }
+ }
+ else{
+ return 0; /* already stopped */
+ }
+ return -3;
+ }
+
+stop:
+ self->running = tsk_false;
+ tsk_semaphore_increment(self->semaphore);
+
+ if((ret = tsk_thread_join(&(self->tid[0])))){
+ self->running = tsk_true;
+ TSK_DEBUG_ERROR("Failed to join the thread.");
+ return ret;
+ }
+ tsk_runnable_deinit(self);
+
+ self->started = tsk_false;
+ }
+ return ret;
+}
+
+//=================================================================================================
+// Runnable object definition
+//
+static tsk_object_t* tsk_runnable_ctor(tsk_object_t * self, va_list * app)
+{
+ tsk_runnable_t* runnable = self;
+ if(runnable){
+ }
+ return self;
+}
+
+static tsk_object_t* tsk_runnable_dtor(tsk_object_t * self)
+{
+ tsk_runnable_t* runnable = self;
+ if(runnable){
+ /* stops runnable object (if running or started) */
+ tsk_runnable_stop(runnable);
+ }
+ return self;
+}
+
+static const tsk_object_def_t tsk_runnable_def_s =
+{
+ sizeof(tsk_runnable_t),
+ tsk_runnable_ctor,
+ tsk_runnable_dtor,
+ tsk_null,
+};
+const tsk_object_def_t *tsk_runnable_def_t = &tsk_runnable_def_s;
+
diff --git a/tinySAK/src/tsk_runnable.h b/tinySAK/src/tsk_runnable.h
new file mode 100644
index 0000000..d182dcd
--- /dev/null
+++ b/tinySAK/src/tsk_runnable.h
@@ -0,0 +1,167 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_runnable.h
+ * @brief Base class for runnable object.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_RUNNABLE_H_
+#define _TINYSAK_RUNNABLE_H_
+
+#include "tinysak_config.h"
+
+#include "tsk_object.h"
+#include "tsk_semaphore.h"
+#include "tsk_list.h"
+
+TSK_BEGIN_DECLS
+
+/**@ingroup tsk_runnable_group
+*/
+typedef void * (*tsk_runnable_func_run)(void* self);
+
+/**@ingroup tsk_runnable_group
+*/
+#define TSK_RUNNABLE(self) ((tsk_runnable_t*)(self))
+
+/**@ingroup tsk_runnable_group
+* Runnable.
+*/
+typedef struct tsk_runnable_s
+{
+ TSK_DECLARE_OBJECT;
+
+ const tsk_object_def_t *objdef;
+
+ void* tid[1];
+ tsk_runnable_func_run run;
+ tsk_semaphore_handle_t *semaphore;
+
+ tsk_bool_t running;
+ tsk_bool_t started;
+ tsk_bool_t initialized;
+ /** whether the enqueued data are important or not.
+ * if yes, the thread will not be joined until all data in the queue have been consumed.
+ * default value: tsk_false
+ */
+ tsk_bool_t important;
+
+ tsk_list_t *objects;
+}
+tsk_runnable_t;
+
+/**@ingroup tsk_runnable_group
+*/
+#define TSK_DECLARE_RUNNABLE tsk_runnable_t __runnable__
+
+TINYSAK_API tsk_runnable_t* tsk_runnable_create();
+
+TINYSAK_API int tsk_runnable_start(tsk_runnable_t *self, const tsk_object_def_t *objdef);
+TINYSAK_API int tsk_runnable_set_important(tsk_runnable_t *self, tsk_bool_t important);
+TINYSAK_API int tsk_runnable_enqueue(tsk_runnable_t *self, ...);
+TINYSAK_API int tsk_runnable_stop(tsk_runnable_t *self);
+
+TINYSAK_GEXTERN const tsk_object_def_t *tsk_runnable_def_t;
+
+
+/**@ingroup tsk_runnable_group
+* @def TSK_RUNNABLE_RUN_BEGIN
+*/
+/**@ingroup tsk_runnable_group
+* @def TSK_RUNNABLE_RUN_END
+*/
+#define TSK_RUNNABLE_RUN_BEGIN(self) \
+ TSK_RUNNABLE(self)->running = tsk_true; \
+ for(;;) { \
+ tsk_semaphore_decrement(TSK_RUNNABLE(self)->semaphore); \
+ if(!TSK_RUNNABLE(self)->running && \
+ (!TSK_RUNNABLE(self)->important || (TSK_RUNNABLE(self)->important && TSK_LIST_IS_EMPTY(TSK_RUNNABLE(self)->objects)))) \
+ break;
+
+
+#define TSK_RUNNABLE_RUN_END(self) \
+ } \
+ TSK_RUNNABLE(self)->running = tsk_false;
+
+/**@ingroup tsk_runnable_group
+* @def TSK_RUNNABLE_ENQUEUE
+*/
+/**@ingroup tsk_runnable_group
+* @def TSK_RUNNABLE_ENQUEUE_OBJECT
+*/
+#define TSK_RUNNABLE_ENQUEUE(self, ...) \
+{ \
+ if((self) && TSK_RUNNABLE(self)->initialized){ \
+ tsk_object_t *object = tsk_object_new(TSK_RUNNABLE(self)->objdef, ##__VA_ARGS__); \
+ tsk_list_push_back_data(TSK_RUNNABLE(self)->objects, (void**)&object); \
+ tsk_semaphore_increment(TSK_RUNNABLE(self)->semaphore); \
+ } \
+ else{ \
+ TSK_DEBUG_WARN("Invalid/uninitialized runnable object."); \
+ } \
+}
+
+#define TSK_RUNNABLE_ENQUEUE_OBJECT(self, object) \
+{ \
+ if((self) && TSK_RUNNABLE(self)->initialized){ \
+ tsk_list_push_back_data(TSK_RUNNABLE(self)->objects, (void**)&object); \
+ tsk_semaphore_increment(TSK_RUNNABLE(self)->semaphore); \
+ } \
+ else{ \
+ TSK_DEBUG_WARN("Invalid/uninitialized runnable object."); \
+ TSK_OBJECT_SAFE_FREE(object); \
+ } \
+}
+
+#define TSK_RUNNABLE_ENQUEUE_OBJECT_SAFE(self, object) \
+{ \
+ if((self) && TSK_RUNNABLE(self)->initialized){ \
+ tsk_list_lock(TSK_RUNNABLE(self)->objects); \
+ tsk_list_push_back_data(TSK_RUNNABLE(self)->objects, (void**)&object); \
+ tsk_list_unlock(TSK_RUNNABLE(self)->objects); \
+ tsk_semaphore_increment(TSK_RUNNABLE(self)->semaphore); \
+ } \
+ else{ \
+ TSK_DEBUG_WARN("Invalid/uninitialized runnable object."); \
+ TSK_OBJECT_SAFE_FREE(object); \
+ } \
+}
+
+/**@ingroup tsk_runnable_group
+*/
+#define TSK_RUNNABLE_POP_FIRST(self) \
+ tsk_list_pop_first_item(TSK_RUNNABLE(self)->objects)
+static tsk_list_item_t* TSK_RUNNABLE_POP_FIRST_SAFE(tsk_runnable_t* self){
+ tsk_list_item_t* item;
+ tsk_list_lock(self->objects);
+ item= tsk_list_pop_first_item(self->objects);
+ tsk_list_unlock(self->objects);
+ return item;
+}
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_RUNNABLE_H_ */
+
diff --git a/tinySAK/src/tsk_safeobj.c b/tinySAK/src/tsk_safeobj.c
new file mode 100644
index 0000000..d32a527
--- /dev/null
+++ b/tinySAK/src/tsk_safeobj.c
@@ -0,0 +1,33 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_safeobj.c
+ * @brief Thread-Safe object.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tsk_safeobj.h"
+
+/**@defgroup tsk_safeobj_group Helper macros to declare thread-safe objects.
+*/
diff --git a/tinySAK/src/tsk_safeobj.h b/tinySAK/src/tsk_safeobj.h
new file mode 100644
index 0000000..f3190f5
--- /dev/null
+++ b/tinySAK/src/tsk_safeobj.h
@@ -0,0 +1,81 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_safeobj.h
+ * @brief Thread-Safe object.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_SAFEOBJ_H_
+#define _TINYSAK_SAFEOBJ_H_
+
+#include "tinysak_config.h"
+#include "tsk_mutex.h"
+
+TSK_BEGIN_DECLS
+
+//#define TSK_DECLARE_SAFEOBJ\
+// union{ \
+// tsk_mutex_handle_t *mutex; \
+// }
+
+/**@ingroup tsk_safeobj_group
+* Macro helper to declare an object as thread-safe.
+*/
+#define TSK_DECLARE_SAFEOBJ tsk_mutex_handle_t *mutex
+
+#define TSK_SAFEOBJ_MUTEX(safeobj) ((safeobj)->mutex)
+
+/**@ingroup tsk_safeobj_group
+* @def tsk_safeobj_init
+* You MUST call this method before using @ref tsk_safeobj_lock or @ref tsk_safeobj_unlock to initilize the internal mutex.
+* Before freeing your safeobject you MUST call @ref tsk_safeobj_deinit to deinitialize the internal mutex.
+* @param safeobj The thread-safe object to initialize.
+* @sa @ref tsk_safeobj_deinit.
+*/
+/**@ingroup tsk_safeobj_group
+*@def tsk_safeobj_lock
+* Locks a previously initialized safeobject.
+* @param safeobj The thread-safe object to lock.
+*/
+/**@ingroup tsk_safeobj_group
+*@def tsk_safeobj_unlock
+* Unlocks a previously locked safeobject.
+* @param safeobj The thread-safe object to unlock.
+*/
+/**@ingroup tsk_safeobj_group
+*@def tsk_safeobj_deinit
+* Deinitialize a previously initialize safeobject.
+* @param safeobj The thread-safe object to deinitialize.
+* @sa @ref tsk_safeobj_init.
+*/
+#define tsk_safeobj_init(safeobj) TSK_SAFEOBJ_MUTEX(safeobj) = (TSK_SAFEOBJ_MUTEX(safeobj) ? TSK_SAFEOBJ_MUTEX(safeobj) : tsk_mutex_create())
+#define tsk_safeobj_lock(safeobj) tsk_mutex_lock(TSK_SAFEOBJ_MUTEX(safeobj))
+#define tsk_safeobj_unlock(safeobj) tsk_mutex_unlock(TSK_SAFEOBJ_MUTEX(safeobj))
+#define tsk_safeobj_deinit(safeobj) tsk_mutex_destroy(&TSK_SAFEOBJ_MUTEX(safeobj))
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_SAFEOBJ_H_ */
+
diff --git a/tinySAK/src/tsk_semaphore.c b/tinySAK/src/tsk_semaphore.c
new file mode 100644
index 0000000..649c4a8
--- /dev/null
+++ b/tinySAK/src/tsk_semaphore.c
@@ -0,0 +1,198 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_semaphore.c
+* @brief Pthread/Windows Semaphore utility functions.
+*
+* @author Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* @date Created: Sat Nov 8 16:54:58 2009 mdiop
+*/
+#include "tsk_semaphore.h"
+#include "tsk_memory.h"
+#include "tsk_debug.h"
+#include "tsk_string.h"
+
+/* Apple claims that they fully support POSIX semaphore but ...
+ */
+#if defined(__APPLE__) /* Mac OSX/Darwin/Iphone/Ipod Touch */
+# define TSK_USE_NAMED_SEM 1
+#else
+# define TSK_USE_NAMED_SEM 0
+#endif
+
+#if TSK_UNDER_WINDOWS /* Windows XP/Vista/7/CE */
+
+# include <windows.h>
+# include "tsk_errno.h"
+# define SEMAPHORE_S void
+ typedef HANDLE SEMAPHORE_T;
+//#else if define(__APPLE__) /* Mac OSX/Darwin/Iphone/Ipod Touch */
+//# include <march/semaphore.h>
+//# include <march/task.h>
+#else /* All *nix */
+
+# include <pthread.h>
+# include <semaphore.h>
+# if TSK_USE_NAMED_SEM
+# include <fcntl.h> /* O_CREAT */
+# include <sys/stat.h> /* S_IRUSR, S_IWUSR*/
+
+ static int sem_count = 0;
+ typedef struct named_sem_s
+ {
+ sem_t* sem;
+ char* name;
+ } named_sem_t;
+# define SEMAPHORE_S named_sem_t
+# define GET_SEM(PSEM) (((named_sem_t*)(PSEM))->sem)
+# else
+# define SEMAPHORE_S sem_t
+# define GET_SEM(PSEM) ((PSEM))
+# endif /* TSK_USE_NAMED_SEM */
+ typedef sem_t* SEMAPHORE_T;
+
+#endif
+
+#if defined(__GNUC__) || defined(__SYMBIAN32__)
+# include <errno.h>
+#endif
+
+
+
+/**@defgroup tsk_semaphore_group Pthread/Windows Semaphore functions.
+*/
+
+/**@ingroup tsk_semaphore_group
+* Creates new semaphore handle.
+* @retval A New semaphore handle.
+* You MUST call @ref tsk_semaphore_destroy to free the semaphore.
+* @sa @ref tsk_semaphore_destroy
+*/
+tsk_semaphore_handle_t* tsk_semaphore_create()
+{
+ SEMAPHORE_T handle = 0;
+
+#if TSK_UNDER_WINDOWS
+ handle = CreateSemaphore(NULL, 0, 0x7FFFFFFF, NULL);
+#else
+ handle = tsk_calloc(1, sizeof(SEMAPHORE_S));
+
+#if TSK_USE_NAMED_SEM
+ named_sem_t * nsem = (named_sem_t*)handle;
+ tsk_sprintf(&(nsem->name), "/sem-%d", sem_count++);
+ if((nsem->sem = sem_open(nsem->name, O_CREAT /*| O_EXCL*/, S_IRUSR | S_IWUSR, 0)) == SEM_FAILED)
+ {
+ TSK_FREE(nsem->name);
+#else
+ if(sem_init((SEMAPHORE_T)handle, 0, 0))
+ {
+#endif
+ TSK_FREE(handle);
+ TSK_DEBUG_ERROR("Failed to initialize the new semaphore (errno=%d).", errno);
+ }
+#endif
+
+ if(!handle){
+ TSK_DEBUG_ERROR("Failed to create new mutex.");
+ }
+ return handle;
+}
+
+/**@ingroup tsk_semaphore_group
+* Increments a semaphore.
+* @param handle The semaphore to increment.
+* @retval Zero if succeed and otherwise the function returns -1 and sets errno to indicate the error.
+* @sa @ref tsk_semaphore_decrement.
+*/
+int tsk_semaphore_increment(tsk_semaphore_handle_t* handle)
+{
+ int ret = EINVAL;
+ if(handle)
+ {
+#if TSK_UNDER_WINDOWS
+ if((ret = ReleaseSemaphore((SEMAPHORE_T)handle, 1L, 0L) ? 0 : -1))
+#else
+ if(ret = sem_post((SEMAPHORE_T)GET_SEM(handle)))
+#endif
+ {
+ TSK_DEBUG_ERROR("sem_post function failed: %d", ret);
+ }
+ }
+ return ret;
+}
+
+/**@ingroup tsk_semaphore_group
+* Decrements a semaphore.
+* @param handle The semaphore to decrement.
+* @retval Zero if succeed and otherwise the function returns -1 and sets errno to indicate the error.
+* @sa @ref tsk_semaphore_increment.
+*/
+int tsk_semaphore_decrement(tsk_semaphore_handle_t* handle)
+{
+ int ret = EINVAL;
+ if(handle)
+ {
+#if TSK_UNDER_WINDOWS
+ ret = (WaitForSingleObject((SEMAPHORE_T)handle, INFINITE) == WAIT_OBJECT_0 ? 0 : -1);
+ if(ret) TSK_DEBUG_ERROR("sem_wait function failed: %d", ret);
+#else
+ do
+ {
+ ret = sem_wait((SEMAPHORE_T)GET_SEM(handle));
+ }
+ while ( errno == EINTR );
+ if(ret) TSK_DEBUG_ERROR("sem_wait function failed: %d", errno);
+#endif
+ }
+
+ return ret;
+}
+
+/**@ingroup tsk_semaphore_group
+* Destroy a semaphore previously created using @ref tsk_semaphore_create.
+* @param handle The semaphore to free.
+* @sa @ref tsk_semaphore_create
+*/
+void tsk_semaphore_destroy(tsk_semaphore_handle_t** handle)
+{
+ if(handle && *handle)
+ {
+#if TSK_UNDER_WINDOWS
+ CloseHandle((SEMAPHORE_T)*handle);
+ *handle = 0;
+#else
+# if TSK_USE_NAMED_SEM
+ named_sem_t * nsem = ((named_sem_t*)*handle);
+ sem_close(nsem->sem);
+ TSK_FREE(nsem->name);
+#else
+ sem_destroy((SEMAPHORE_T)GET_SEM(*handle));
+#endif /* TSK_USE_NAMED_SEM */
+ tsk_free(handle);
+#endif
+ }
+ else{
+ TSK_DEBUG_WARN("Cannot free an uninitialized semaphore object");
+ }
+}
+
diff --git a/tinySAK/src/tsk_semaphore.h b/tinySAK/src/tsk_semaphore.h
new file mode 100644
index 0000000..abb94d0
--- /dev/null
+++ b/tinySAK/src/tsk_semaphore.h
@@ -0,0 +1,47 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_semaphore.h
+ * @brief Pthread Semaphore.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_SEMAPHORE_H_
+#define _TINYSAK_SEMAPHORE_H_
+
+#include "tinysak_config.h"
+
+TSK_BEGIN_DECLS
+
+typedef void tsk_semaphore_handle_t;
+
+TINYSAK_API tsk_semaphore_handle_t* tsk_semaphore_create();
+TINYSAK_API int tsk_semaphore_increment(tsk_semaphore_handle_t* handle);
+TINYSAK_API int tsk_semaphore_decrement(tsk_semaphore_handle_t* handle);
+TINYSAK_API void tsk_semaphore_destroy(tsk_semaphore_handle_t** handle);
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_SEMAPHORE_H_ */
+
diff --git a/tinySAK/src/tsk_sha1.c b/tinySAK/src/tsk_sha1.c
new file mode 100644
index 0000000..5828874
--- /dev/null
+++ b/tinySAK/src/tsk_sha1.c
@@ -0,0 +1,455 @@
+/*
+ *
+ * Based on the RFC 3174
+ *
+ * Full Copyright Statement
+ *
+ * Copyright (C) The Internet Society (2001). All Rights Reserved.
+ * Copyright (C) Mamadou Diop (2009)
+ *
+ * This document and translations of it may be copied and furnished to
+ * others, and derivative works that comment on or otherwise explain it
+ * or assist in its implementation may be prepared, copied, published
+ * and distributed, in whole or in part, without restriction of any
+ * kind, provided that the above copyright notice and this paragraph are
+ * included on all such copies and derivative works. However, this
+ * document itself may not be modified in any way, such as by removing
+ * the copyright notice or references to the Internet Society or other
+ * Internet organizations, except as needed for the purpose of
+ * developing Internet standards in which case the procedures for
+ * copyrights defined in the Internet Standards process must be
+ * followed, or as required to translate it into languages other than
+ * English.
+ *
+ * The limited permissions granted above are perpetual and will not be
+ * revoked by the Internet Society or its successors or assigns.
+
+ * This document and the information contained herein is provided on an
+ * "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+ * TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+ * BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+ * HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *
+ *
+ * Description:
+ * This file implements the Secure Hashing Algorithm 1 as
+ * defined in FIPS PUB 180-1 published April 17, 1995.
+ *
+ * The SHA-1, produces a 160-bit message digest for a given
+ * data stream. It should take about 2**n steps to find a
+ * message with the same digest as a given message and
+ * 2**(n/2) to find any two messages with the same digest,
+ * when n is the digest size in bits. Therefore, this
+ * algorithm can serve as a means of providing a
+ * "fingerprint" for a message.
+ *
+ * Portability Issues:
+ * SHA-1 is defined in terms of 32-bit "words". This code
+ * uses <stdint.h> (included via "sha1.h" to define 32 and 8
+ * bit unsigned integer types. If your C compiler does not
+ * support 32 bit unsigned integers, this code is not
+ * appropriate.
+ *
+ * Caveats:
+ * SHA-1 is designed to work with messages less than 2^64 bits
+ * long. Although SHA-1 allows a message digest to be generated
+ * for messages of any number of bits less than 2^64, this
+ * implementation only works with messages with a length that is
+ * a multiple of the size of an 8-bit character.
+ *
+ */
+
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_sha1.c
+ * @brief US Secure Hash Algorithm 1 (RFC 3174)
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tsk_sha1.h"
+
+#include "tsk_string.h"
+
+/**@defgroup tsk_sha1_group SHA1 (RFC 3174) utility functions.
+ * Copyright (C) The Internet Society (2001). All Rights Reserved.<br>
+ * Copyright (C) Mamadou Diop (2009)<br>
+ *
+ * This file implements the Secure Hashing Algorithm 1 as
+ * defined in FIPS PUB 180-1 published April 17, 1995.
+ *
+ * The SHA-1, produces a 160-bit message digest for a given
+ * data stream. It should take about 2**n steps to find a
+ * message with the same digest as a given message and
+ * 2**(n/2) to find any two messages with the same digest,
+ * when n is the digest size in bits. Therefore, this
+ * algorithm can serve as a means of providing a
+ * "fingerprint" for a message.
+ *
+*/
+
+/**@ingroup tsk_sha1_group
+ * Define the SHA1 circular left shift macro
+ */
+#define SHA1CircularShift(bits,word) \
+ (((word) << (bits)) | ((word) >> (32-(bits))))
+
+/* Local Function Prototyptes */
+void SHA1PadMessage(tsk_sha1context_t *);
+void SHA1ProcessMessageBlock(tsk_sha1context_t *);
+
+/**@ingroup tsk_sha1_group
+ *
+ * This function will initialize the @a context in preparation
+ * for computing a new SHA1 message digest.
+ *
+ *@param context The context to reset.
+ *
+ *@retval @ref tsk_sha1_errcode_t code.
+ */
+tsk_sha1_errcode_t tsk_sha1reset(tsk_sha1context_t *context)
+{
+ if (!context){
+ return shaNull;
+ }
+
+ context->Length_Low = 0;
+ context->Length_High = 0;
+ context->Message_Block_Index = 0;
+
+ context->Intermediate_Hash[0] = 0x67452301;
+ context->Intermediate_Hash[1] = 0xEFCDAB89;
+ context->Intermediate_Hash[2] = 0x98BADCFE;
+ context->Intermediate_Hash[3] = 0x10325476;
+ context->Intermediate_Hash[4] = 0xC3D2E1F0;
+
+ context->Computed = 0;
+ context->Corrupted = 0;
+
+ return shaSuccess;
+}
+
+/**@ingroup tsk_sha1_group
+ * This function will return the 160-bit message digest into the
+ * Message_Digest array provided by the caller.
+ * NOTE: The first octet of hash is stored in the 0th element,
+ * the last octet of hash in the 19th element.
+ * @param context The @a context to use to calculate the SHA-1 hash.
+ * @param Message_Digest A pointer the the sha1 digest result.
+ * @retval @ref tsk_sha1_errcode_t code.
+ */
+tsk_sha1_errcode_t tsk_sha1result( tsk_sha1context_t *context, tsk_sha1digest_t Message_Digest)
+{
+ int32_t i;
+
+ if (!context || !Message_Digest){
+ return shaNull;
+ }
+
+ if (context->Corrupted){
+ return context->Corrupted;
+ }
+
+ if (!context->Computed){
+ SHA1PadMessage(context);
+ for(i=0; i<64; ++i){
+ /* message may be sensitive, clear it out */
+ context->Message_Block[i] = 0;
+ }
+ context->Length_Low = 0; /* and clear length */
+ context->Length_High = 0;
+ context->Computed = 1;
+
+ }
+
+ for(i = 0; i < TSK_SHA1_DIGEST_SIZE; ++i){
+ Message_Digest[i] = context->Intermediate_Hash[i>>2]
+ >> 8 * ( 3 - ( i & 0x03 ) );
+ }
+
+ return shaSuccess;
+}
+
+/**@ingroup tsk_sha1_group
+ *
+ * This function accepts an array of octets as the next portion of the message.
+ *
+ * @param context The sha1 context.
+ * @param message_array An array of characters representing the next portion of the message.
+ * @param length The @a length of the message in message_array
+ * @retval @ref tsk_sha1_errcode_t code.
+ */
+tsk_sha1_errcode_t tsk_sha1input(tsk_sha1context_t *context,
+ const uint8_t *message_array,
+ unsigned length)
+{
+ if (!length){
+ return shaSuccess;
+ }
+
+ if (!context || !message_array){
+ return shaNull;
+ }
+
+ if (context->Computed){
+ context->Corrupted = shaStateError;
+
+ return shaStateError;
+ }
+
+ if (context->Corrupted){
+ return context->Corrupted;
+ }
+ while(length-- && !context->Corrupted)
+ {
+ context->Message_Block[context->Message_Block_Index++] =
+ (*message_array & 0xFF);
+
+ context->Length_Low += 8;
+ if (context->Length_Low == 0){
+ context->Length_High++;
+ if (context->Length_High == 0)
+ {
+ /* Message is too long */
+ context->Corrupted = 1;
+ }
+ }
+
+ if (context->Message_Block_Index == 64){
+ SHA1ProcessMessageBlock(context);
+ }
+
+ message_array++;
+ }
+
+ return shaSuccess;
+}
+
+/**@ingroup tsk_sha1_group
+ *
+ * This function will process the next 512 bits of the message
+ * stored in the Message_Block array.
+ *
+ * @param context The sha1 context.
+ *
+ */
+void SHA1ProcessMessageBlock(tsk_sha1context_t *context)
+{
+ /*
+ * Many of the variable names in this code, especially the
+ * single character names, were used because those were the
+ * names used in the publication.
+ */
+ const uint32_t K[] = { /* Constants defined in SHA-1 */
+ 0x5A827999,
+ 0x6ED9EBA1,
+ 0x8F1BBCDC,
+ 0xCA62C1D6
+ };
+ int32_t t; /* Loop counter */
+ uint32_t temp; /* Temporary word value */
+ uint32_t W[80]; /* Word sequence */
+ uint32_t A, B, C, D, E; /* Word buffers */
+
+ /*
+ * Initialize the first 16 words in the array W
+ */
+ for(t = 0; t < 16; t++){
+ W[t] = context->Message_Block[t * 4] << 24;
+ W[t] |= context->Message_Block[t * 4 + 1] << 16;
+ W[t] |= context->Message_Block[t * 4 + 2] << 8;
+ W[t] |= context->Message_Block[t * 4 + 3];
+ }
+
+ for(t = 16; t < 80; t++){
+ W[t] = SHA1CircularShift(1,W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16]);
+ }
+
+ A = context->Intermediate_Hash[0];
+ B = context->Intermediate_Hash[1];
+ C = context->Intermediate_Hash[2];
+ D = context->Intermediate_Hash[3];
+ E = context->Intermediate_Hash[4];
+
+ for(t = 0; t < 20; t++){
+ temp = SHA1CircularShift(5,A) +
+ ((B & C) | ((~B) & D)) + E + W[t] + K[0];
+ E = D;
+ D = C;
+ C = SHA1CircularShift(30,B);
+
+ B = A;
+ A = temp;
+ }
+
+ for(t = 20; t < 40; t++){
+ temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[1];
+ E = D;
+ D = C;
+ C = SHA1CircularShift(30,B);
+ B = A;
+ A = temp;
+ }
+
+ for(t = 40; t < 60; t++){
+ temp = SHA1CircularShift(5,A) +
+ ((B & C) | (B & D) | (C & D)) + E + W[t] + K[2];
+ E = D;
+ D = C;
+ C = SHA1CircularShift(30,B);
+ B = A;
+ A = temp;
+ }
+
+ for(t = 60; t < 80; t++){
+ temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[3];
+ E = D;
+ D = C;
+ C = SHA1CircularShift(30,B);
+ B = A;
+ A = temp;
+ }
+
+ context->Intermediate_Hash[0] += A;
+ context->Intermediate_Hash[1] += B;
+ context->Intermediate_Hash[2] += C;
+ context->Intermediate_Hash[3] += D;
+ context->Intermediate_Hash[4] += E;
+
+ context->Message_Block_Index = 0;
+}
+
+/**@ingroup tsk_sha1_group
+ *
+ * According to the standard, the message must be padded to an even
+ * 512 bits. The first padding bit must be a '1'. The last 64
+ * bits represent the length of the original message. All bits in
+ * between should be 0. This function will pad the message
+ * according to those rules by filling the Message_Block array
+ * accordingly. It will also call the ProcessMessageBlock function
+ * provided appropriately. When it returns, it can be assumed that
+ * the message digest has been computed.
+ *
+ * @param context The sha1 context.
+ *
+ */
+
+void SHA1PadMessage(tsk_sha1context_t *context)
+{
+ /*
+ * Check to see if the current message block is too small to hold
+ * the initial padding bits and length. If so, we will pad the
+ * block, process it, and then continue padding into a second
+ * block.
+ */
+ if (context->Message_Block_Index > 55){
+ context->Message_Block[context->Message_Block_Index++] = 0x80;
+ while(context->Message_Block_Index < 64){
+ context->Message_Block[context->Message_Block_Index++] = 0;
+ }
+
+ SHA1ProcessMessageBlock(context);
+
+ while(context->Message_Block_Index < 56){
+ context->Message_Block[context->Message_Block_Index++] = 0;
+ }
+ }
+ else{
+ context->Message_Block[context->Message_Block_Index++] = 0x80;
+ while(context->Message_Block_Index < 56){
+ context->Message_Block[context->Message_Block_Index++] = 0;
+ }
+ }
+
+ /*
+ * Store the message length as the last 8 octets
+ */
+ context->Message_Block[56] = context->Length_High >> 24;
+ context->Message_Block[57] = context->Length_High >> 16;
+ context->Message_Block[58] = context->Length_High >> 8;
+ context->Message_Block[59] = context->Length_High;
+ context->Message_Block[60] = context->Length_Low >> 24;
+ context->Message_Block[61] = context->Length_Low >> 16;
+ context->Message_Block[62] = context->Length_Low >> 8;
+ context->Message_Block[63] = context->Length_Low;
+
+ SHA1ProcessMessageBlock(context);
+}
+
+/**@ingroup tsk_sha1_group
+* Computes the sha1 digest result.
+* @param Message_Digest A pointer to the sha1 digest result.
+* @param context The sha1 context.
+*/
+void tsk_sha1final(uint8_t *Message_Digest, tsk_sha1context_t *context)
+{
+ int32_t i;
+
+ SHA1PadMessage(context);
+ for(i = 0; i<64; ++i) {
+ context->Message_Block[i] = 0;
+ }
+ context->Length_Low = 0; /* and clear length */
+ context->Length_High = 0;
+
+ for(i = 0; i < TSK_SHA1_DIGEST_SIZE; ++i) {
+ Message_Digest[i] = context->Intermediate_Hash[i>>2] >> 8*(3-(i&0x03));
+ }
+}
+
+
+/**@ingroup tsk_sha1_group
+ * Calculates sha1 digest result (hexadecimal string).
+ *
+ * @param input The input data for which to calculate the SHA-1 hash.
+ * @param size The size of the input data.
+ * @param result SHA-1 hash result as a hexadecimal string.
+ *
+ * @retval @ref tsk_sha1_errcode_t code.
+ * @sa @ref TSK_SHA1_DIGEST_CALC
+**/
+tsk_sha1_errcode_t tsk_sha1compute(const char* input, tsk_size_t size, tsk_sha1string_t *result)
+{
+ tsk_sha1_errcode_t ret;
+ tsk_sha1context_t sha;
+ uint8_t digest[TSK_SHA1_DIGEST_SIZE];
+
+ (*result)[TSK_SHA1_STRING_SIZE] = '\0';
+
+ if( (ret = tsk_sha1reset(&sha)) != shaSuccess ){
+ return ret;
+ }
+ else if ( (ret = tsk_sha1input(&sha, (uint8_t*)input, size)) != shaSuccess ){
+ return ret;
+ }
+ else if( (ret = tsk_sha1result(&sha, (char*)digest)) != shaSuccess ){
+ return ret;
+ }
+
+ tsk_str_from_hex(digest, TSK_SHA1_DIGEST_SIZE, *result);
+
+ return shaSuccess;
+}
diff --git a/tinySAK/src/tsk_sha1.h b/tinySAK/src/tsk_sha1.h
new file mode 100644
index 0000000..6d78a94
--- /dev/null
+++ b/tinySAK/src/tsk_sha1.h
@@ -0,0 +1,122 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_sha1.h
+ * @brief US Secure Hash Algorithm 1 (RFC 3174)
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_SHA1_H_
+#define _TINYSAK_SHA1_H_
+
+#include "tinysak_config.h"
+
+TSK_BEGIN_DECLS
+
+/**@ingroup tsk_sha1_group
+* SHA-1 error codes.
+*/
+typedef enum tsk_sha1_errcode_e
+{
+ shaSuccess = 0, /**< Success */
+ shaNull, /**< Null pointer parameter */
+ shaInputTooLong, /**< input data too long */
+ shaStateError /**< called Input after Result */
+}
+tsk_sha1_errcode_t;
+
+/**@ingroup tsk_sha1_group
+*@def TSK_SHA1_DIGEST_SIZE
+*/
+/**@ingroup tsk_sha1_group
+*@def TSK_SHA1_BLOCK_SIZE
+*/
+/**@ingroup tsk_sha1_group
+*@def TSK_SHA1_STRING_SIZE
+*/
+/**@ingroup tsk_sha1_group
+*@def tsk_sha1string_t
+* Hexadecimal SHA-1 digest string.
+*/
+/**@ingroup tsk_sha1_group
+*@def tsk_sha1digest_t
+* SHA-1 digest bytes.
+*/
+
+#define TSK_SHA1_DIGEST_SIZE 20
+#define TSK_SHA1_BLOCK_SIZE 64
+
+#define TSK_SHA1_STRING_SIZE (TSK_SHA1_DIGEST_SIZE*2)
+typedef char tsk_sha1string_t[TSK_SHA1_STRING_SIZE+1];
+typedef char tsk_sha1digest_t[TSK_SHA1_DIGEST_SIZE]; /**< SHA-1 digest bytes. */
+
+/**@ingroup tsk_sha1_group
+* Computes SHA-1 digest.
+* @param input The input data.
+* @param input_size The size of the input data.
+* @param digest @ref tsk_sha1digest_t object conaining the sha1 digest result.
+* @sa @ref tsk_sha1compute.
+*/
+#define TSK_SHA1_DIGEST_CALC(input, input_size, digest) \
+ { \
+ tsk_sha1context_t ctx; \
+ tsk_sha1reset(&ctx); \
+ tsk_sha1input(&ctx, (input), (input_size)); \
+ tsk_sha1result(&ctx, (digest)); \
+ }
+
+/**@ingroup tsk_sha1_group
+ * This structure will hold context information for the SHA-1
+ * hashing SSESSION
+ */
+typedef struct tsk_sha1context_s
+{
+ uint32_t Intermediate_Hash[TSK_SHA1_DIGEST_SIZE/4]; /* Message Digest */
+
+ uint32_t Length_Low; /**< Message length in bits */
+ uint32_t Length_High; /**< Message length in bits */
+
+
+ int_least16_t Message_Block_Index;/**< Index into message block array */
+ uint8_t Message_Block[64]; /**< 512-bit message blocks */
+
+ int32_t Computed; /**< Is the digest computed? */
+ int32_t Corrupted; /**< Is the message digest corrupted? */
+}
+tsk_sha1context_t;
+
+/*
+ * Function Prototypes
+ */
+
+TINYSAK_API tsk_sha1_errcode_t tsk_sha1reset(tsk_sha1context_t *);
+TINYSAK_API tsk_sha1_errcode_t tsk_sha1input(tsk_sha1context_t *, const uint8_t *, unsigned length);
+TINYSAK_API tsk_sha1_errcode_t tsk_sha1result(tsk_sha1context_t *, tsk_sha1digest_t Message_Digest);
+TINYSAK_API void tsk_sha1final(uint8_t *Message_Digest, tsk_sha1context_t *context);
+TINYSAK_API tsk_sha1_errcode_t tsk_sha1compute(const char* input, tsk_size_t size, tsk_sha1string_t *result);
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_SHA1_H_ */
+
diff --git a/tinySAK/src/tsk_string.c b/tinySAK/src/tsk_string.c
new file mode 100644
index 0000000..abb4831
--- /dev/null
+++ b/tinySAK/src/tsk_string.c
@@ -0,0 +1,619 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_string.c
+ * @brief Useful string functions to manipulate strings.
+ * As I'm a lazy man, some comments come from <ahref="http://www.cplusplus.com">this website</a>
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tsk_string.h"
+#include "tsk_memory.h"
+#include "tsk_time.h"
+#include "tsk_debug.h"
+#include "tsk_common.h"
+
+#include <stdarg.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if defined(_MSC_VER)
+# define snprintf _snprintf
+# define vsnprintf _vsnprintf
+# define strdup _strdup
+# define stricmp _stricmp
+# define strnicmp _strnicmp
+#else
+# if !HAVE_STRNICMP && !HAVE_STRICMP
+# define stricmp strcasecmp
+# define strnicmp strncasecmp
+# endif
+#endif
+
+/**@defgroup tsk_string_group String utillity functions.
+*/
+
+static char HEX[] = "0123456789abcdef";
+
+/**@ingroup tsk_string_group
+*/
+tsk_string_t* tsk_string_create(const char* str)
+{
+ return tsk_object_new(tsk_string_def_t, str);
+}
+
+/**@ingroup tsk_string_group
+* From base 10 to base 16
+* @param c the base 10 char to convert to base 16
+* @retval The base 16 value
+*/
+char tsk_b10tob16(char c)
+{
+ return HEX[c & 15];
+}
+
+/**@ingroup tsk_string_group
+* From base 16 to base 10
+* @param c The base 16 char to convert to base 10
+* @retval The base 10 value
+*/
+char tsk_b16tob10(char c)
+{
+ return isdigit(c) ? c - '0' : tolower(c) - 'a' + 10;
+}
+
+/**@ingroup tsk_string_group
+* Compare two Null-terminated strings (case insensitive)
+* Compares the C string str1 to the C string str2.
+* This function starts comparing the first character of each string. If they are equal to each other, it continues with the following pairs
+* until the characters differ or until a terminanting null-character is reached.
+* @param str1 First C string to be compared.
+* @param str2 Second C string to be compared.
+* @retval Returns an integral value indicating the relationship between the strings:
+* <0 : str1 less than str2.<br>
+* 0 : str1 identical to str2.<br>
+* >0 : str1 greater than str2.<br>
+*/
+int tsk_stricmp(const char * str1, const char * str2)
+{
+ return (str1 && str2) ?
+ ( (tolower(*str1) == tolower(*str2)) ? stricmp(str1, str2) : (*str1-*str2) ) /* Compare first charaters before doing complete comparison */
+ :
+ ( (!str1 && !str2) ? 0 : -1 );
+}
+
+/**@ingroup tsk_string_group
+* Compare two Null-terminated strings (case insensitive)
+* Compares the C string str1 to the C string str2.
+* This function starts comparing the first character of each string. If they are equal to each other, it continues with the following pairs
+* until the characters differ or until a terminanting null-character is reached or @a n characters passed.
+* @param str1 First C string to be compared.
+* @param str2 Second C string to be compared.
+* @param n The maximum number of characters to compare.
+* @retval Returns an integral value indicating the relationship between the strings:
+* <0 : str1 less than str2.<br>
+* 0 : str1 identical to str2.<br>
+* >0 : str1 greater than str2.<br>
+*/
+int tsk_strnicmp(const char * str1, const char * str2, tsk_size_t n)
+{
+ return (str1 && str2 && n) ?
+ ( (tolower(*str1) == tolower(*str2)) ? strnicmp(str1, str2, n) : (*str1-*str2) ) /* Compare first charaters before doing complete comparison */
+ :
+ ( (!str1 && !str2) ? 0 : -1 );
+}
+
+/**@ingroup tsk_string_group
+*/
+int tsk_strcmp(const char * str1, const char * str2)
+{
+ return (str1 && str2) ?
+ ( (*str1 == *str2) ? stricmp(str1, str2) : (*str1-*str2) ) /* Compare first charaters before doing complete comparison */
+ :
+ ( (!str1 && !str2) ? 0 : -1 );
+}
+
+/**@ingroup tsk_string_group
+* Compare two Null-terminated strings (case sensitive)
+* Compares the C string str1 to the C string str2.
+* This function starts comparing the first character of each string. If they are equal to each other, it continues with the following pairs
+* until the characters differ or until a terminanting null-character is reached.
+* @param str1 First C string to be compared.
+* @param str2 Second C string to be compared.
+* @param n The maximum number of characters to compare.
+* @retval Returns an integral value indicating the relationship between the strings:
+* <0 : str1 less than str2.<br>
+* 0 : str1 identical to str2.<br>
+* >0 : str1 greater than str2.<br>
+*/
+int tsk_strncmp(const char * str1, const char * str2, tsk_size_t n)
+{
+ return (str1 && str2) ? ((*str1 != *str2) ? -1 : strncmp(str1, str2, n)) : ((!str1 && !str2) ? 0 : -1);
+}
+
+/**@ingroup tsk_string_group
+* Duplicate a Null-terminated string.
+* @param s1 The string to duplicate.
+* @retval The duplicated string. It's up to you to free the returned string.
+*/
+char* tsk_strdup(const char *s1)
+{
+ if(s1){
+ return strdup(s1);
+ }
+ return tsk_null;
+}
+
+/** Duplicates the first @a n chars of @a s1.
+ * @param s1 The string to duplicate.
+ * @param n The number of characters to copy to the new string.
+ * @retval null A copy of @a s1.
+**/
+char* tsk_strndup(const char *s1, tsk_size_t n)
+{
+ char *ret = tsk_null;
+
+ if(s1 && n){
+ tsk_size_t len = tsk_strlen(s1);
+ tsk_size_t nret = (n > len) ? (len) : (n);
+
+ ret = tsk_calloc((nret+1), sizeof(uint8_t));
+ memcpy(ret, s1, nret);
+ }
+
+ return ret;
+}
+
+/**@ingroup tsk_string_group
+* Checks if @a str contains @a substring.
+* @param str The master string.
+* @param size The size of the master string.
+* @param substring the substring.
+* @retval @a tsk_true if @a str contains at least one occurence of @a substring and @a tsk_false othewise.
+*/
+tsk_bool_t tsk_strcontains(const char * str, tsk_size_t size, const char * substring)
+{
+ return (tsk_strindexOf(str, size, substring) >= 0);
+}
+
+/**@ingroup tsk_string_group
+* Gets the first occurrence of @a substring within @a str.
+* @param str The master string.
+* @param size The size of the master string.
+* @param substring The substring that is to be searched for within @a str.
+* @retval The index of the first ocurrence of @a substring in @a str.
+* If no occurrence of @a substring is found, then -1 is returned.
+*/
+int tsk_strindexOf(const char * str, tsk_size_t size, const char * substring)
+{
+ if(str && substring){
+ const char* sub_start = strstr(str, substring);
+ if(sub_start && (sub_start < (str + size))){
+ return (sub_start - str);
+ }
+ }
+ return -1;
+}
+
+/**@ingroup tsk_string_group
+*/
+int tsk_strLastIndexOf(const char * str, tsk_size_t size, const char * substring)
+{
+ if(str && substring){
+ tsk_size_t sub_size = tsk_strlen(substring);
+ const char* last_sub_start = tsk_null;
+ const char* sub_start = strstr(str, substring);
+ const char* end = (str + size);
+ while(sub_start && (sub_start < end)){
+ last_sub_start = sub_start;
+ if((sub_start + sub_size)<end){
+ sub_start = strstr((sub_start + sub_size), substring);
+ }
+ else{
+ break;
+ }
+ }
+ if(last_sub_start){
+ return (last_sub_start - str);
+ }
+ }
+ return -1;
+}
+
+/**@ingroup tsk_string_group
+* Appends a copy of the source string to the destination string. The terminating null character in destination is overwritten by the first character of source,
+* and a new null-character is appended at the end of the new string formed by the concatenation of both in destination. If the destination is NULL then new
+* memory will allocated and filled with source value.
+* @param destination Pointer de the destination array containing the new string.
+* @param source C string to be appended. This should not overlap destination. If NULL then nothing is done.
+*/
+void tsk_strcat(char** destination, const char* source)
+{
+ tsk_strncat(destination, source, tsk_strlen(source));
+}
+
+/**@ingroup tsk_string_group
+*/
+void tsk_strcat_2(char** destination, const char* format, ...)
+{
+ char* temp = tsk_null;
+ int len;
+ va_list ap;
+
+ /* initialize variable arguments */
+ va_start(ap, format);
+ /* compute */
+ if((len = tsk_sprintf_2(&temp, format, &ap))){
+ tsk_strncat(destination, temp, len);
+ }
+ /* reset variable arguments */
+ va_end(ap);
+ TSK_FREE(temp);
+}
+
+/**@ingroup tsk_string_group
+*/
+void tsk_strncat(char** destination, const char* source, tsk_size_t n)
+{
+ tsk_size_t index = 0;
+ tsk_size_t tsk_size_to_cat = (n > tsk_strlen(source)) ? tsk_strlen(source) : n;
+
+ if(!source || !n){
+ return;
+ }
+
+ if(!*destination){
+ *destination = (char*)tsk_malloc(tsk_size_to_cat+1);
+ strncpy(*destination, source, tsk_size_to_cat+1);
+ }else{
+ index = tsk_strlen(*destination);
+ *destination = tsk_realloc(*destination, index + tsk_size_to_cat+1);
+ strncpy(((*destination)+index), source, tsk_size_to_cat+1);
+ }
+ (*destination)[index + tsk_size_to_cat] = '\0';
+}
+
+/**@ingroup tsk_string_group
+* Writes into the array pointed by str a C string consisting on a sequence of data formatted as the format argument specifies. After the format parameter,
+* the function expects at least as many additional arguments as specified in format.
+* This function behaves exactly as printf does, but writing its results to a string instead of stdout. The size of the array passed as str should be enough to
+* contain the entire formatted string.
+* @param str Pointer to an array of char elements where the resulting C string is stored.
+* MUST be NULL.
+* @param format C string that contains the text to be written to the buffer. For more information see definiton of C function @a sprintf
+* @retval On success, the total number of characters written is returned. This count does not include the additional null-character automatically appended
+* at the end of the string.
+* On failure, a negative number is returned.
+*/
+int tsk_sprintf(char** str, const char* format, ...)
+{
+ int len;
+ va_list ap;
+
+ /* initialize variable arguments */
+ va_start(ap, format);
+ /* compute */
+ len = tsk_sprintf_2(str, format, &ap);
+ /* reset variable arguments */
+ va_end(ap);
+
+ return len;
+}
+
+/**@ingroup tsk_string_group
+*/
+int tsk_sprintf_2(char** str, const char* format, va_list* ap)
+{
+ int len = 0;
+ va_list ap2;
+
+ /* free previous value */
+ if(*str){
+ tsk_free((void**)str);
+ }
+
+ /* needed for 64bit platforms where vsnprintf will change the va_list */
+ tsk_va_copy(ap2, *ap);
+
+ /* compute destination len for windows mobile
+ */
+#if defined(_WIN32_WCE)
+ {
+ int n;
+ len = (tsk_strlen(format)*2);
+ *str = (char*)tsk_calloc(1, len+1);
+ for(;;){
+ if( (n = vsnprintf(*str, len, format, *ap)) >= 0 && (n<len) ){
+ len = n;
+ goto done;
+ }
+ else{
+ len += 10;
+ *str = tsk_realloc(*str, len+1);
+ }
+ }
+done:
+ (*str)[len] = '\0';
+ }
+#else
+ len = vsnprintf(0, 0, format, *ap);
+ *str = (char*)tsk_calloc(1, len+1);
+ vsnprintf(*str, len
+#if !defined(_MSC_VER) || defined(__GNUC__)
+ +1
+#endif
+ , format, ap2);
+#endif
+
+ va_end(ap2);
+
+ return len;
+}
+
+/**@ingroup tsk_string_group
+* Updates the value of @a str.
+* @param str The string to update.
+* @param newval The new value of @a str.
+*/
+void tsk_strupdate(char** str, const char* newval)
+{
+ tsk_free((void**)str);
+ *str = tsk_strdup(newval);
+}
+
+
+/**@ingroup tsk_string_group
+* Removes all occurrences of white space characters from the beginning of this @a str.
+* @param str The string to trim.
+*/
+void tsk_strtrim_left(char **str)
+{
+ if(str && *str){
+ tsk_size_t count = 0;
+ while(isspace(*((*str)+count))) count++;
+ if(count){
+ strcpy((*str), (*str)+count);
+ }
+ }
+}
+
+/**@ingroup tsk_string_group
+* Removes all occurrences of white space characters from the end of @a str.
+* @param str The string to trim.
+*/
+void tsk_strtrim_right(char **str)
+{
+ if(str && *str){
+ tsk_size_t size;
+ if((size = tsk_strlen(*str))){
+ while(isspace(*((*str)+size-1))) size--;
+ *(*str + size) = '\0';
+ }
+ }
+}
+/**@ingroup tsk_string_group
+* Removes all occurrences of white space characters from the beginning and end of @a str.
+* @param str The string to trim.
+*/
+void tsk_strtrim(char **str)
+{
+ // left
+ tsk_strtrim_left(str);
+ // right
+ tsk_strtrim_right(str);
+}
+
+/**@ingroup tsk_string_group
+* Adds quotes ("") to the beginning and end of @a str.<br>
+* @param str The string to quote.
+* Example: tsk_strquote("doubango") = ""doubango\"".
+*/
+void tsk_strquote(char **str)
+{
+ tsk_strquote_2(str, '"', '"');
+}
+
+/**@ingroup tsk_string_group
+* Adds quotes to the beginning and end of @a str.
+* @param str The string to quote.
+* @param lquote Quote to add to the begining of @a str.
+* @param rquote Quote to add to the end of @a str.
+*/
+void tsk_strquote_2(char **str, char lquote, char rquote)
+{
+ if(str && *str){
+ char *result = tsk_null;
+ tsk_sprintf(&result, "%c%s%c", lquote, *str, rquote);
+ tsk_free((void**)str);
+ *str = result;
+ }
+}
+
+/**@ingroup tsk_string_group
+* Removes quotes ("") from the beginning and end of @a str.<br>
+* @param str The string to unquote.
+* Example: tsk_strunquote(""doubango"") = "doubango".
+*/
+void tsk_strunquote(char **str)
+{
+ tsk_strunquote_2(str, '"', '"');
+}
+
+/**@ingroup tsk_string_group
+* Removes quotes from the beginning and end of @a str. The string must starts with @a lquote
+* and end with @a rquote.
+* @param str The string to unquote.
+* @param lquote Quote to remove from the begining of @a str.
+* @param rquote Quote to remove from the end of @a str.
+*/
+void tsk_strunquote_2(char **str, char lquote, char rquote)
+{
+ if(str && *str){
+ tsk_size_t size = tsk_strlen(*str);
+ if(size>=2 && **str == lquote && *((*str)+size-1) == rquote){
+ strcpy((*str), (*str)+1);
+ *((*str)+size-2) = '\0';
+ }
+ }
+}
+
+/**@ingroup tsk_string_group
+* Conversts an integer to string.
+* @param i The integer number to convert to a string.
+* @param result Pointer to the string where to copy the result.
+*/
+void tsk_itoa(int64_t i, tsk_istr_t *result)
+{
+ memset(result, 0, sizeof(*result));
+ sprintf(*result,"%lld",i);
+}
+
+/**@ingroup tsk_string_group
+*/
+int64_t tsk_atoll(const char* str)
+{
+ // FIXME: use HAVE_ATOLL and use macro instead of function
+ if(str){
+#if defined(_MSC_VER)
+ return _atoi64(str);
+#elif defined(__GNUC__)
+ return atoll(str);
+#else
+ return atol(str);
+#endif
+ }
+ return 0;
+}
+
+/**@ingroup tsk_string_group
+*/
+long tsk_atox(const char* str)
+{
+ long ret = 0;
+ if(str){
+ sscanf(str, "%lx", &ret);
+ }
+ return ret;
+}
+
+/**@ingroup tsk_string_group
+ * Generates a random string.
+ *
+ * @param result A pointer to the result.
+**/
+void tsk_strrandom(tsk_istr_t *result)
+{
+ static uint64_t __counter = 1;
+ tsk_itoa((tsk_time_epoch() ^ (rand())) ^ ++__counter, result);
+}
+
+/**@ingroup tsk_string_group
+ *
+ * Converts hexadecimal bytes into string representation.
+ *
+ * @param hex The hexadecimal bytes to convert.
+ * @param size The size of the hexadecimal bytes.
+ * @param str The pointer to the result. MUST be enought large to hold the result.
+ * It is up to you to add the final '\\0'.
+ * @sa @ref tsk_str_to_hex
+**/
+void tsk_str_from_hex(const uint8_t *hex, tsk_size_t size, char* str)
+{
+ static const char *TSK_HEXA_VALUES = {"0123456789abcdef"};
+ tsk_size_t i;
+
+ for (i = 0 ; i<size; i++){
+ str[2*i] = TSK_HEXA_VALUES [ (*(hex+i) & 0xf0) >> 4 ];
+ str[(2*i)+1] = TSK_HEXA_VALUES [ (*(hex+i) & 0x0f) ];
+ }
+}
+
+/**@ingroup tsk_string_group
+ * Converts string chars into hexadecimal bytes.
+ *
+ * @param str If non-null, the string.
+ * @param size The size.
+ * @param hex If non-null, the hexadecimal.
+**/
+void tsk_str_to_hex(const char *str, tsk_size_t size, uint8_t* hex)
+{
+ // to avoid SIGBUS error when memory is misaligned do not use sscanf("%2x")
+ TSK_DEBUG_FATAL("Not implemented.");
+}
+
+
+
+
+
+
+
+
+
+
+//=================================================================================================
+// String object definition
+//
+static tsk_object_t* tsk_string_ctor(tsk_object_t * self, va_list * app)
+{
+ tsk_string_t *string = self;
+ const char *value = va_arg(*app, const char *);
+ if(value){
+ string->value = tsk_strdup(value);
+ }
+ return self;
+}
+
+static tsk_object_t* tsk_string_dtor(tsk_object_t * self)
+{
+ tsk_string_t *string = self;
+ if(string){
+ TSK_FREE(string->value);
+ }
+
+ return self;
+}
+
+static int tsk_string_cmp(const tsk_object_t *_s1, const tsk_object_t *_s2)
+{
+ const tsk_string_t *s1 = _s1;
+ const tsk_string_t *s2 = _s2;
+
+ if(s1 && s2){
+ return tsk_stricmp(s1->value, s2->value);
+ }
+ else if(!s1 && !s2) return 0;
+ else return -1;
+}
+
+static const tsk_object_def_t tsk_string_def_s =
+{
+ sizeof(tsk_string_t),
+ tsk_string_ctor,
+ tsk_string_dtor,
+ tsk_string_cmp,
+};
+const tsk_object_def_t *tsk_string_def_t = &tsk_string_def_s;
+
diff --git a/tinySAK/src/tsk_string.h b/tinySAK/src/tsk_string.h
new file mode 100644
index 0000000..f064fc1
--- /dev/null
+++ b/tinySAK/src/tsk_string.h
@@ -0,0 +1,127 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_string.h
+ * @brief Useful string functions to manipulate strings.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_STRING_H_
+#define _TINYSAK_STRING_H_
+
+#include "tinysak_config.h"
+
+#include "tsk_object.h"
+#include "tsk_list.h"
+
+/**@ingroup tsk_string_group
+* @def TSK_STRING_STR
+* Gets the internal string pointer.
+*/
+TSK_BEGIN_DECLS
+
+#define TSK_STRING_STR(self) ((tsk_string_t*)self)->value
+
+typedef char tsk_istr_t[21]; /**< Integer number as string value. */
+
+TINYSAK_API char tsk_b10tob16(char c);
+TINYSAK_API char tsk_b16tob10(char c);
+
+TINYSAK_API int tsk_stricmp(const char * str1, const char * str2);
+TINYSAK_API int tsk_strnicmp(const char * str1, const char * str2, tsk_size_t n);
+TINYSAK_API int tsk_strcmp(const char * str1, const char * str2);
+TINYSAK_API int tsk_strncmp(const char * str1, const char * str2, tsk_size_t n);
+TINYSAK_API char* tsk_strdup(const char *s1);
+TINYSAK_API char* tsk_strndup(const char *s1, tsk_size_t n);
+TINYSAK_API tsk_bool_t tsk_strcontains(const char * str, tsk_size_t size, const char * substring);
+TINYSAK_API int tsk_strindexOf(const char * str, tsk_size_t size, const char * substring);
+TINYSAK_API int tsk_strLastIndexOf(const char * str, tsk_size_t size, const char * substring);
+TINYSAK_API void tsk_strcat(char** destination, const char* source);
+TINYSAK_API void tsk_strcat_2(char** destination, const char* format, ...);
+TINYSAK_API void tsk_strncat(char** destination, const char* source, tsk_size_t n);
+TINYSAK_API int tsk_sprintf(char** str, const char* format, ...);
+TINYSAK_API int tsk_sprintf_2(char** str, const char* format, va_list* ap);
+TINYSAK_API void tsk_strupdate(char** str, const char* newval);
+TINYSAK_API void tsk_strtrim_left(char **str);
+TINYSAK_API void tsk_strtrim_right(char **str);
+TINYSAK_API void tsk_strtrim(char **str);
+TINYSAK_API void tsk_strquote(char **str);
+TINYSAK_API void tsk_strquote_2(char **str, char lquote, char rquote);
+TINYSAK_API void tsk_strunquote(char **str);
+TINYSAK_API void tsk_strunquote_2(char **str, char lquote, char rquote);
+TINYSAK_API void tsk_itoa(int64_t i, tsk_istr_t *result);
+TINYSAK_API int64_t tsk_atoll(const char*);
+TINYSAK_API long tsk_atox(const char*);
+TINYSAK_API void tsk_strrandom(tsk_istr_t *result);
+TINYSAK_API void tsk_str_from_hex(const uint8_t *hex, tsk_size_t size, char* str);
+TINYSAK_API void tsk_str_to_hex(const char *str, tsk_size_t size, uint8_t* hex);
+
+/**@ingroup tsk_string_group
+* @def tsk_strtrim_both
+*/
+/**@ingroup tsk_string_group
+* @def tsk_strempty
+*/
+/**@ingroup tsk_string_group
+* @def tsk_striequals
+*/
+/**@ingroup tsk_string_group
+* @def tsk_strniequals
+*/
+/**@ingroup tsk_string_group
+* @def tsk_strequals
+*/
+/**@ingroup tsk_string_group
+* @def tsk_strnequals
+*/
+#define tsk_strtrim_both(str) tsk_strtrim_left(str), tsk_strtrim_right(str);
+#define tsk_strempty(s) (*(s) == '\0')
+#define tsk_strnullORempty(s) (!(s) || tsk_strempty((s)))
+#define tsk_striequals(s1, s2) (tsk_stricmp((const char*)(s1), (const char*)(s2)) ? tsk_false : tsk_true)
+#define tsk_strniequals(s1, s2, n) (tsk_strnicmp((const char*)(s1), (const char*)(s2), n) ? tsk_false : tsk_true)
+#define tsk_strequals(s1, s2) (tsk_strcmp((const char*)(s1), (const char*)(s2)) ? tsk_false : tsk_true)
+#define tsk_strnequals(s1, s2, n) (tsk_strncmp((const char*)(s1), (const char*)(s2), n) ? tsk_false : tsk_true)
+#define tsk_strlen(s) ((s) ? strlen((s)) : 0)
+
+/**@ingroup tsk_string_group
+* String object.
+*/
+typedef struct tsk_string_s
+{
+ TSK_DECLARE_OBJECT;
+
+ char *value; /**< The value of the string object. */
+}
+tsk_string_t;
+
+typedef tsk_list_t tsk_strings_L_t;
+
+TINYSAK_API tsk_string_t* tsk_string_create(const char* str);
+
+TINYSAK_GEXTERN const tsk_object_def_t *tsk_string_def_t;
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_STRING_H_ */
+
diff --git a/tinySAK/src/tsk_thread.c b/tinySAK/src/tsk_thread.c
new file mode 100644
index 0000000..c8339e5
--- /dev/null
+++ b/tinySAK/src/tsk_thread.c
@@ -0,0 +1,109 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_thread.c
+ * @brief Utility functions for threading.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tsk_thread.h"
+#include "tsk_debug.h"
+#include "tsk_memory.h"
+
+#if TSK_UNDER_WINDOWS
+# include <windows.h>
+#else
+# include <pthread.h>
+#endif
+
+/**@defgroup tsk_thread_group Utility functions for threading.
+*/
+
+/**@ingroup tsk_thread_group
+*/
+void tsk_thread_sleep(uint64_t ms)
+{
+#if TSK_UNDER_WINDOWS
+ Sleep((DWORD)ms);
+#else
+ struct timespec interval;
+
+ interval.tv_sec = (long)(ms/1000);
+ interval.tv_nsec = (long)(ms%1000) * 1000000;
+ nanosleep(&interval, 0);
+#endif
+}
+
+/**@ingroup tsk_thread_group
+* Creates a new thread.
+* @param tid Handle id of the newly created thread. The returned handle should be destroyed using @ref tsk_thread_join()
+* @param start The function to be run as the new thread's start routine
+* @param arg An address for the argument for the thread's start routine
+* @retval If successful, returns zero. Otherwise, an error number is returned to indicate the error
+*/
+int tsk_thread_create(void** tid, void *(*start) (void *), void *arg)
+{
+#if TSK_UNDER_WINDOWS
+ DWORD ThreadId;
+ *((HANDLE*)tid) = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)start, arg, 0, &ThreadId);
+ return *((HANDLE*)tid) ? 0 : -1;
+#else
+ *tid = tsk_calloc(1, sizeof(pthread_t));
+ return pthread_create((pthread_t*)*tid, 0, start, arg);
+#endif
+}
+
+/**@ingroup tsk_thread_group
+* Join a thread.
+* @param tid Pthread handle to the target thread.
+* @retval If successful, returns zero. Otherwise, an error number is returned to indicate the error.
+*/
+int tsk_thread_join(void** tid)
+{
+ int ret;
+
+ if(!tid){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return -1;
+ }
+ if(!*tid){
+ TSK_DEBUG_WARN("Cannot join NULL tid");
+ return 0;
+ }
+
+#if TSK_UNDER_WINDOWS
+ ret = (WaitForSingleObject(*((HANDLE*)tid), INFINITE) == WAIT_FAILED) ? -1 : 0;
+ if(ret == 0){
+ CloseHandle(*((HANDLE*)tid));
+ *tid = tsk_null;
+ }
+#else
+ if((ret = pthread_join(*((pthread_t*)*tid), 0)) == 0){
+ tsk_free(tid);
+ }
+#endif
+
+ return ret;
+}
+
diff --git a/tinySAK/src/tsk_thread.h b/tinySAK/src/tsk_thread.h
new file mode 100644
index 0000000..4ebe56c
--- /dev/null
+++ b/tinySAK/src/tsk_thread.h
@@ -0,0 +1,45 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_thread.h
+ * @brief Utility functions for threading.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_THREAD_H_
+#define _TINYSAK_THREAD_H_
+
+#include "tinysak_config.h"
+
+TSK_BEGIN_DECLS
+
+TINYSAK_API void tsk_thread_sleep(uint64_t ms);
+TINYSAK_API int tsk_thread_create(void** tid, void *(*start) (void *), void *arg);
+TINYSAK_API int tsk_thread_join(void** tid);
+
+TSK_END_DECLS
+
+#endif
+
+
diff --git a/tinySAK/src/tsk_time.c b/tinySAK/src/tsk_time.c
new file mode 100644
index 0000000..5d2d66b
--- /dev/null
+++ b/tinySAK/src/tsk_time.c
@@ -0,0 +1,154 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_time.c
+* @brief Datetime functions.
+*
+* @author Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* @date Created: Sat Nov 8 16:54:58 2009 mdiop
+*/
+#include "tsk_time.h"
+
+#include "tsk_debug.h"
+
+#if TSK_UNDER_WINDOWS
+//# ifdef _WIN32_WCE
+# include <Winsock2.h> // timeval
+//# endif
+# include <windows.h>
+#elif defined(__SYMBIAN32__)
+# include <_timeval.h>
+#else
+# include <sys/time.h>
+#endif
+
+#include <time.h>
+
+/**@defgroup tsk_time_group Datetime functions.
+*/
+
+#if !HAVE_GETTIMEOFDAY
+#if TSK_UNDER_WINDOWS
+
+/* Thanks to "http://www.cpp-programming.net/c-tidbits/gettimeofday-function-for-windows" */
+#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS)
+#define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64
+#else
+#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
+#endif
+
+struct timezone
+{
+ int tz_minuteswest; /* minutes W of Greenwich */
+ int tz_dsttime; /* type of dst correction */
+};
+
+int gettimeofday(struct timeval *tv, struct timezone *tz)
+{
+ FILETIME ft;
+ uint64_t tmpres = 0;
+ static int tzflag = 0;
+
+ if(tv)
+ {
+#ifdef _WIN32_WCE
+ SYSTEMTIME st;
+ GetSystemTime(&st);
+ SystemTimeToFileTime(&st, &ft);
+#else
+ GetSystemTimeAsFileTime(&ft);
+#endif
+
+ tmpres |= ft.dwHighDateTime;
+ tmpres <<= 32;
+ tmpres |= ft.dwLowDateTime;
+
+ /*converting file time to unix epoch*/
+ tmpres /= 10; /*convert into microseconds*/
+ tmpres -= DELTA_EPOCH_IN_MICROSECS;
+ tv->tv_sec = (long)(tmpres / 1000000UL);
+ tv->tv_usec = (long)(tmpres % 1000000UL);
+ }
+
+ if (tz){
+ if (!tzflag){
+ _tzset();
+ tzflag++;
+ }
+ tz->tz_minuteswest = _timezone / 60;
+ tz->tz_dsttime = _daylight;
+ }
+
+ return 0;
+}
+
+#else
+#pragma error "You MUST provide an implement for 'gettimeofday'"
+#endif /* WIN32 */
+
+#endif /* !HAVE_GETTIMEOFDAY */
+
+/**@ingroup tsk_time_group
+* The tsk_gettimeofday() function shall obtain the current time, expressed as seconds and microseconds since EPOCH (00:00:00 UTC on 1 January 1970).
+* The resolution of the system clock is unspecified.
+* @param tv The current time, expressed as seconds and microseconds since EPOCH(00:00:00 UTC on 1 January 1970).
+* @param tz The timezone.
+* @retval The tsk_gettimeofday() function shall return 0 and no value shall be reserved to indicate an error.
+*/
+int tsk_gettimeofday(struct timeval *tv, struct timezone *tz)
+{
+ return gettimeofday(tv, tz);
+}
+
+/**@ingroup tsk_time_group
+* Gets the number of milliseconds in @a tv
+* @retval The number of milliseconds
+*/
+uint64_t tsk_time_get_ms(struct timeval* tv)
+{
+ if(!tv){
+ TSK_DEBUG_ERROR("Invalid parameter");
+ return 0;
+ }
+ return (((uint64_t)tv->tv_sec)*(uint64_t)1000) + (((uint64_t)tv->tv_usec)/(uint64_t)1000);
+}
+
+/**@ingroup tsk_time_group
+* Gets the number of milliseconds since the EPOCH.
+* @retval The number of milliseconds since EPOCH.
+*/
+uint64_t tsk_time_epoch()
+{
+#if TSK_UNDER_WINDOWS
+ return (uint64_t)timeGetTime();
+#elif HAVE_CLOCK_GETTIME
+ struct timespec ts;
+ clock_gettime(CLOCK_MONOTONIC, &ts);
+ return (((uint64_t)ts.tv_sec)*(uint64_t)1000) + (((uint64_t)ts.tv_nsec)/(uint64_t)1000000);
+#else
+ struct timeval tv;
+ gettimeofday(&tv, 0);
+ return (((uint64_t)tv.tv_sec)*(uint64_t)1000) + (((uint64_t)tv.tv_usec)/(uint64_t)1000);
+#endif
+}
+
diff --git a/tinySAK/src/tsk_time.h b/tinySAK/src/tsk_time.h
new file mode 100644
index 0000000..e351389
--- /dev/null
+++ b/tinySAK/src/tsk_time.h
@@ -0,0 +1,73 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_time.h
+ * @brief Datetime functions.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_TIME_H_
+#define _TINYSAK_TIME_H_
+
+#include "tinysak_config.h"
+
+TSK_BEGIN_DECLS
+
+//#if defined(__SYMBIAN32__) || ANDROID /* Forward declaration */
+struct timeval;
+struct timezone;
+//#endif
+
+/**@ingroup tsk_time_group
+*/
+#define TSK_TIME_S_2_MS(S) ((S)*1000)
+#define TSK_TIME_MS_2_S(MS) ((MS)/1000)
+
+TINYSAK_API int tsk_gettimeofday(struct timeval *tv, struct timezone *tz);
+TINYSAK_API uint64_t tsk_time_get_ms(struct timeval *tv);
+TINYSAK_API uint64_t tsk_time_epoch();
+
+/**@ingroup tsk_time_group
+* Gets the number of milliseconds since the EPOCH.
+*/
+#define tsk_time_now() tsk_time_epoch()
+
+//#ifdef _WIN32_WCE
+//
+//#ifndef TIMEVAL
+///* On wince timeval struct is defined in "Winsock2.h" but I don't want to add it */
+//struct timeval
+//{
+// long tv_sec;
+// long tv_usec;
+//};
+//#define TIMEVAL
+//#endif TIMEVAL
+//
+//#endif
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_TIME_H_ */
+
diff --git a/tinySAK/src/tsk_timer.c b/tinySAK/src/tsk_timer.c
new file mode 100644
index 0000000..0cb4ba0
--- /dev/null
+++ b/tinySAK/src/tsk_timer.c
@@ -0,0 +1,531 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_timer.c
+* @brief Timer Manager.
+*
+* @author Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* @date Created: Sat Nov 8 16:54:58 2009 mdiop
+*/
+#include "tsk_timer.h"
+#include "tsk_debug.h"
+#include "tsk_list.h"
+#include "tsk_thread.h"
+#include "tsk_runnable.h"
+#include "tsk_condwait.h"
+#include "tsk_semaphore.h"
+#include "tsk_time.h"
+
+
+/**@defgroup tsk_timer_group Timers Management
+*/
+
+#define TSK_TIMER_CREATE(timeout, callback, arg) tsk_object_new(tsk_timer_def_t, timeout, callback, arg)
+#define TSK_TIMER_TIMEOUT(self) ((tsk_timer_t*)self)->timeout
+#define TSK_TIMER_GET_FIRST() (manager->timers && manager->timers->head) ? (tsk_timer_t*)(((tsk_list_item_t*)(manager->timers->head))->data) : 0
+
+/**
+ * @struct tsk_timer_s
+ * @brief Timer.
+**/
+typedef struct tsk_timer_s
+{
+ TSK_DECLARE_OBJECT;
+
+ tsk_timer_id_t id; /**< Unique timer identifier. */
+ const void *arg; /**< Opaque data to return with the callback function. */
+ uint64_t timeout; /**< When the timer will timeout(as EPOCH time). */
+ tsk_timer_callback_f callback; /**< The callback function to call after @ref timeout milliseconds. */
+
+ unsigned canceled:1;
+}
+tsk_timer_t;
+typedef tsk_list_t tsk_timers_L_t; /**< List of @ref tsk_timer_t elements. */
+
+/**
+ * @struct tsk_timer_manager_s
+ *
+ * @brief Timer manager.
+**/
+typedef struct tsk_timer_manager_s
+{
+ TSK_DECLARE_RUNNABLE;
+
+ void* mainThreadId[1];
+ tsk_condwait_handle_t *condwait;
+ tsk_mutex_handle_t *mutex;
+ tsk_semaphore_handle_t *sem;
+
+ tsk_timers_L_t *timers;
+}
+tsk_timer_manager_t;
+typedef tsk_list_t tsk_timer_manager_L_t; /**< List of @ref tsk_timer_manager_t elements. */
+
+/*== Definitions */
+static void *__tsk_timer_manager_mainthread(void *param);
+static int __tsk_pred_find_timer_by_id(const tsk_list_item_t *item, const void *id);
+static void __tsk_timer_manager_raise(tsk_timer_t *timer);
+static void *run(void* self);
+
+/**@ingroup tsk_timer_group
+*/
+tsk_timer_manager_handle_t* tsk_timer_manager_create()
+{
+ return tsk_object_new(tsk_timer_manager_def_t);
+}
+
+/**@ingroup tsk_timer_group
+* Starts the timer manager.
+*/
+int tsk_timer_manager_start(tsk_timer_manager_handle_t *self)
+{
+ int err = -1;
+ tsk_timer_manager_t *manager = self;
+
+ TSK_DEBUG_INFO("tsk_timer_manager_start");
+
+ if(!manager){
+ return -1;
+ }
+
+ tsk_mutex_lock(manager->mutex);
+
+ if(!TSK_RUNNABLE(manager)->running && !TSK_RUNNABLE(manager)->started){
+ TSK_RUNNABLE(manager)->run = run;
+ if(err = tsk_runnable_start(TSK_RUNNABLE(manager), tsk_timer_def_t)){
+ //TSK_OBJECT_SAFE_FREE(manager);
+ goto bail;
+ }
+ }
+ else{
+ TSK_DEBUG_WARN("Timer manager already running");
+ }
+
+bail:
+ tsk_mutex_unlock(manager->mutex);
+
+ return err;
+}
+
+#if defined(DEBUG) || defined(_DEBUG) || !defined(NDEBUG)
+/**@ingroup tsk_timer_group
+*/
+void tsk_timer_manager_debug(tsk_timer_manager_handle_t *self)
+{
+ tsk_timer_manager_t *manager = self;
+ if(manager){
+ //int index = 0;
+ tsk_list_item_t *item = tsk_null;
+
+ tsk_mutex_lock(manager->mutex);
+
+ tsk_list_foreach(item, manager->timers){
+ tsk_timer_t* timer = item->data;
+ TSK_DEBUG_INFO("timer [%llu]- %llu, %llu", timer->id, timer->timeout, tsk_time_epoch());
+ }
+
+ tsk_mutex_unlock(manager->mutex);
+ }
+}
+#endif
+
+/**@ingroup tsk_timer_group
+*/
+int tsk_timer_manager_stop(tsk_timer_manager_handle_t *self)
+{
+ int ret = -1;
+ tsk_timer_manager_t *manager = self;
+
+ if(!manager){
+ TSK_DEBUG_ERROR("Invalid paramater");
+ return -1;
+ }
+
+ // all functions called below are thread-safe ==> do not lock
+ // "mainthread" uses manager->mutex and runs in a separate thread ==> deadlock
+
+ if(TSK_RUNNABLE(manager)->running){
+ if(ret = tsk_runnable_stop(TSK_RUNNABLE(manager))){
+ goto bail;
+ }
+
+ tsk_semaphore_increment(manager->sem);
+ tsk_condwait_signal(manager->condwait);
+
+ ret = tsk_thread_join(manager->mainThreadId);
+ goto bail;
+ }
+ else{
+ ret = 0; /* already running. */
+ goto bail;
+ }
+
+bail:
+ return ret;
+}
+
+/**@ingroup tsk_timer_group
+*/
+tsk_timer_id_t tsk_timer_manager_schedule(tsk_timer_manager_handle_t *self, uint64_t timeout, tsk_timer_callback_f callback, const void *arg)
+{
+ tsk_timer_id_t timer_id = TSK_INVALID_TIMER_ID;
+ tsk_timer_manager_t *manager = self;
+
+ if(manager && (TSK_RUNNABLE(manager)->running || TSK_RUNNABLE(manager)->started)){
+ tsk_timer_t *timer;
+
+ timer = TSK_TIMER_CREATE(timeout, callback, arg);
+ timer_id = timer->id;
+ tsk_mutex_lock(manager->mutex);
+ tsk_list_push_ascending_data(manager->timers, ((void**) &timer));
+ tsk_mutex_unlock(manager->mutex);
+
+ //tsk_timer_manager_debug(self);
+
+ tsk_condwait_signal(manager->condwait);
+ tsk_semaphore_increment(manager->sem);
+ }
+
+ return timer_id;
+}
+
+/**@ingroup tsk_timer_group
+*/
+int tsk_timer_manager_cancel(tsk_timer_manager_handle_t *self, tsk_timer_id_t id)
+{
+ int ret = -1;
+ tsk_timer_manager_t *manager = self;
+
+ /* Check validity. */
+ if(!TSK_TIMER_ID_IS_VALID(id)){ /* Very common. */
+ return 0;
+ }
+
+ if(!TSK_LIST_IS_EMPTY(manager->timers) && TSK_RUNNABLE(manager)->running){
+ const tsk_list_item_t *item;
+ tsk_mutex_lock(manager->mutex);
+ item = tsk_list_find_item_by_pred(manager->timers, __tsk_pred_find_timer_by_id, &id);
+ if(item && item->data){
+ tsk_timer_t *timer = item->data;
+ timer->canceled = 1;
+
+ if(item == manager->timers->head){
+ /* The timer we are waiting on ? ==> remove it now. */
+ tsk_condwait_signal(manager->condwait);
+ }
+
+ ret = 0;
+ }
+ tsk_mutex_unlock(manager->mutex);
+ }
+ return ret;
+}
+
+static void *run(void* self)
+{
+ int ret;
+ tsk_list_item_t *curr;
+ tsk_timer_manager_t *manager = self;
+
+ TSK_RUNNABLE(manager)->running = tsk_true; // VERY IMPORTANT --> needed by the main thread
+
+ /* create main thread */
+ if((ret = tsk_thread_create(&(manager->mainThreadId[0]), __tsk_timer_manager_mainthread, manager))){
+ TSK_DEBUG_FATAL("Failed to create mainthread: %d\n", ret);
+ return tsk_null;
+ }
+
+ TSK_DEBUG_INFO("Timer manager run()::enter");
+
+ TSK_RUNNABLE_RUN_BEGIN(manager);
+
+ if(curr = TSK_RUNNABLE_POP_FIRST(manager)){
+ tsk_timer_t *timer = (tsk_timer_t *)curr->data;
+ if(timer->callback){
+ timer->callback(timer->arg, timer->id);
+ }
+ tsk_object_unref(curr);
+ }
+
+ TSK_RUNNABLE_RUN_END(manager);
+
+ TSK_DEBUG_INFO("Timer manager run()::exit");
+
+ return tsk_null;
+}
+
+static int __tsk_pred_find_timer_by_id(const tsk_list_item_t *item, const void *id)
+{
+ tsk_timer_t *timer;
+ if(item && item->data){
+ timer = item->data;
+ return (int)(timer->id - *((tsk_timer_id_t*)id));
+ }
+ return -1;
+}
+
+static void *__tsk_timer_manager_mainthread(void *param)
+{
+ int ret;
+ tsk_timer_t *curr;
+ uint64_t epoch;
+ tsk_timer_manager_t *manager = param;
+
+ TSK_DEBUG_INFO("TIMER MANAGER -- START");
+
+ while(TSK_RUNNABLE(manager)->running){
+ tsk_semaphore_decrement(manager->sem);
+
+peek_first:
+ if(!TSK_RUNNABLE(manager)->running){
+ break;
+ }
+
+ tsk_mutex_lock(manager->mutex);
+ curr = TSK_TIMER_GET_FIRST();
+ tsk_mutex_unlock(manager->mutex);
+
+ if(curr && !curr->canceled) {
+ epoch = tsk_time_epoch();
+ if(epoch >= curr->timeout){
+ tsk_timer_t *timer = tsk_object_ref(curr);
+ //TSK_DEBUG_INFO("Timer raise %llu", timer->id);
+
+ tsk_mutex_lock(manager->mutex);
+ TSK_RUNNABLE_ENQUEUE_OBJECT(TSK_RUNNABLE(manager), timer);
+ tsk_list_remove_item_by_data(manager->timers, curr);
+ tsk_mutex_unlock(manager->mutex);
+ }
+ else{
+ if((ret = tsk_condwait_timedwait(manager->condwait, (curr->timeout - epoch)))){
+ TSK_DEBUG_ERROR("CONWAIT for timer manager failed [%d]", ret);
+ break;
+ }
+ else{
+ goto peek_first;
+ }
+ }
+ }
+ else if(curr){
+ tsk_mutex_lock(manager->mutex);
+ /* TSK_DEBUG_INFO("Timer canceled %llu", curr->id); */
+ tsk_list_remove_item_by_data(manager->timers, curr);
+ tsk_mutex_unlock(manager->mutex);
+ }
+ } /* while() */
+
+ TSK_DEBUG_INFO("TIMER MANAGER -- STOP");
+
+ return 0;
+}
+
+
+
+
+
+/* ================= Global Timer Manager ================= */
+
+static tsk_timer_manager_t* __timer_mgr = tsk_null;
+static int __timer_mgr_start_count = 0;
+
+int tsk_timer_mgr_global_ref()
+{
+ if(!__timer_mgr){
+ __timer_mgr = tsk_timer_manager_create();
+ }
+ else{
+ __timer_mgr = tsk_object_ref(__timer_mgr);
+ }
+ return 0;
+}
+
+int tsk_timer_mgr_global_start()
+{
+ int ret = 0;
+ if(!__timer_mgr){
+ TSK_DEBUG_ERROR("No global Timer manager could be found");
+ return -1;
+ }
+ if(!TSK_RUNNABLE(__timer_mgr)->running && !TSK_RUNNABLE(__timer_mgr)->started){
+ if((ret = tsk_timer_manager_start(__timer_mgr))){
+ return ret;
+ }
+ }
+ __timer_mgr_start_count++;
+ return ret;
+}
+
+tsk_timer_id_t tsk_timer_mgr_global_schedule(uint64_t timeout, tsk_timer_callback_f callback, const void *arg)
+{
+ if(!__timer_mgr){
+ TSK_DEBUG_ERROR("No global Timer manager could be found");
+ return TSK_INVALID_TIMER_ID;
+ }
+ return tsk_timer_manager_schedule(__timer_mgr, timeout, callback, arg);
+}
+
+int tsk_timer_mgr_global_cancel(tsk_timer_id_t id)
+{
+ if(!__timer_mgr){
+ TSK_DEBUG_ERROR("No global Timer manager could be found");
+ return -1;
+ }
+ return tsk_timer_manager_cancel(__timer_mgr, id);
+}
+
+int tsk_timer_mgr_global_stop()
+{
+ int ret = 0;
+ if(!__timer_mgr){
+ TSK_DEBUG_ERROR("No global Timer manager could be found");
+ return -1;
+ }
+
+ if(__timer_mgr_start_count <= 0){
+ TSK_DEBUG_ERROR("Global Timer is in an invalid state");
+ return -2;
+ }
+
+ if(TSK_RUNNABLE(__timer_mgr)->running){
+ if(__timer_mgr_start_count == 1){
+ if((ret = tsk_timer_manager_stop(__timer_mgr))){
+ return ret;
+ }
+ }
+ __timer_mgr_start_count--;
+ }
+ return 0;
+}
+
+int tsk_timer_mgr_global_unref()
+{
+ if(!__timer_mgr){
+ TSK_DEBUG_ERROR("No global Timer manager could be found");
+ return -1;
+ }
+
+ __timer_mgr = tsk_object_unref(__timer_mgr);
+
+ return 0;
+}
+
+
+
+
+
+
+
+//=================================================================================================
+// Timer manager object definition
+//
+static tsk_object_t* tsk_timer_manager_ctor(tsk_object_t * self, va_list * app)
+{
+ tsk_timer_manager_t *manager = self;
+ if(manager){
+ manager->timers = tsk_list_create();
+ manager->sem = tsk_semaphore_create();
+ manager->condwait = tsk_condwait_create();
+ manager->mutex = tsk_mutex_create();
+ }
+ return self;
+}
+
+static tsk_object_t* tsk_timer_manager_dtor(tsk_object_t * self)
+{
+ tsk_timer_manager_t *manager = self;
+
+ if(manager){
+ tsk_timer_manager_stop(manager);
+
+ tsk_semaphore_destroy(&manager->sem);
+ tsk_condwait_destroy(&manager->condwait);
+ tsk_mutex_destroy(&manager->mutex);
+ tsk_object_unref(manager->timers);
+ }
+
+ return self;
+}
+
+static const tsk_object_def_t tsk_timer_manager_def_s =
+{
+ sizeof(tsk_timer_manager_t),
+ tsk_timer_manager_ctor,
+ tsk_timer_manager_dtor,
+ tsk_null,
+};
+const tsk_object_def_t * tsk_timer_manager_def_t = &tsk_timer_manager_def_s;
+
+
+
+
+
+
+//=================================================================================================
+// Timer object definition
+//
+static tsk_object_t* tsk_timer_ctor(tsk_object_t * self, va_list * app)
+{
+ static tsk_timer_id_t tsk_unique_timer_id = 1;
+ tsk_timer_t *timer = self;
+ if(timer){
+ timer->id = tsk_unique_timer_id++;
+ timer->timeout = va_arg(*app, uint64_t);
+ timer->callback = va_arg(*app, tsk_timer_callback_f);
+ timer->arg = va_arg(*app, const void *);
+
+ timer->timeout += tsk_time_epoch();
+ }
+ return self;
+}
+
+static tsk_object_t* tsk_timer_dtor(tsk_object_t * self)
+{
+ tsk_timer_t *timer = self;
+ if(timer){
+ }
+
+ return self;
+}
+
+static int tsk_timer_cmp(const tsk_object_t *obj1, const tsk_object_t *obj2)
+{
+ const tsk_timer_t *t1 = obj1;
+ const tsk_timer_t *t2 = obj2;
+
+ if(t1 && t2){
+ return (int)(t1->timeout - t2->timeout);
+ }
+ else if(!t1 && !t2) return 0;
+ else return -1;
+}
+
+static const tsk_object_def_t tsk_timer_def_s =
+{
+ sizeof(tsk_timer_t),
+ tsk_timer_ctor,
+ tsk_timer_dtor,
+ tsk_timer_cmp,
+};
+const tsk_object_def_t * tsk_timer_def_t = &tsk_timer_def_s;
+
+
diff --git a/tinySAK/src/tsk_timer.h b/tinySAK/src/tsk_timer.h
new file mode 100644
index 0000000..efe6743
--- /dev/null
+++ b/tinySAK/src/tsk_timer.h
@@ -0,0 +1,94 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_timer.h
+ * @brief Timer Manager.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_TIMER_H_
+#define _TINYSAK_TIMER_H_
+
+#include "tinysak_config.h"
+
+#include "tsk_object.h"
+
+TSK_BEGIN_DECLS
+
+
+/**@ingroup tsk_timer_group
+* @def TSK_TIMER_CALLBACK
+*/
+#define TSK_TIMER_CALLBACK_F(callback) ((tsk_timer_callback_f)callback)
+
+/**@ingroup tsk_timer_group
+* @def TSK_INVALID_TIMER_ID
+*/
+/**@ingroup tsk_timer_group
+* @def TSK_TIMER_ID_IS_VALID
+*/
+#define TSK_INVALID_TIMER_ID 0
+#define TSK_TIMER_ID_IS_VALID(id) ((id) != TSK_INVALID_TIMER_ID)
+
+/**@ingroup tsk_timer_group
+* @def tsk_timer_manager_handle_t
+*/
+/**@ingroup tsk_timer_group
+* @def tsk_timer_id_t
+*/
+/**@ingroup tsk_timer_group
+* @def tsk_timer_callback
+*/
+typedef void tsk_timer_manager_handle_t;
+typedef uint64_t tsk_timer_id_t;
+typedef int (*tsk_timer_callback_f)(const void* arg, tsk_timer_id_t timer_id);
+
+TINYSAK_API tsk_timer_manager_handle_t* tsk_timer_manager_create();
+
+TINYSAK_API int tsk_timer_manager_start(tsk_timer_manager_handle_t *self);
+TINYSAK_API int tsk_timer_manager_stop(tsk_timer_manager_handle_t *self);
+#if defined(DEBUG) || defined(_DEBUG)
+TINYSAK_API void tsk_timer_manager_debug(tsk_timer_manager_handle_t *self);
+#endif
+
+TINYSAK_API tsk_timer_id_t tsk_timer_manager_schedule(tsk_timer_manager_handle_t *self, uint64_t timeout, tsk_timer_callback_f callback, const void *arg);
+TINYSAK_API int tsk_timer_manager_cancel(tsk_timer_manager_handle_t *self, tsk_timer_id_t id);
+
+
+// Global Timer manager
+TINYSAK_API int tsk_timer_mgr_global_ref();
+TINYSAK_API int tsk_timer_mgr_global_start();
+TINYSAK_API tsk_timer_id_t tsk_timer_mgr_global_schedule(uint64_t timeout, tsk_timer_callback_f callback, const void *arg);
+TINYSAK_API int tsk_timer_mgr_global_cancel(tsk_timer_id_t id);
+TINYSAK_API int tsk_timer_mgr_global_stop();
+TINYSAK_API int tsk_timer_mgr_global_unref();
+
+
+TINYSAK_GEXTERN const tsk_object_def_t *tsk_timer_def_t;
+TINYSAK_GEXTERN const tsk_object_def_t *tsk_timer_manager_def_t;
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_TIMER_H_ */
+
diff --git a/tinySAK/src/tsk_url.c b/tinySAK/src/tsk_url.c
new file mode 100644
index 0000000..68a9915
--- /dev/null
+++ b/tinySAK/src/tsk_url.c
@@ -0,0 +1,92 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_url.c
+ * @brief Utility functions to encode/decode urls.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tsk_url.h"
+#include "tsk_memory.h"
+#include "tsk_string.h"
+
+#include <ctype.h>
+#include <string.h>
+
+/**@defgroup tsk_url_group Utility functions to encode/decode urls.
+*/
+
+
+/**@ingroup tsk_url_group
+* Encode an url.
+* @param url The url to encode
+* @retval The encoded url. It is up to you to free the returned string.
+*
+* @sa tsk_url_decode
+*
+*/
+char* tsk_url_encode(const char* url) {
+ char *purl = (char*)url, *buf = tsk_malloc(tsk_strlen(url) * 3 + 1), *pbuf = buf;
+ while (*purl) {
+ if (isalnum(*purl) || *purl == '-' || *purl == '_' || *purl == '.' || *purl == '~'){
+ *pbuf++ = *purl;
+ }
+ else if (*purl == ' '){
+ *pbuf++ = '+';
+ }
+ else{
+ *pbuf++ = '%', *pbuf++ = tsk_b10tob16(*purl >> 4), *pbuf++ = tsk_b10tob16(*purl & 15);
+ }
+ purl++;
+ }
+ *pbuf = '\0';
+ return buf;
+}
+
+/**@ingroup tsk_url_group
+* Decode an url.
+* @param url The url to encode
+* @retval The decoded url. It is up to you to free the returned string.
+*
+* @sa tsk_url_encode
+*/
+char* tsk_url_decode(const char* url) {
+ char *purl = (char*)url, *buf = tsk_malloc(tsk_strlen(url) + 1), *pbuf = buf;
+ while (*purl) {
+ if (*purl == '%') {
+ if (purl[1] && purl[2]) {
+ *pbuf++ = tsk_b16tob10(purl[1]) << 4 | tsk_b16tob10(purl[2]);
+ purl += 2;
+ }
+ } else if (*purl == '+') {
+ *pbuf++ = ' ';
+ } else {
+ *pbuf++ = *purl;
+ }
+ purl++;
+ }
+ *pbuf = '\0';
+ return buf;
+}
+
diff --git a/tinySAK/src/tsk_url.h b/tinySAK/src/tsk_url.h
new file mode 100644
index 0000000..5b213be
--- /dev/null
+++ b/tinySAK/src/tsk_url.h
@@ -0,0 +1,43 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_url.h
+ * @brief Useful string functions to manipulate strings.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_URL_H_
+#define _TINYSAK_URL_H_
+
+#include "tinysak_config.h"
+
+TSK_BEGIN_DECLS
+
+TINYSAK_API char* tsk_url_encode(const char* url);
+TINYSAK_API char* tsk_url_decode(const char* url);
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_URL_H_ */
+
diff --git a/tinySAK/src/tsk_uuid.c b/tinySAK/src/tsk_uuid.c
new file mode 100644
index 0000000..18c04f3
--- /dev/null
+++ b/tinySAK/src/tsk_uuid.c
@@ -0,0 +1,92 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_uuid.c
+ * @brief Universally Unique Identifier (UUID version 5) implementation (RFC 4122).
+ * This implementation is not fully conform to RFC 4122 but could be safely used to generate random UUIDs.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tsk_uuid.h"
+
+#include "tsk_sha1.h"
+#include "tsk_string.h"
+#include "tsk_time.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+/**@defgroup tsk_uuid_group niversally Unique Identifier (UUID version 5) implementation (RFC 4122).
+*/
+
+/**@ingroup tsk_uuid_group
+*/
+int tsk_uuidgenerate(tsk_uuidstring_t *result)
+{
+ /* From wikipedia
+ * Version 5 UUIDs use a scheme with SHA-1 hashing, otherwise it is the same idea as in version 3.
+ * RFC 4122 states that version 5 is preferred over version 3 name based UUIDs.
+ * Note that the 160 bit SHA-1 hash is truncated to 128 bits to make the length work out.
+ */
+ tsk_sha1string_t sha1result;
+ tsk_istr_t epoch;
+ unsigned i, k;
+ static char HEX[] = "0123456789abcdef";
+
+ tsk_itoa(tsk_time_epoch(), &epoch);
+ tsk_sha1compute(epoch, sizeof(epoch), &sha1result);
+
+ /* XOR the SHA-1 result with random numbers. */
+ for(i=0; i<(TSK_UUID_DIGEST_SIZE*2); i+=4){
+#if 0
+ *((uint32_t*)&sha1result[i]) ^= rand();
+#else
+ k = rand();
+ sha1result[i] ^= k, sha1result[i + 1] ^= k,
+ sha1result[i + 2] ^= k, sha1result[i + 3] ^= k;
+#endif
+
+ for(k=0; k<sizeof(uint32_t); k++){
+ sha1result[i+k] = HEX[sha1result[i+k] & 0x0F]; /* To hexa. */
+ }
+ }
+
+ /* f47ac10b-58cc-4372-a567-0e02b2c3d479 */
+ memcpy(&(*result)[0], &sha1result[0], 8);
+ (*result)[8] = '-';
+
+ memcpy(&(*result)[9], &sha1result[8], 4);
+ (*result)[13] = '-';
+
+ memcpy(&(*result)[14], &sha1result[12], 4);
+ (*result)[18] = '-';
+
+ memcpy(&(*result)[19], &sha1result[16], 4);
+ (*result)[23] = '-';
+
+ memcpy(&(*result)[24], &sha1result[20], 12);
+ (*result)[36] = '\0';
+
+ return 0;
+}
diff --git a/tinySAK/src/tsk_uuid.h b/tinySAK/src/tsk_uuid.h
new file mode 100644
index 0000000..fff47ba
--- /dev/null
+++ b/tinySAK/src/tsk_uuid.h
@@ -0,0 +1,48 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_uuid.h
+ * @brief Universally Unique Identifier (UUID version 5) implementation (RFC 4122).
+ * This implementation is not fully conform to RFC 4122 but could be safely used to generate random UUIDs.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_UUID_H_
+#define _TINYSAK_UUID_H_
+
+#include "tinysak_config.h"
+
+TSK_BEGIN_DECLS
+
+#define TSK_UUID_DIGEST_SIZE 16
+#define TSK_UUID_STRING_SIZE ((TSK_UUID_DIGEST_SIZE*2)+4/*-*/)
+
+typedef char tsk_uuidstring_t[TSK_UUID_STRING_SIZE+1]; /**< Hexadecimal UUID digest string. */
+typedef char tsk_uuiddigest_t[TSK_UUID_DIGEST_SIZE]; /**< UUID digest bytes. */
+
+TINYSAK_API int tsk_uuidgenerate(tsk_uuidstring_t *result);
+
+TSK_END_DECLS
+
+#endif /* _TINYSAK_UUID_H_ */
diff --git a/tinySAK/src/tsk_xml.c b/tinySAK/src/tsk_xml.c
new file mode 100644
index 0000000..0c1c56b
--- /dev/null
+++ b/tinySAK/src/tsk_xml.c
@@ -0,0 +1,296 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_xml.c
+ * @brief Useful functions to manipulate xml documents.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#include "tsk_xml.h"
+
+#if HAVE_LIBXML2_H
+
+#include "tsk_string.h"
+#include "tsk_memory.h"
+#include "tsk_macros.h"
+
+#include <string.h>
+
+/**@defgroup tsk_xml_group XML
+*/
+
+/**@page tsk_xml_page XML Tutorial
+*/
+
+
+/**@ingroup tsk_xml_group
+* Initialize an XML namespace
+* @param namespace The XML namespace to initialize.
+*/
+/*void tsk_xml_namespace_init(tsk_xml_namespace_t* namespace)
+{
+}*/
+
+/**@ingroup tsk_xml_group
+* Free an XML namespace
+* @param namespace The namespace to free
+*/
+/*void tsk_xml_namespace_free(tsk_xml_namespace_t** namespace)
+{
+ TSK_FREE((*namespace)->prefix);
+ TSK_FREE((*namespace)->value);
+ TSK_FREE(namespace);
+}*/
+
+/**@ingroup tsk_xml_group
+* Initialize an XML element
+* @param element The XML element to initialize
+*/
+/*void tsk_xml_element_init(tsk_xml_element_t* element)
+{
+}*/
+
+/**@ingroup tsk_xml_group
+* Initialize an XML element and set values
+* @param element The XML element to initialize
+* @param name The element name
+* @param value The element value
+* @param type The element type
+*/
+void tsk_xml_element_init_set(tsk_xml_element_t** element, const char* name, const char* value, tsk_xml_type_t type)
+{
+ TSK_XML_ELEMENT_CREATE((*element));
+ (*element)->elements = TSK_LIST_CREATE();
+ (*element)->attributes = TSK_LIST_CREATE();
+ (*element)->namespaces = TSK_LIST_CREATE();
+ (*element)->name = tsk_strdup(name);
+ (*element)->value = tsk_strdup(value);
+ (*element)->type = type;
+}
+
+/**@ingroup tsk_xml_group
+* Free an XML element
+* @param _element The XML element to free
+*/
+/*void tsk_xml_element_free(void** _element)
+{
+ tsk_xml_element_t** element = (tsk_xml_element_t**)_element;
+
+ TSK_FREE((*element)->name);
+ TSK_FREE((*element)->value);
+ TSK_OBJECT_SAFE_FREE((*element)->elements);
+ TSK_OBJECT_SAFE_FREE((*element)->attributes);
+ TSK_OBJECT_SAFE_FREE((*element)->namespaces);
+
+ TSK_FREE(element);
+}*/
+
+/**@ingroup tsk_xml_group
+* Initialize an XML attribute
+* @param attribute The XML attribute to initialize
+*/
+/*void tsk_xml_attribute_init(tsk_xml_attribute_t* attribute)
+{
+}*/
+
+/**@ingroup tsk_xml_group
+* Free an XML attribute
+* @param attribute The XML attribute to free
+*/
+/*void tsk_xml_attribute_free(tsk_xml_attribute_t** attribute)
+{
+ TSK_FREE((*attribute)->name);
+ TSK_FREE((*attribute)->value);
+
+ TSK_FREE(attribute);
+}*/
+
+/**@ingroup tsk_xml_group
+* Get an XML namespace from an XML document
+* @param docPtr A pointer to the XML document
+* @param node The XML node from which to extract the namespace
+* @param href The namespace href
+* @retval The Namespace value matching our criteria (href)
+*/
+xmlNsPtr tsk_xml_get_namespace(xmlDocPtr docPtr, xmlNodePtr node, const char *href)
+{
+ xmlNs *ns = *xmlGetNsList(docPtr, node);
+ while (ns)
+ {
+ if (tsk_striequals(ns->href, href)) return ns;
+ else ns = ns->next;
+ }
+
+ return 0;
+}
+
+/**@ingroup tsk_xml_group
+* Find an XML node by name
+* @param curr The XML node from which to start
+* @param name The name of the XML node to find
+* @param ftype The find type
+* @retval Returns the node which match our criteria. If none match, this method returns NULL.
+*/
+xmlNodePtr tsk_xml_find_node(const xmlNodePtr curr, const char* name, tsk_xml_node_find_type_t ftype)
+{
+ xmlNodePtr node = curr;
+
+ while(node)
+ {
+ switch(ftype)
+ {
+ case nft_none: return (tsk_striequals(node->name, name))? node : 0;
+ case nft_children: node = node->children; break;
+ case nft_parent: node = node->parent; break;
+ case nft_next: node = node->next; break;
+ case nft_prev: node = node->prev; break;
+ default: return 0;
+ } /* switch */
+
+ /* check and return value if match */
+ if( node && (!name || tsk_striequals(node->name, name)) )
+ //if( node && (name == 0 || !tsk_stricmp((const char*)node->name, name)) )
+ {
+ return node;
+ }
+ }
+
+ return 0;
+}
+
+/**@ingroup tsk_xml_group
+* Select an XML node
+* @retval Returns the pointer to the node which match our criteria. If none match, this method returns NULL.
+*/
+xmlNodePtr tsk_xml_select_node(const xmlNodePtr root, ...)
+{
+ va_list list;
+ int step;
+ char* root_name = 0;
+ xmlNodePtr node = root;
+
+ if(!node || !(node->name)) return 0;
+
+ /* initialize variable arguments */
+ va_start(list, root);
+
+ while( node && (step=va_arg(list, tsk_xml_node_select_type_t)) != nst_end)
+ {
+ switch(step)
+ {
+ case nst_by_name:
+ { /* name */
+ const char* qname = va_arg(list, const char*);
+ if(tsk_striequals(root->name, qname)){
+ node = tsk_xml_find_node(node, 0, nft_children);
+ }
+ else{
+ if(!tsk_striequals(node->name, qname))
+ { /* do not match */
+ node = tsk_xml_find_node(node, qname, nft_next);
+ }
+ else
+ { /* already match */
+ node = node->children;
+ }
+ }
+ break;
+ }
+
+ case nst_content:
+ { /**/
+ node = tsk_xml_find_node(node, 0, nft_children);
+ break;
+ }
+
+ case nst_att_value:
+ { /* qname, att_name */
+ xmlAttrPtr attrPtr = 0;
+ int found = 0;
+ const char* qname = va_arg(list, const char*);
+ const char* att_name = va_arg(list, const char*);
+ node = tsk_xml_find_node(node, qname, nft_none);
+ while( node && !found )
+ {
+ attrPtr = node->properties;
+ while(attrPtr)
+ {
+ if(attrPtr->type == XML_ATTRIBUTE_NODE && attrPtr->children)
+ {
+ if( tsk_striequals(attrPtr->name, att_name) ){
+ node = attrPtr->children;
+ found = 1;
+ }
+ }
+ attrPtr = attrPtr->next;
+ }
+ if(!found) node = tsk_xml_find_node(node, 0, nft_next);
+ }
+ break;
+ }
+
+ case nst_by_att:
+ { /* qname att_name att_value */
+ xmlAttrPtr attrPtr = 0;
+ int found = 0;
+ const char* qname = va_arg(list, const char*);
+ const char* att_name = va_arg(list, const char*);
+ const char* att_value = va_arg(list, const char*);
+ node = tsk_xml_find_node(node, qname, nft_none);
+ while( node && !found )
+ {
+ attrPtr = node->properties;
+ while(attrPtr)
+ {
+ if(attrPtr->type == XML_ATTRIBUTE_NODE && attrPtr->children)
+ {
+ if( tsk_striequals(attrPtr->name, att_name)
+ && ( (attrPtr->children->content && tsk_striequals(attrPtr->children->content, att_value)) || !att_value )
+ ){
+ found = 1;
+ }
+ }
+ attrPtr = attrPtr->next;
+ }
+ if(!found) node = tsk_xml_find_node(node, 0, nft_next);
+ }
+
+ if(found && node) break;
+ else return 0;
+
+ break;
+ }
+ default: return 0;
+ } /* switch */
+
+ /* skip all comments */
+ TSK_XML_NODE_SKIP_COMMENTS(node);
+
+ } /* while*/
+
+ return node;
+}
+
+#endif /* HAVE_LIBXML2_H */
+
diff --git a/tinySAK/src/tsk_xml.h b/tinySAK/src/tsk_xml.h
new file mode 100644
index 0000000..9dc9e63
--- /dev/null
+++ b/tinySAK/src/tsk_xml.h
@@ -0,0 +1,175 @@
+/*
+* Copyright (C) 2009-2010 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+/**@file tsk_xml.h
+ * @brief Useful functions to manipulate xml document.
+ *
+ * @author Mamadou Diop <diopmamadou(at)doubango.org>
+ *
+ * @date Created: Sat Nov 8 16:54:58 2009 mdiop
+ */
+#ifndef _TINYSAK_XML_H_
+#define _TINYSAK_XML_H_
+
+#include "tinysak_config.h"
+#include "tsk_list.h"
+
+#if HAVE_LIBXML2_H
+#include <libxml/tree.h>
+
+#define TSK_XML_NODE_IS_TEXTVALUE(node) (node && node->type==XML_TEXT_NODE)
+#define TSK_XML_NODE_SAFE_GET_TEXTVALUE(node) (const char*)(TSK_XML_NODE_IS_TEXTVALUE(node)?(node->content):0)
+#define TSK_XML_NODE_SKIP_COMMENTS(node) while(node && (node->type==XML_COMMENT_NODE)) node = tsk_xml_find_node(node, 0, nft_next);
+
+
+#define TSK_XML_NODE_SELECT_BY_NAME(qname) nst_by_name, qname
+#define TSK_XML_NODE_SELECT_BY_ATT(qname, att_name, att_value) nst_by_att, qname, att_name, att_value
+#define TSK_XML_NODE_SELECT_ATT_VALUE(qname, att_name) nst_att_value, qname, att_name
+#define TSK_XML_NODE_SELECT_CONTENT() nst_content
+#define TSK_XML_NODE_SELECT_END() nst_end
+
+#define TSK_XML_NAMESPACE_CREATE() tsk_object_new(tsk_xml_namespace_def_t)
+#define TSK_XML_NAMESPACE_FREE(self) tsk_object_unref(self), self = 0
+
+#define TSK_XML_ELEMENT_CREATE(element) tsk_object_new(tsk_xml_element_def_t)
+#define TSK_XML_ELEMENT_FREE(self) tsk_object_unref(self), self = 0
+
+#define TSK_XML_ATTRIBUTE_CREATE(attribute) tsk_object_new(tsk_xml_attribute_def_t)
+#define TSK_XML_ATTRIBUTE_FREE(self) tsk_object_unref(self), self = 0
+
+#define TSK_XML_SERIALIZE(result, element, strValue)\
+ if(strValue) tsk_sprintf(&result, "<"##element##">%s</"##element##">", strValue); \
+ else tsk_strupdate(&result, "");
+
+/** C and XML Schema mapping */
+typedef enum tsk_xml_type_e
+{
+ xt_none,
+ xt_string, /* xsd:string */
+ xt_byte, /* xsd:byte */
+ xt_unsignedByte, /* xsd:unsignedByte */
+ xt_short, /* xsd:short */
+ xt_unsignedShort, /* xsd:unsignedShort */
+ xt_int, /* xsd:int */
+ xt_unsignedInt, /* xsd:unsignedInt */
+ xt_long, /* xsd:long */
+ xt_boolean, /* xsd:boolean */
+ xt_float, /* xsd:float */
+ xt_double /* xsd:double */
+}
+tsk_xml_type_t;
+
+/** Node finding types */
+typedef enum tsk_xml_node_find_type_s
+{
+ nft_none,
+ nft_children,
+ nft_parent,
+ nft_next,
+ nft_prev
+}
+tsk_xml_node_find_type_t;
+
+/** Element selection types */
+typedef enum tsk_xml_node_select_type_s
+{
+ nst_by_name,
+ nst_by_att,
+ nst_att_value,
+ nst_content,
+ nst_end
+}
+tsk_xml_node_select_type_t;
+
+/** XML namespace */
+typedef struct tsk_xml_namespace_s
+{
+ TSK_DECLARE_OBJECT;
+
+ char* prefix;
+ char* value;
+}
+tsk_xml_namespace_t;
+
+/** XML attribute */
+typedef struct tsk_xml_attribute_s
+{
+ TSK_DECLARE_OBJECT;
+
+ char* name;
+ void* value;
+ tsk_xml_type_t type;
+}
+tsk_xml_attribute_t;
+
+/** XML element */
+typedef struct tsk_xml_element_s
+{
+ TSK_DECLARE_OBJECT;
+
+ char* name;
+ void* value;
+ tsk_list_t* elements;
+ tsk_list_t* attributes;
+ tsk_list_t* namespaces;
+ tsk_xml_type_t type;
+}
+tsk_xml_element_t;
+
+typedef tsk_list_t tsk_xml_elements_t;
+typedef tsk_list_t tsk_xml_attributes_t;
+typedef tsk_list_t tsk_xml_namespaces_t;
+
+#define tsk_xml_elements_init tsk_list_init
+#define tsk_xml_attributes_init tsk_list_init
+#define tsk_xml_namespaces_init tsk_list_init
+
+#define tsk_xml_elements_add tsk_list_add_data
+#define tsk_xml_attributes_add tsk_list_add_data
+#define tsk_xml_namespaces_add tsk_list_add_data
+
+#define tsk_xml_elements_free tsk_list_free
+#define tsk_xml_attributes_free tsk_list_free
+#define tsk_xml_namespaces_free tsk_list_free
+
+//TINYSAK_API void tsk_xml_namespace_init(tsk_xml_namespace_t* _namespace);
+//TINYSAK_API void tsk_xml_namespace_free(tsk_xml_namespace_t** _namespace);
+
+//TINYSAK_API void tsk_xml_element_init(tsk_xml_element_t* element);
+TINYSAK_API void tsk_xml_element_init_set(tsk_xml_element_t** element, const char* name, const char* value, tsk_xml_type_t type);
+//TINYSAK_API void tsk_xml_element_free(void** element);
+
+//TINYSAK_API void tsk_xml_attribute_init(tsk_xml_attribute_t* attribute);
+//TINYSAK_API void tsk_xml_attribute_free(tsk_xml_attribute_t** attribute);
+
+TINYSAK_API xmlNsPtr tsk_xml_get_namespace(xmlDocPtr docPtr, xmlNodePtr node, const char *href);
+TINYSAK_API xmlNodePtr tsk_xml_find_node(const xmlNodePtr curr, const char* name, tsk_xml_node_find_type_t ftype);
+TINYSAK_API xmlNodePtr tsk_xml_select_node(const xmlNodePtr root, ...);
+
+TINYSAK_GEXTERN const void *tsk_xml_namespace_def_t;
+TINYSAK_GEXTERN const void *tsk_xml_attribute_def_t;
+TINYSAK_GEXTERN const void *tsk_xml_element_def_t;
+
+#endif /* HAVE_LIBXML2_H */
+
+#endif /* _TINYSAK_XML_H_ */
+
diff --git a/tinySAK/test/Makefile.am b/tinySAK/test/Makefile.am
new file mode 100644
index 0000000..0e984d8
--- /dev/null
+++ b/tinySAK/test/Makefile.am
@@ -0,0 +1,7 @@
+INCLUDES = -I../src
+
+bin_PROGRAMS = testSAK
+
+testSAK_SOURCES = test.c
+
+testSAK_LDADD = -ltinySAK \ No newline at end of file
diff --git a/tinySAK/test/droid-makefile b/tinySAK/test/droid-makefile
new file mode 100644
index 0000000..2905a66
--- /dev/null
+++ b/tinySAK/test/droid-makefile
@@ -0,0 +1,28 @@
+APP := test
+
+CFLAGS := $(CFLAGS_COMMON) -I../src
+LDFLAGS := $(LDFLAGS_COMMON) -Wl,-Bsymbolic,--whole-archive -l$(PROJECT) -Wl,--entry=main
+
+all: $(APP)
+
+OBJS += $(APP).o
+
+$(APP): $(OBJS)
+ $(CC) $(LDFLAGS) -o $@ $^
+
+%.o: %.c
+ $(CC) -c $(INCLUDE) $(CFLAGS) $< -o $@
+
+install: $(APP)
+ $(ANDROID_SDK_ROOT)/tools/adb push $(APP) $(EXEC_DIR)/$(APP)
+ $(ANDROID_SDK_ROOT)/tools/adb shell chmod 777 $(EXEC_DIR)/$(APP)
+
+run:
+ $(ANDROID_SDK_ROOT)/tools/adb shell $(EXEC_DIR)/$(APP)
+
+#dbg:
+# $(MAKE) $(MAKEFILE) DEBUG="-g -DDEBUG"
+# $(MAKE) $(MAKEFILE) install
+
+clean:
+ @rm -f $(OBJS) $(APP) \ No newline at end of file
diff --git a/tinySAK/test/stdafx.c b/tinySAK/test/stdafx.c
new file mode 100644
index 0000000..59df1b5
--- /dev/null
+++ b/tinySAK/test/stdafx.c
@@ -0,0 +1,26 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+#include "stdafx.h"
+
+// TODO: reference any additional headers you need in STDAFX.H
+// and not in this file
diff --git a/tinySAK/test/stdafx.h b/tinySAK/test/stdafx.h
new file mode 100644
index 0000000..cb6db1a
--- /dev/null
+++ b/tinySAK/test/stdafx.h
@@ -0,0 +1,37 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+#ifndef TEST_TINYSAK_STDAFX_H
+#define TEST_TINYSAK_STDAFX_H
+
+#include "targetver.h"
+
+#include <stdio.h>
+
+#if (defined(_WIN32) || defined(WIN32) || defined(_WIN32_WCE)) && !defined(__SYMBIAN32__)
+#include <tchar.h>
+#endif
+
+//#define TINYSAK_IMPORTS
+
+// TODO: reference additional headers your program requires here
+#endif /* TEST_TINYSAK_STDAFX_H */
diff --git a/tinySAK/test/targetver.h b/tinySAK/test/targetver.h
new file mode 100644
index 0000000..51d3175
--- /dev/null
+++ b/tinySAK/test/targetver.h
@@ -0,0 +1,18 @@
+#ifndef _TEST_TINYSAK_VER
+#define _TEST_TINYSAK_VER
+
+#if (defined(_WIN32) || defined(WIN32) || defined(_WIN32_WCE)) && !defined(__SYMBIAN32__)
+// The following macros define the minimum required platform. The minimum required platform
+// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run
+// your application. The macros work by enabling all features available on platform versions up to and
+// including the version specified.
+
+// Modify the following defines if you have to target a platform prior to the ones specified below.
+// Refer to MSDN for the latest info on corresponding values for different platforms.
+#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista.
+#define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows.
+#endif
+
+#endif
+
+#endif
diff --git a/tinySAK/test/test.c b/tinySAK/test/test.c
new file mode 100644
index 0000000..bb590c9
--- /dev/null
+++ b/tinySAK/test/test.c
@@ -0,0 +1,278 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+#include "stdafx.h"
+#include <string.h>
+#include <stdlib.h>
+#include <assert.h>
+
+#include "tsk.h"
+
+#if defined(WIN32) || defined(_WIN32) || defined(_WIN32_WCE)
+# define strdup _strdup
+#endif
+
+
+#define LOOP 1
+
+#define RUN_TEST_ALL 0
+#define RUN_TEST_LISTS 0
+#define RUN_TEST_HEAP 0
+#define RUN_TEST_STRINGS 1
+#define RUN_TEST_URL 0
+#define RUN_TEST_THREADS 0
+#define RUN_TEST_MUTEX 0
+#define RUN_TEST_CONDWAIT 0
+#define RUN_TEST_SEMAPHORE 0
+#define RUN_TEST_SAFEOBJECT 0
+#define RUN_TEST_OBJECT 0
+#define RUN_TEST_PARAMS 0
+#define RUN_TEST_OPTIONS 0
+#define RUN_TEST_TIMER 0
+#define RUN_TEST_RUNNABLE 0
+#define RUN_TEST_BUFFER 0
+#define RUN_TEST_MD5 0
+#define RUN_TEST_SHA1 0
+#define RUN_TEST_BASE64 0
+#define RUN_TEST_UUID 0
+#define RUN_TEST_FSM 0
+
+#if RUN_TEST_LISTS || RUN_TEST_ALL
+#include "test_lists.h"
+#endif
+
+#if RUN_TEST_HEAP || RUN_TEST_ALL
+#include "test_heap.h"
+#endif
+
+#if RUN_TEST_STRINGS || RUN_TEST_ALL
+#include "test_strings.h"
+#endif
+
+#if RUN_TEST_URL || RUN_TEST_ALL
+#include "test_url.h"
+#endif
+
+#if RUN_TEST_THREADS || RUN_TEST_ALL
+#include "test_threads.h"
+#endif
+
+#if RUN_TEST_MUTEX || RUN_TEST_ALL
+#include "test_mutex.h"
+#endif
+
+#if RUN_TEST_CONDWAIT || RUN_TEST_ALL
+#include "test_condwait.h"
+#endif
+
+#if RUN_TEST_SEMAPHORE || RUN_TEST_ALL
+#include "test_semaphore.h"
+#endif
+
+#if RUN_TEST_SAFEOBJECT || RUN_TEST_ALL
+//#include "test_safeobject.h"
+#endif
+
+#if RUN_TEST_OBJECT || RUN_TEST_ALL
+#include "test_object.h"
+#endif
+
+#if RUN_TEST_PARAMS || RUN_TEST_ALL
+#include "test_params.h"
+#endif
+
+#if RUN_TEST_OPTIONS || RUN_TEST_ALL
+#include "test_options.h"
+#endif
+
+#if RUN_TEST_TIMER || RUN_TEST_ALL
+#include "test_timer.h"
+#endif
+
+#if RUN_TEST_RUNNABLE || RUN_TEST_ALL
+#include "test_runnable.h"
+#endif
+
+#if RUN_TEST_BUFFER || RUN_TEST_ALL
+#include "test_buffer.h"
+#endif
+
+#if RUN_TEST_MD5 || RUN_TEST_ALL
+#include "test_md5.h"
+#endif
+
+#if RUN_TEST_SHA1 || RUN_TEST_ALL
+#include "test_sha1.h"
+#endif
+
+#if RUN_TEST_BASE64 || RUN_TEST_ALL
+#include "test_base64.h"
+#endif
+
+#if RUN_TEST_UUID || RUN_TEST_ALL
+#include "test_uuid.h"
+#endif
+
+#if RUN_TEST_FSM || RUN_TEST_ALL
+#include "test_fsm.h"
+#endif
+
+
+#ifdef _WIN32_WCE
+int _tmain(int argc, _TCHAR* argv[])
+#else
+int main()
+#endif
+{
+ do
+ {
+ /* Print copyright information */
+ printf("Doubango Project\nCopyright (C) 2009 Mamadou Diop \n\n");
+
+#if RUN_TEST_LISTS || RUN_TEST_ALL
+ /* linked lists */
+ test_basic_list();
+ printf("\n\n");
+ test_complex_list();
+ printf("\n\n");
+ test_filtered_list();
+ printf("\n\n");
+#endif
+
+#if RUN_TEST_HEAP || RUN_TEST_ALL
+ /* heap */
+ test_heap();
+ printf("\n\n");
+#endif
+
+#if RUN_TEST_STRINGS || RUN_TEST_ALL
+ /* strings */
+ test_strings();
+ printf("\n\n");
+#endif
+
+#if RUN_TEST_URL || RUN_TEST_ALL
+ /* url */
+ test_url();
+ printf("\n\n");
+#endif
+
+#if RUN_TEST_THREADS || RUN_TEST_ALL
+ /* threads */
+ test_threads();
+ printf("\n\n");
+#endif
+
+#if RUN_TEST_MUTEX || RUN_TEST_ALL
+ /* mutex */
+ test_mutex();
+ printf("\n\n");
+#endif
+
+#if RUN_TEST_CONDWAIT || RUN_TEST_ALL
+ /* condwait */
+ test_condwait();
+ printf("\n\n");
+#endif
+
+#if RUN_TEST_SEMAPHORE || RUN_TEST_ALL
+ /* semaphore */
+ test_semaphore();
+ printf("\n\n");
+#endif
+
+#if RUN_TEST_SAFEOBJECT || RUN_TEST_ALL
+ /* safe object */
+ //test_safeobject();
+ printf("\n\n");
+#endif
+
+#if RUN_TEST_OBJECT || RUN_TEST_ALL
+ /* object */
+ //test_object();
+ printf("\n\n");
+#endif
+
+#if RUN_TEST_PARAMS || RUN_TEST_ALL
+ /* parameters */
+ test_params();
+ printf("\n\n");
+#endif
+
+#if RUN_TEST_OPTIONS || RUN_TEST_ALL
+ /* options */
+ test_options();
+ printf("\n\n");
+#endif
+
+#if RUN_TEST_TIMER || RUN_TEST_ALL
+ /* timer */
+ test_timer();
+ printf("\n\n");
+#endif
+
+#if RUN_TEST_RUNNABLE || RUN_TEST_ALL
+ /* test runnable. */
+ test_runnable();
+ printf("\n\n");
+#endif
+
+
+#if RUN_TEST_BUFFER || RUN_TEST_ALL
+ /* test buffer */
+ test_buffer();
+#endif
+
+
+#if RUN_TEST_MD5 || RUN_TEST_ALL
+ /* test md5 and hmac_md5 */
+ test_md5();
+ test_hmac_md5();
+#endif
+
+#if RUN_TEST_SHA1 || RUN_TEST_ALL
+ /* test sha1 and hmac_sha-1 */
+ test_sha1();
+ test_hmac_sha1();
+#endif
+
+#if RUN_TEST_BASE64 || RUN_TEST_ALL
+ /* test base64 encoding/decoding */
+ test_base64();
+#endif
+
+#if RUN_TEST_UUID || RUN_TEST_ALL
+ /* test fake UUID (version5) */
+ test_uuid();
+#endif
+
+#if RUN_TEST_FSM || RUN_TEST_ALL
+ /* test FSM */
+ test_fsm();
+#endif
+
+ }
+ while(LOOP);
+
+ getchar();
+
+ return 0;
+}
diff --git a/tinySAK/test/test.vcproj b/tinySAK/test/test.vcproj
new file mode 100644
index 0000000..f47377a
--- /dev/null
+++ b/tinySAK/test/test.vcproj
@@ -0,0 +1,450 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="test"
+ ProjectGUID="{7A1F8D56-A91F-4658-867F-5E24837071C0}"
+ RootNamespace="test"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;$(DOUBANGO_HOME)\thirdparties\win32\include&quot;;&quot;$(SolutionDir)src&quot;"
+ PreprocessorDefinitions="DEBUG_LEVEL=DEBUG_LEVEL_INFO;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT 0x0501"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ WarnAsError="true"
+ DebugInformationFormat="4"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="$(OutDir)\tinySAK.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+ OutputDirectory="&quot;$(SolutionDir)$(ConfigurationName)\wce&quot;"
+ IntermediateDirectory="&quot;$(SolutionDir)$(ConfigurationName)&quot;"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="1"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ ExecutionBucket="7"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;$(DOUBANGO_HOME)\thirdparties\wince\include&quot;;&quot;$(SolutionDir)src&quot;"
+ PreprocessorDefinitions="DEBUG_LEVEL=DEBUG_LEVEL_INFO;_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;$(ARCHFAM);$(_ARCHFAM_);_CONSOLE"
+ MinimalRebuild="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ WarnAsError="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="$(OutDir)\tinySAK.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="8"
+ EntryPointSymbol="mainWCRTStartup"
+ TargetMachine="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCCodeSignTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <DeploymentTool
+ ForceDirty="-1"
+ RemoteDirectory=""
+ RegisterOutput="0"
+ AdditionalFiles=""
+ />
+ <DebuggerTool
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ WarnAsError="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+ OutputDirectory="$(SolutionDir)Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\$(ConfigurationName)"
+ IntermediateDirectory="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="1"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ ExecutionBucket="7"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ WarnAsError="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCCodeSignTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <DeploymentTool
+ ForceDirty="-1"
+ RemoteDirectory=""
+ RegisterOutput="0"
+ AdditionalFiles=""
+ />
+ <DebuggerTool
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\stdafx.c"
+ >
+ </File>
+ <File
+ RelativePath=".\test.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="tests"
+ >
+ <File
+ RelativePath=".\test_base64.h"
+ >
+ </File>
+ <File
+ RelativePath=".\test_buffer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\test_condwait.h"
+ >
+ </File>
+ <File
+ RelativePath=".\test_fsm.h"
+ >
+ </File>
+ <File
+ RelativePath=".\test_heap.h"
+ >
+ </File>
+ <File
+ RelativePath=".\test_lists.h"
+ >
+ </File>
+ <File
+ RelativePath=".\test_md5.h"
+ >
+ </File>
+ <File
+ RelativePath=".\test_mutex.h"
+ >
+ </File>
+ <File
+ RelativePath=".\test_object.h"
+ >
+ </File>
+ <File
+ RelativePath=".\test_params.h"
+ >
+ </File>
+ <File
+ RelativePath=".\test_runnable.h"
+ >
+ </File>
+ <File
+ RelativePath=".\test_safeobject.h"
+ >
+ </File>
+ <File
+ RelativePath=".\test_semaphore.h"
+ >
+ </File>
+ <File
+ RelativePath=".\test_sha1.h"
+ >
+ </File>
+ <File
+ RelativePath=".\test_strings.h"
+ >
+ </File>
+ <File
+ RelativePath=".\test_threads.h"
+ >
+ </File>
+ <File
+ RelativePath=".\test_timer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\test_url.h"
+ >
+ </File>
+ <File
+ RelativePath=".\test_uuid.h"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/tinySAK/test/test_base64.h b/tinySAK/test/test_base64.h
new file mode 100644
index 0000000..ede1d7e
--- /dev/null
+++ b/tinySAK/test/test_base64.h
@@ -0,0 +1,113 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+#ifndef _TEST_BASE64_H_
+#define _TEST_BASE64_H_
+
+struct b64_msg
+{
+ const char* ascii;
+ const char* base64;
+};
+
+struct b64_msg b64_msgs[] =
+{
+ { "", "" },
+ { "f", "Zg==" },
+ { "fo", "Zm8=" },
+ { "foo", "Zm9v" },
+ { "foob", "Zm9vYg==" },
+ { "fooba", "Zm9vYmE=" },
+ { "foobar", "Zm9vYmFy" },
+ { "Aladdin:open sesame", "QWxhZGRpbjpvcGVuIHNlc2FtZQ=="},
+ { "Doubango Project", "RG91YmFuZ28gUHJvamVjdA=="},
+ { "Open Source Doubango Framework", "T3BlbiBTb3VyY2UgRG91YmFuZ28gRnJhbWV3b3Jr"},
+ {
+ "* Copyright (C) 2009 Mamadou Diop."
+ "*"
+ "* Contact: Mamadou Diop <diopmamadou(at)doubango.org>"
+ "*"
+ "* This file is part of Open Source Doubango Framework."
+ "*"
+ "* DOUBANGO 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 3 of the License, or"
+ "* (at your option) any later version."
+ "*"
+ "* DOUBANGO 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 DOUBANGO."
+ ,
+ "KiBDb3B5cmlnaHQgKEMpIDIwMDkgTWFtYWRvdSBEaW9wLioqIENvbnRhY3Q6IE1hbW"
+ "Fkb3UgRGlvcCA8ZGlvcG1hbWFkb3UoYXQpZG91YmFuZ28ub3JnPioqIFRoaXMgZmls"
+ "ZSBpcyBwYXJ0IG9mIE9wZW4gU291cmNlIERvdWJhbmdvIEZyYW1ld29yay4qKiBET1"
+ "VCQU5HTyBpcyBmcmVlIHNvZnR3YXJlOiB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBh"
+ "bmQvb3IgbW9kaWZ5KiBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcm"
+ "FsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSogdGhlIEZyZWUgU29mdHdh"
+ "cmUgRm91bmRhdGlvbiwgZWl0aGVyIHZlcnNpb24gMyBvZiB0aGUgTGljZW5zZSwgb3"
+ "IqIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uKiogRE9VQkFOR08g"
+ "aXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bC"
+ "wqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBs"
+ "aWVkIHdhcnJhbnR5IG9mKiBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQS"
+ "BQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlKiBHTlUgR2VuZXJhbCBQdWJsaWMg"
+ "TGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLioqIFlvdSBzaG91bGQgaGF2ZSByZWNlaX"
+ "ZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlKiBhbG9u"
+ "ZyB3aXRoIERPVUJBTkdPLg=="
+ }
+};
+
+void test_base64()
+{
+ size_t i, size;
+ char *output_e = 0, *output_d = 0;
+
+ for(i=0; i<sizeof(b64_msgs)/sizeof(struct b64_msg); i++){
+ /*===========
+ * Encoding
+ */
+ size = tsk_base64_encode((const uint8_t*)b64_msgs[i].ascii, strlen(b64_msgs[i].ascii), &output_e);
+ if(tsk_striequals(b64_msgs[i].base64, output_e)){
+ TSK_DEBUG_INFO("[BASE64-%d encoding] ==> OK", i);
+ }
+ else{
+ TSK_DEBUG_INFO("[BASE64-%d encoding] ==> NOK", i);
+ }
+ TSK_FREE(output_e);
+
+ /*===========
+ * Decoding
+ */
+ size = tsk_base64_decode((const uint8_t*)b64_msgs[i].base64, strlen(b64_msgs[i].base64), &output_d);
+ if(tsk_striequals(b64_msgs[i].ascii, output_d)){
+ TSK_DEBUG_INFO("[BASE64-%d decoding] ==> OK", i);
+ }
+ else{
+ TSK_DEBUG_INFO("[BASE64-%d decoding] ==> NOK", i);
+ }
+ TSK_FREE(output_d);
+ }
+}
+
+#endif /* _TEST_BASE64_H_ */
diff --git a/tinySAK/test/test_buffer.h b/tinySAK/test/test_buffer.h
new file mode 100644
index 0000000..8f0810e
--- /dev/null
+++ b/tinySAK/test/test_buffer.h
@@ -0,0 +1,44 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+#ifndef _TEST_BUFFER_H_
+#define _TEST_BUFFER_H_
+
+void test_buffer()
+{
+ tsk_buffer_t *buffer = tsk_buffer_create_null();
+
+ tsk_buffer_append(buffer, "Diop", strlen("Diop"));
+ tsk_buffer_append(buffer, " ", strlen(" "));
+ tsk_buffer_append(buffer, "Mamadou", strlen("Mamadou"));
+ tsk_buffer_append(buffer, "\r\n", strlen("\r\n"));
+
+ printf("1. Buffer=%s", TSK_BUFFER_TO_STRING(buffer));
+
+ tsk_buffer_append_2(buffer, "val1=[%s] and val2=[%d]r\n", "value1", 12);
+ tsk_buffer_append_2(buffer, "val3=[%s] and val4=[%s]r\n", "458888554778555LL", "1254852");
+
+ printf("2. Buffer=%s", TSK_BUFFER_TO_STRING(buffer));
+
+ TSK_OBJECT_SAFE_FREE(buffer);
+}
+
+#endif /* _TEST_BUFFER_H_ */
diff --git a/tinySAK/test/test_condwait.h b/tinySAK/test/test_condwait.h
new file mode 100644
index 0000000..8b7dae9
--- /dev/null
+++ b/tinySAK/test/test_condwait.h
@@ -0,0 +1,86 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+#ifndef _TEST_CONDWAIT_H_
+#define _TEST_CONDWAIT_H_
+
+void *threadfunc_timed(void *parm)
+{
+ tsk_condwait_handle_t *condwait = (tsk_condwait_handle_t *)parm;
+ int ret = 0;
+
+ ret = tsk_condwait_timedwait(condwait, 10);
+ printf("threadfunc_timed/// %d\n", ret);
+
+ return 0;
+}
+
+void *threadfunc_infinite(void *parm)
+{
+ tsk_condwait_handle_t *condwait = (tsk_condwait_handle_t *)parm;
+ int ret = 0;
+
+ ret = tsk_condwait_wait(condwait);
+ printf("threadfunc_infinite/// %d\n", ret);
+
+ return 0;
+}
+
+void *threadfunc_onemore(void *parm)
+{
+ tsk_condwait_handle_t *condwait = (tsk_condwait_handle_t *)parm;
+ int ret = 0;
+
+ ret = tsk_condwait_wait(condwait);
+ printf("threadfunc_onemore/// %d\n", ret);
+
+ return 0;
+}
+
+
+
+/* Pthread condwait */
+void test_condwait()
+{
+ tsk_condwait_handle_t *condwait = tsk_condwait_create();
+ int ret;
+ void* tid[3] = {0,0,0};
+
+ printf("test_condwait//\n");
+
+ tsk_thread_create(&tid[0], threadfunc_timed, condwait);
+ tsk_thread_create(&tid[1], threadfunc_infinite, condwait);
+ tsk_thread_create(&tid[2], threadfunc_onemore, condwait);
+
+ tsk_condwait_timedwait(condwait, 100); /* give the threads the time to start and 'threadfunc_timed' function to timeout */
+
+ ret = tsk_condwait_signal(condwait); /* Release one */
+ ret = tsk_condwait_broadcast(condwait); /* Release all */
+
+
+ tsk_thread_join(&tid[0]);
+ tsk_thread_join(&tid[1]);
+ tsk_thread_join(&tid[2]);
+
+ tsk_condwait_destroy(&condwait);
+}
+
+#endif /* _TEST_CONDWAIT_H_ */
diff --git a/tinySAK/test/test_fsm.h b/tinySAK/test/test_fsm.h
new file mode 100644
index 0000000..41c17cb
--- /dev/null
+++ b/tinySAK/test/test_fsm.h
@@ -0,0 +1,310 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+#ifndef _TEST_FSM_H_
+#define _TEST_FSM_H_
+
+typedef struct test_fsm_ctx_s
+{
+ unsigned unsubscribing:1;
+}
+test_fsm_ctx_t;
+
+/* ======================== actions ======================== */
+typedef enum test_fsm_action_e
+{
+ test_fsm_action_send,
+ test_fsm_action_1xx,
+ test_fsm_action_2xx,
+ test_fsm_action_401_407_421_494,
+ test_fsm_action_423,
+ test_fsm_action_300_to_699,
+ test_fsm_action_cancel,
+ test_fsm_action_notify,
+ test_fsm_action_unsubscribe,
+ test_fsm_action_refresh,
+ test_fsm_action_transporterror,
+ test_fsm_action_error,
+}
+test_fsm_action_t;
+
+/* ======================== execs ======================== */
+int test_fsm_exec_Started_2_Trying_X_send(va_list *app)
+{
+ const test_fsm_ctx_t* ctx = va_arg(*app, const test_fsm_ctx_t *);
+ const void* message = va_arg(*app, const void *);
+
+ return 0;
+}
+
+int test_fsm_exec_Trying_2_Trying_X_1xx(va_list *app)
+{
+ const test_fsm_ctx_t* ctx = va_arg(*app, const test_fsm_ctx_t *);
+ const void* message = va_arg(*app, const void *);
+
+ return 0;
+}
+
+int test_fsm_exec_Trying_2_Terminated_X_2xx(va_list *app)
+{
+ const test_fsm_ctx_t* ctx = va_arg(*app, const test_fsm_ctx_t *);
+ const void* message = va_arg(*app, const void *);
+
+ return 0;
+}
+
+int test_fsm_exec_Trying_2_Connected_X_2xx(va_list *app)
+{
+ const test_fsm_ctx_t* ctx = va_arg(*app, const test_fsm_ctx_t *);
+ const void* message = va_arg(*app, const void *);
+
+ return 0;
+}
+
+int test_fsm_exec_Trying_2_Trying_X_401_407_421_494(va_list *app)
+{
+ const test_fsm_ctx_t* ctx = va_arg(*app, const test_fsm_ctx_t *);
+ const void* message = va_arg(*app, const void *);
+
+ return 0;
+}
+
+int test_fsm_exec_Trying_2_Trying_X_423(va_list *app)
+{
+ const test_fsm_ctx_t* ctx = va_arg(*app, const test_fsm_ctx_t *);
+ const void* message = va_arg(*app, const void *);
+
+ return 0;
+}
+
+int test_fsm_exec_Trying_2_Terminated_X_300_to_699(va_list *app)
+{
+ const test_fsm_ctx_t* ctx = va_arg(*app, const test_fsm_ctx_t *);
+ const void* message = va_arg(*app, const void *);
+
+ return 0;
+}
+
+int test_fsm_exec_Trying_2_Terminated_X_cancel(va_list *app)
+{
+ const test_fsm_ctx_t* ctx = va_arg(*app, const test_fsm_ctx_t *);
+ const void* message = va_arg(*app, const void *);
+
+ return 0;
+}
+
+int test_fsm_exec_Trying_2_Trying_X_NOTIFY(va_list *app)
+{
+ const test_fsm_ctx_t* ctx = va_arg(*app, const test_fsm_ctx_t *);
+ const void* message = va_arg(*app, const void *);
+
+ return 0;
+}
+
+int test_fsm_exec_Connected_2_Trying_X_unsubscribe(va_list *app)
+{
+ const test_fsm_ctx_t* ctx = va_arg(*app, const test_fsm_ctx_t *);
+ const void* message = va_arg(*app, const void *);
+
+ return 0;
+}
+
+int test_fsm_exec_Connected_2_Trying_X_refresh(va_list *app)
+{
+ const test_fsm_ctx_t* ctx = va_arg(*app, const test_fsm_ctx_t *);
+ const void* message = va_arg(*app, const void *);
+
+ return 0;
+}
+
+int test_fsm_exec_Connected_2_Connected_X_NOTIFY(va_list *app)
+{
+ const test_fsm_ctx_t* ctx = va_arg(*app, const test_fsm_ctx_t *);
+ const void* message = va_arg(*app, const void *);
+
+ return 0;
+}
+
+int test_fsm_exec_Connected_2_Terminated_X_NOTIFY(va_list *app)
+{
+ const test_fsm_ctx_t* ctx = va_arg(*app, const test_fsm_ctx_t *);
+ const void* message = va_arg(*app, const void *);
+
+ return 0;
+}
+
+int test_fsm_exec_Any_2_Trying_X_hangup(va_list *app)
+{
+ const test_fsm_ctx_t* ctx = va_arg(*app, const test_fsm_ctx_t *);
+ const void* message = va_arg(*app, const void *);
+
+ return 0;
+}
+
+int test_fsm_exec_Any_2_Terminated_X_transportError(va_list *app)
+{
+ const test_fsm_ctx_t* ctx = va_arg(*app, const test_fsm_ctx_t *);
+ const void* message = va_arg(*app, const void *);
+
+ return 0;
+}
+
+int test_fsm_exec_Any_2_Terminated_X_Error(va_list *app)
+{
+ const test_fsm_ctx_t* ctx = va_arg(*app, const test_fsm_ctx_t *);
+ const void* message = va_arg(*app, const void *);
+
+ return 0;
+}
+
+/* ======================== conds ======================== */
+int test_fsm_cond_unsubscribing(test_fsm_ctx_t* ctx, void* data)
+{
+ return ctx->unsubscribing ? 1 : 0;
+}
+int test_fsm_cond_subscribing(test_fsm_ctx_t* ctx, void* data)
+{
+ return !test_fsm_cond_unsubscribing(ctx, data);
+}
+
+int test_fsm_cond_notify_terminated(test_fsm_ctx_t* ctx, void* sipmessage)
+{
+ return 0;
+}
+
+int test_fsm_cond_notify_not_terminated(test_fsm_ctx_t* ctx, void* sipmessage)
+{
+ return !test_fsm_cond_notify_terminated(ctx, sipmessage);
+}
+
+typedef enum test_fsm_state_e
+{
+ __nil = 0,
+ Started,
+ Trying,
+ Connected,
+ Terminated
+}
+test_fsm_state_t;
+
+
+int test_fsm_onterminated(const test_fsm_ctx_t* ctx)
+{
+ TSK_DEBUG_INFO("FSM in terminal state.");
+ return 0;
+}
+
+#define TEST_FSM_ACTIONS_COUNT 5
+test_fsm_action_t test_fsm_tests[TEST_FSM_ACTIONS_COUNT][TEST_FSM_ACTIONS_COUNT] =
+{
+ { test_fsm_action_send, test_fsm_action_300_to_699 },
+ { test_fsm_action_send, test_fsm_action_401_407_421_494, test_fsm_action_2xx, test_fsm_action_refresh, test_fsm_action_300_to_699},
+ { test_fsm_action_send, test_fsm_action_401_407_421_494, test_fsm_action_2xx, test_fsm_action_refresh, test_fsm_action_2xx},
+ { test_fsm_action_send, test_fsm_action_2xx, test_fsm_action_2xx, test_fsm_action_refresh, test_fsm_action_2xx},
+ { test_fsm_action_send, test_fsm_action_423, test_fsm_action_2xx, test_fsm_action_refresh, test_fsm_action_401_407_421_494},
+};
+
+
+void test_fsm()
+{
+ size_t i;
+
+ for(i=0; i<TEST_FSM_ACTIONS_COUNT; i++)
+ {
+ size_t j;
+ tsk_fsm_t* fsm = tsk_fsm_create(Started, Terminated);
+ test_fsm_ctx_t ctx;
+ ctx.unsubscribing = 0;
+
+ tsk_fsm_set_callback_terminated(fsm, test_fsm_onterminated, &ctx);
+
+ tsk_fsm_set(fsm,
+
+ /*=======================
+ * === Any ===
+ */
+ // Any -> (transport error) -> Terminated
+ TSK_FSM_ADD_ALWAYS(tsk_fsm_state_any, test_fsm_action_transporterror, Terminated, test_fsm_exec_Any_2_Terminated_X_transportError, "test_fsm_exec_Any_2_Terminated_X_transportError"),
+ // Any -> (transport error) -> Terminated
+ TSK_FSM_ADD_ALWAYS(tsk_fsm_state_any, test_fsm_action_error, Terminated, test_fsm_exec_Any_2_Terminated_X_Error, "test_fsm_exec_Any_2_Terminated_X_Error"),
+ // Any -> (hangup) -> Terminated
+ // Any -> (hangup) -> Trying
+
+ /*=======================
+ * === Started ===
+ */
+ // Started -> (Send) -> Trying
+ TSK_FSM_ADD_ALWAYS(Started, test_fsm_action_send, Trying, test_fsm_exec_Started_2_Trying_X_send, "test_fsm_exec_Started_2_Trying_X_send"),
+ // Started -> (Any) -> Started
+ TSK_FSM_ADD_ALWAYS_NOTHING(Started, "test_fsm_exec_Started_2_Started_X_any"),
+
+
+ /*=======================
+ * === Trying ===
+ */
+ // Trying -> (1xx) -> Trying
+ TSK_FSM_ADD_ALWAYS(Trying, test_fsm_action_1xx, Trying, test_fsm_exec_Trying_2_Trying_X_1xx, "test_fsm_exec_Trying_2_Trying_X_1xx"),
+ // Trying -> (2xx) -> Terminated
+ TSK_FSM_ADD(Trying, test_fsm_action_2xx, test_fsm_cond_unsubscribing, Terminated, test_fsm_exec_Trying_2_Terminated_X_2xx, "test_fsm_exec_Trying_2_Terminated_X_2xx"),
+ // Trying -> (2xx) -> Connected
+ TSK_FSM_ADD(Trying, test_fsm_action_2xx, test_fsm_cond_subscribing, Connected, test_fsm_exec_Trying_2_Connected_X_2xx, "test_fsm_exec_Trying_2_Connected_X_2xx"),
+ // Trying -> (401/407/421/494) -> Trying
+ TSK_FSM_ADD_ALWAYS(Trying, test_fsm_action_401_407_421_494, Trying, test_fsm_exec_Trying_2_Trying_X_401_407_421_494, "test_fsm_exec_Trying_2_Trying_X_401_407_421_494"),
+ // Trying -> (423) -> Trying
+ TSK_FSM_ADD_ALWAYS(Trying, test_fsm_action_423, Trying, test_fsm_exec_Trying_2_Trying_X_423, "test_fsm_exec_Trying_2_Trying_X_423"),
+ // Trying -> (300_to_699) -> Terminated
+ TSK_FSM_ADD_ALWAYS(Trying, test_fsm_action_300_to_699, Terminated, test_fsm_exec_Trying_2_Terminated_X_300_to_699, "test_fsm_exec_Trying_2_Terminated_X_300_to_699"),
+ // Trying -> (cancel) -> Terminated
+ TSK_FSM_ADD_ALWAYS(Trying, test_fsm_action_cancel, Terminated, test_fsm_exec_Trying_2_Terminated_X_cancel, "test_fsm_exec_Trying_2_Terminated_X_cancel"),
+ // Trying -> (Notify) -> Trying
+ TSK_FSM_ADD_ALWAYS(Trying, test_fsm_action_notify, Trying, test_fsm_exec_Trying_2_Trying_X_NOTIFY, "test_fsm_exec_Trying_2_Trying_X_NOTIFY"),
+ // Trying -> (Any) -> Trying
+ TSK_FSM_ADD_ALWAYS_NOTHING(Trying, "test_fsm_exec_Trying_2_Trying_X_any"),
+
+
+ /*=======================
+ * === Connected ===
+ */
+ // Connected -> (unsubscribe) -> Trying
+ TSK_FSM_ADD_ALWAYS(Connected, test_fsm_action_unsubscribe, Trying, test_fsm_exec_Connected_2_Trying_X_unsubscribe, "test_fsm_exec_Connected_2_Trying_X_unsubscribe"),
+ // Connected -> (refresh) -> Trying
+ TSK_FSM_ADD_ALWAYS(Connected, test_fsm_action_refresh, Trying, test_fsm_exec_Connected_2_Trying_X_refresh, "test_fsm_exec_Connected_2_Trying_X_refresh"),
+ // Connected -> (NOTIFY) -> Connected
+ TSK_FSM_ADD(Connected, test_fsm_action_notify, test_fsm_cond_notify_not_terminated, Connected, test_fsm_exec_Connected_2_Connected_X_NOTIFY, "test_fsm_exec_Connected_2_Connected_X_NOTIFY"),
+ // Connected -> (NOTIFY) -> Terminated
+ TSK_FSM_ADD(Connected, test_fsm_action_notify, test_fsm_cond_notify_terminated, Terminated, test_fsm_exec_Connected_2_Terminated_X_NOTIFY, "test_fsm_exec_Connected_2_Terminated_X_NOTIFY"),
+ // Connected -> (Any) -> Connected
+ TSK_FSM_ADD_ALWAYS_NOTHING(Connected, "test_fsm_exec_Connected_2_Connected_X_any"),
+
+ TSK_FSM_ADD_NULL());
+
+
+ for(j=0; j<TEST_FSM_ACTIONS_COUNT; j++){
+ tsk_fsm_act(fsm, test_fsm_tests[i][j], &ctx, tsk_null, &ctx, tsk_null /*message*/);
+ }
+
+ TSK_OBJECT_SAFE_FREE(fsm);
+
+ printf("\n\n");
+ }
+}
+
+#endif /* _TEST_FSM_H_ */
diff --git a/tinySAK/test/test_heap.h b/tinySAK/test/test_heap.h
new file mode 100644
index 0000000..198c2b4
--- /dev/null
+++ b/tinySAK/test/test_heap.h
@@ -0,0 +1,77 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+#ifndef _TEST_HEAP_H_
+#define _TEST_HEAP_H_
+
+
+/* test heap*/
+void test_heap()
+{
+ //int i = 0;
+ //tsk_heap_t heap;
+
+ ///* initialize our memory heap */
+ //tsk_heap_init(&heap);
+
+ ///* heap(1): Ten strings are allocated an all freed when we cleanup the heap */
+ //for(i=0; i<10;i++)
+ //{
+ // char* test = tsk_strdup(&heap, "testing the heap (1)");
+ //}
+ //tsk_heap_cleanup(&heap);
+
+ ///* heap(2): pop memory from the heap*/
+ //{
+ // char* test = tsk_strdup(&heap, "testing the heap (2)");
+ // tsk_free(&heap, (void**)&test);
+
+ // test = tsk_calloc(&heap, 10, 1);
+ // tsk_free(&heap, (void**)&test);
+
+ // test = tsk_malloc(&heap, 10);
+ // tsk_free(&heap, (void**)&test);
+
+ // test = tsk_malloc(&heap, 10);
+ // test = tsk_realloc(&heap, test, 100);
+ // tsk_free(&heap, (void**)&test);
+ //}
+ //
+ ///* heap(3): pop a NULL pointer */
+ //{
+ // tsk_free(&heap, 0);
+ //}
+
+ ///* heap(4): allocate and pop from NULL heap */
+ //{
+ // char* test = tsk_calloc(0, 10, 1);
+ // tsk_free(0, (void**)&test);
+
+ // test = tsk_malloc(0, 10);
+ // tsk_free(0, (void**)&test);
+
+ // test = tsk_malloc(0, 10);
+ // test = tsk_realloc(0, test, 100);
+ // tsk_free(0, (void**)&test);
+ //}
+}
+
+#endif /* _TEST_HEAP_H_ */
diff --git a/tinySAK/test/test_lists.h b/tinySAK/test/test_lists.h
new file mode 100644
index 0000000..2f98793
--- /dev/null
+++ b/tinySAK/test/test_lists.h
@@ -0,0 +1,258 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+#ifndef _TEST_LISTS_H_
+#define _TEST_LISTS_H_
+
+//========================================================
+// Person object definition
+//
+typedef struct student_s
+{
+ TSK_DECLARE_OBJECT;
+
+ char *id;
+ char *name;
+}
+student_t;
+
+static void* student_ctor(void * self, va_list * app)
+{
+ student_t* student = self;
+ student->id = tsk_strdup(va_arg(*app, const char *));
+ student->name = tsk_strdup(va_arg(*app, const char *));
+ return self;
+}
+
+static void* student_dtor(void *self)
+{
+ student_t* student = self;
+ tsk_free((void**)&(student->id));
+ tsk_free((void**)&(student->name));
+ return self;
+}
+
+static int student_icmp(const void *self, const void *object)
+{
+ const student_t* student1 = self;
+ const student_t* student2 = object;
+
+ if(!student1 || !student2){
+ return 0;
+ }
+
+ return tsk_stricmp(student1->id, student2->id);
+}
+
+static const tsk_object_def_t student_def_s =
+{
+ sizeof(student_t),
+ student_ctor,
+ student_dtor,
+ student_icmp
+};
+const void *student_def_t = &student_def_s;
+#define STUDENT_CREATE(id, name) tsk_object_new(student_def_t, id, name)
+#define STUDENT_SAFE_FREE(self) tsk_object_unref(self)
+
+static int pred_find_student_by_name(const tsk_list_item_t *item, const void *name)
+{
+ if(item && item->data){
+ student_t *student = item->data;
+ return tsk_striequals(student->name, name);
+ }
+ return -1;
+}
+
+/* testing basic linked list */
+void test_basic_list()
+{
+ tsk_list_t *list = tsk_list_create();
+ tsk_list_item_t *item = tsk_list_item_create();
+
+ /* add items to the list */
+ item->data = tsk_string_create("First item");
+ tsk_list_push_front_item(list, &item);
+
+ item = tsk_list_item_create();
+ item->data = tsk_string_create("Second item");
+ tsk_list_push_back_item(list, &item);
+
+ item = tsk_list_item_create();
+ item->data = tsk_string_create("Third item");
+ tsk_list_push_front_item(list, &item);
+
+ item = tsk_list_item_create();
+ item->data = tsk_string_create("Fourth item");
+ tsk_list_push_back_item(list, &item);
+
+ /* dump all items */
+ tsk_list_foreach(item, list){
+ tsk_string_t* item_data = ((tsk_string_t*)item->data);
+ printf("test_basic_list/// --> [%s]\n", item_data->value);
+ }
+
+ tsk_list_remove_item(list, list->tail);
+ tsk_list_remove_item(list, list->tail);
+ tsk_list_remove_item(list, list->tail);
+ tsk_list_remove_item(list, list->tail);
+
+ /* delete all items in the list */
+ TSK_OBJECT_SAFE_FREE(list);
+}
+
+void test_filtered_list()
+{
+#define PUSH_FILTERED(list, data) tsk_list_push_ascending_data(list, data);
+
+ tsk_list_t *list = tsk_list_create();
+ tsk_list_item_t *item = 0;
+
+ /* add items to the list */
+ {
+ student_t *student2 = STUDENT_CREATE("2", "student2");
+ PUSH_FILTERED(list, ((void**) &student2));
+ }
+ {
+ student_t *student6 = STUDENT_CREATE("6", "student6");
+ PUSH_FILTERED(list, ((void**) &student6));
+ }
+ {
+ student_t *student1 = STUDENT_CREATE("1", "student1");
+ PUSH_FILTERED(list, ((void**) &student1));
+ }
+ {
+ student_t *student6 = STUDENT_CREATE("6", "student6");
+ PUSH_FILTERED(list, ((void**) &student6));
+ }
+ {
+ student_t *student6 = STUDENT_CREATE("6", "student6");
+ PUSH_FILTERED(list, ((void**) &student6));
+ }
+ {
+ student_t *student2 = STUDENT_CREATE("2", "student2");
+ PUSH_FILTERED(list, ((void**) &student2));
+ }
+ {
+ student_t *student2 = STUDENT_CREATE("2", "student2");
+ PUSH_FILTERED(list, ((void**) &student2));
+ }
+ {
+ student_t *student5 = STUDENT_CREATE("5", "student5");
+ PUSH_FILTERED(list, ((void**) &student5));
+ }
+ {
+ student_t *student4 = STUDENT_CREATE("4", "student4");
+ PUSH_FILTERED(list, ((void**) &student4));
+ }
+ {
+ student_t *student1 = STUDENT_CREATE("1", "student1");
+ PUSH_FILTERED(list, ((void**) &student1));
+ }
+ {
+ student_t *student1 = STUDENT_CREATE("1", "student1");
+ PUSH_FILTERED(list, ((void**) &student1));
+ }
+ {
+ student_t *student3 = STUDENT_CREATE("3", "student3");
+ PUSH_FILTERED(list, ((void**) &student3));
+ }
+ {
+ student_t *student6 = STUDENT_CREATE("6", "student6");
+ PUSH_FILTERED(list, ((void**) &student6));
+ }
+ {
+ student_t *student1 = STUDENT_CREATE("1", "student1");
+ PUSH_FILTERED(list, ((void**) &student1));
+ }
+ {
+ student_t *student3 = STUDENT_CREATE("3", "student3");
+ PUSH_FILTERED(list, ((void**) &student3));
+ }
+ {
+ student_t *student6 = STUDENT_CREATE("6", "student6");
+ PUSH_FILTERED(list, ((void**) &student6));
+ }
+
+ /* dump all items */
+ tsk_list_foreach(item, list)
+ {
+ student_t* item_data = item->data;
+ printf("test_filtered_list/// --> [id=%s and name=%s]\n", item_data->id, item_data->name);
+ }
+
+ /* delete all items in the list */
+ TSK_OBJECT_SAFE_FREE(list);
+
+#undef PUSH_FILTERED
+}
+
+void test_complex_list()
+{
+ tsk_list_t *list = tsk_list_create();
+ tsk_list_item_t *item = 0;
+
+ /* add items to the list */
+ {
+ student_t *student1 = STUDENT_CREATE("1", "student1");
+ tsk_list_push_back_data(list, ((void**) &student1));
+ }
+ {
+ student_t *student2 = STUDENT_CREATE("2", "student2");
+ tsk_list_push_front_data(list, ((void**) &student2));
+ }
+ {
+ student_t *student3 = STUDENT_CREATE("3", "student3");
+ tsk_list_push_front_data(list, ((void**) &student3));
+ }
+
+ /* dump all items */
+ tsk_list_foreach(item, list)
+ {
+ student_t* item_data = item->data;
+ printf("test_complex_list/// --> [id=%s and name=%s]\n", item_data->id, item_data->name);
+ }
+
+ /* Find student using tsk_object* */
+ {
+ student_t *student_to_find = STUDENT_CREATE("1", "student1");
+ const tsk_list_item_t *item_const = tsk_list_find_item_by_data(list, student_to_find);
+ {
+ const student_t* item_data_const = item_const->data;
+ printf("test_complex_list/// using tsk_object --> student with name==\"student1\" and id=\"%s\"", item_data_const->id);
+ }
+ STUDENT_SAFE_FREE(student_to_find);
+ }
+
+ /* Find student named "student2" using predicate */
+ {
+ const tsk_list_item_t *item_const = tsk_list_find_item_by_pred(list, pred_find_student_by_name, "student2");
+ {
+ const student_t* item_data_const = item_const->data;
+ printf("test_complex_list/// using predicate --> student with name==\"student2\" and id=\"%s\"", item_data_const->id);
+ }
+ }
+
+ /* delete all items in the list */
+ TSK_OBJECT_SAFE_FREE(list);
+}
+
+#endif /* _TEST_LISTS_H_ */
diff --git a/tinySAK/test/test_md5.h b/tinySAK/test/test_md5.h
new file mode 100644
index 0000000..439826c
--- /dev/null
+++ b/tinySAK/test/test_md5.h
@@ -0,0 +1,100 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+#ifndef _TEST_MD5_H_
+#define _TEST_MD5_H_
+
+struct md5_result
+{
+ const char* msg;
+ const char* xres;
+};
+
+struct md5_result msgs_md5[] =
+{
+ { "", "d41d8cd98f00b204e9800998ecf8427e" },
+ { "a", "0cc175b9c0f1b6a831c399e269772661" },
+ { "abc", "900150983cd24fb0d6963f7d28e17f72" },
+ { "message digest", "f96b697d7cb7938d525a2f31aaf161d0" },
+ { "abcdefghijklmnopqrstuvwxyz", "c3fcd3d76192e4007dfb496cca67e13b" },
+ { "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", "d174ab98d277d9f5a5611c2c9f419d9f" },
+ { "12345678901234567890123456789012345678901234567890123456789012345678901234567890", "57edf4a22be3c955ac49da2e2107b67a" },
+ { "The quick brown fox jumps over the lazy dog", "9e107d9d372bb6826bd81d3542a419d6" },
+ { "The quick brown fox jumps over the lazy dog.", "e4d909c290d0fb1ca068ffaddf22cbd0" }
+};
+
+void test_md5()
+{
+ size_t i;
+ tsk_md5string_t md5result;
+
+ for(i=0; i< sizeof(msgs_md5)/sizeof(struct md5_result); i++)
+ {
+ tsk_md5compute(msgs_md5[i].msg, strlen(msgs_md5[i].msg), &md5result);
+ if(tsk_striequals(msgs_md5[i].xres, md5result))
+ {
+ TSK_DEBUG_INFO("[MD5-%d] ==> OK", i);
+ }
+ else
+ {
+ TSK_DEBUG_INFO("[MD5-%d] ==> NOK", i);
+ }
+ }
+}
+
+struct hmac_md5_result
+{
+ const char* msg;
+ const char* key;
+ const char* xres;
+};
+struct hmac_md5_result msgs_hmac_md5[] =
+{
+ { "Hi There", "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", "9294727a3638bb1c13f48ef8158bfc9d" },
+ { "what do ya want for nothing?", "Jefe", "750c783e6ab0b503eaa86e310a5db738" },
+ { "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd", "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", "56be34521d144c88dbb8c733f0e8b3f6" },
+ { "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd", "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19", "697eaf0aca3a3aea3a75164746ffaa79" },
+ { "Test With Truncation", "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c", "56461ef2342edc00f9bab995690efd4c" },
+ { "Test Using Larger Than Block-Size Key - Hash Key First", "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", "6b1ab7fe4bd7bf8f0b62e6ce61b9d0cd" },
+ { "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data", "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", "6f630fad67cda0ee1fb1f562db3aa53e" },
+};
+
+void test_hmac_md5()
+{
+ size_t i;
+ tsk_md5string_t md5result;
+
+ for(i=0; i< sizeof(msgs_hmac_md5)/sizeof(struct hmac_md5_result); i++)
+ {
+ hmac_md5_compute((const uint8_t*)msgs_hmac_md5[i].msg, strlen(msgs_hmac_md5[i].msg), msgs_hmac_md5[i].key, strlen(msgs_hmac_md5[i].key), &md5result);
+ if(tsk_striequals(msgs_hmac_md5[i].xres, md5result))
+ {
+ TSK_DEBUG_INFO("[HMAC-MD5-%d] ==> OK", i);
+ }
+ else
+ {
+ TSK_DEBUG_INFO("[HMAC-MD5-%d] ==> NOK", i);
+ }
+ }
+}
+
+
+#endif /* _TEST_MD5_H_ */
diff --git a/tinySAK/test/test_mutex.h b/tinySAK/test/test_mutex.h
new file mode 100644
index 0000000..c81899f
--- /dev/null
+++ b/tinySAK/test/test_mutex.h
@@ -0,0 +1,80 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+
+#ifndef _TEST_MUTEX_H_
+#define _TEST_MUTEX_H_
+
+int mutex_thread_started = 0;
+
+int safe_func(tsk_mutex_handle_t *mutex, const char* caller)
+{
+ int ret = 0;
+
+ ret = tsk_mutex_lock(mutex);
+ TSK_DEBUG_INFO("threadfunc_mutex/// Start doing job [%s]... %d\n", caller, ret);
+ tsk_thread_sleep(5000);
+ TSK_DEBUG_INFO("threadfunc_mutex/// Stop doing job [%s]... %d\n", caller, ret);
+ ret = tsk_mutex_unlock(mutex);
+
+ return ret;
+}
+
+void *threadfunc_mutex(void *parm)
+{
+ tsk_mutex_handle_t *mutex = (tsk_mutex_handle_t *)parm;
+ safe_func(mutex, "caller1");
+
+ return 0;
+}
+
+
+/* Pthread mutex */
+void test_mutex()
+{
+ tsk_mutex_handle_t *mutex = tsk_mutex_create();
+ void* tid[1] = {0};
+
+ TSK_DEBUG_INFO("test_mutex//\n");
+
+ //tsk_mutex_lock(mutex);
+
+ tsk_thread_create(&tid[0], threadfunc_mutex, mutex);
+ tsk_thread_sleep(1000);
+
+ safe_func(mutex, "caller0");
+
+ /*while(!mutex_thread_started) tsk_thread_sleep(1000);
+
+ printf("test_mutex// threadfunc_mutex is locked for 1 second\n");
+ tsk_thread_sleep(1000);
+
+ printf("test_mutex// Now unlock threadfunc_mutex\n");
+ tsk_mutex_unlock(mutex);*/
+
+
+ tsk_thread_join(&(tid[0]));
+
+ tsk_mutex_destroy(&mutex);
+}
+
+#endif /* _TEST_MUTEX_H_ */
diff --git a/tinySAK/test/test_object.h b/tinySAK/test/test_object.h
new file mode 100644
index 0000000..ca8e8d5
--- /dev/null
+++ b/tinySAK/test/test_object.h
@@ -0,0 +1,111 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+#if !defined(_TEST_OBJECT_H_) && 0
+#define _TEST_OBJECT_H_
+
+typedef struct person_s
+{
+ TSK_DECLARE_OBJECT; // Mandatory
+
+ char* name;
+ struct person_s* girlfriend;
+}
+person_t;
+
+// (a student is a person)
+typedef struct student_s
+{
+ struct person_s* person; // Must be the first element
+ char* school;
+}
+student_t;
+
+//// (as a student is a person you can do)
+//student_t* s;
+//((person_t*)s)->name = tsk_strdup("bob");
+
+
+// constructor
+static tsk_object_t* person_create(tsk_object_t * self, va_list * app)
+{
+ person_t *person = self;
+ if(person){
+ person->name = tsk_strdup(va_arg(*app, const char *));
+ }
+ return self;
+ }
+
+ // destructor
+ static tsk_object_t* person_destroy(tsk_object_t * self)
+ {
+ person_t *person = self;
+ if(person){
+ TSK_FREE(person->name);
+ tsk_object_unref(person->girlfriend);
+ }
+ return self; // return
+ }
+
+ // comparator
+ static int person_cmp(const tsk_object_t *_p1, const tsk_object_t *_p2)
+ {
+ const person_t *p1 = _p1;
+ const person_t *p1 = _p2;
+ int ret;
+
+ // do they have the same name?
+ if((ret = tsk_stricmp(p1->name, p2->name))){
+ return ret;
+ }
+ // do they have the same girlfriend?
+ if((ret = tsk_object_cmp(p1->girlfriend, p2->girlfriend))){
+ return ret;
+ }
+
+ // they are the same
+ return 0;
+ }
+
+ //(Object defnition)
+ static const tsk_object_def_t person_def_t =
+ {
+ sizeof(person_t),
+ person_create,
+ person_destroy,
+ person_cmp
+ };
+
+ // create a person
+#define PERSON_CREATE(name) tsk_object_new(&person_def_t, (const char*)name)
+
+/* test object */
+void test_object()
+{
+ // creates a person: will call the constructor
+ person_t* bob = PERSON_CREATE("bob");
+ // creates bob's girlfriend
+ bob->girlfriend = PERSON_CREATE("alice");
+ // deletes bob: will delete both bob and bob's girlfriend field by calling their destructors
+ TSK_OBJECT_SAFE_FREE(bob);
+}
+
+#endif /* _TEST_OBJECT_H_ */
diff --git a/tinySAK/test/test_options.h b/tinySAK/test/test_options.h
new file mode 100644
index 0000000..f298f8b
--- /dev/null
+++ b/tinySAK/test/test_options.h
@@ -0,0 +1,61 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+#ifndef _TEST_OPTIONS_H_
+#define _TEST_OPTIONS_H_
+
+typedef enum options_e
+{
+ o_project,
+ o_license,
+ o_contact,
+ o_version,
+ o_date
+}
+options_t;
+
+void test_options()
+{
+ tsk_options_L_t *options = tsk_list_create();
+ tsk_bool_t b;
+ int i;
+ const char* string;
+ const tsk_option_t* o;
+
+ tsk_options_add_option(&options, o_project, "doubango");
+ tsk_options_add_option(&options, o_project, "doubangooo");
+ tsk_options_add_option(&options, o_license, "GPLv3");
+ tsk_options_add_option(&options, o_contact, "Mamadou Diop <diopmamadou(at)doubango.org>");
+ tsk_options_add_option(&options, o_version, "10");
+
+ b = tsk_options_have_option(options, o_project);
+ b = tsk_options_have_option(options, o_date);
+ tsk_options_remove_option(options, o_project);
+ b = tsk_options_have_option(options, o_project);
+ i = tsk_options_get_option_value_as_int(options, o_version);
+ string = tsk_options_get_option_value(options, o_version);
+ o = tsk_options_get_option_by_id(options, o_contact);
+
+ TSK_OBJECT_SAFE_FREE(options);
+}
+
+
+#endif /*_TEST_OPTIONS_H_ */
diff --git a/tinySAK/test/test_params.h b/tinySAK/test/test_params.h
new file mode 100644
index 0000000..b7706a5
--- /dev/null
+++ b/tinySAK/test/test_params.h
@@ -0,0 +1,68 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+#ifndef _TEST_PARAMS_H_
+#define _TEST_PARAMS_H_
+
+
+void test_params()
+{
+ tsk_buffer_t *buffer = tsk_buffer_create_null();
+ tsk_params_L_t *params = tsk_list_create();
+
+ //
+ //
+ //
+ tsk_param_t *param1 = tsk_params_parse_param("mamadou=diop", strlen("mamadou=diop"));
+ tsk_param_t *param2 = tsk_params_parse_param("project=doubango", strlen("project=doubango"));
+ tsk_param_t *param3 = tsk_params_parse_param("license=gpl", strlen("license=gpl"));
+
+ tsk_list_push_back_data(params, (void**)&param1);
+ tsk_list_push_back_data(params, (void**)&param2);
+ tsk_list_push_back_data(params, (void**)&param3);
+
+ tsk_params_tostring(params, ',', buffer);
+ TSK_DEBUG_INFO("Buffer=[%s]", TSK_BUFFER_TO_STRING(buffer));
+
+ tsk_buffer_cleanup(buffer);
+ TSK_OBJECT_SAFE_FREE(params);
+
+
+ //
+ //
+ //
+ params = tsk_params_fromstring("octet-align=1; mode-set=0,1,2,3,4,5,6,7; mode-change-period=1; mode-change-capability=2; mode-change-neighbor=0", ';', tsk_true);
+ tsk_params_tostring(params, ';', buffer);
+ TSK_DEBUG_INFO("Buffer=[%s]", TSK_BUFFER_TO_STRING(buffer));
+ tsk_buffer_cleanup(buffer);
+ TSK_OBJECT_SAFE_FREE(params);
+
+ params = tsk_params_fromstring("QCIF=1;CIF=2;MaxBR=4200", ';', tsk_true);
+ tsk_params_tostring(params, ';', buffer);
+ TSK_DEBUG_INFO("Buffer=[%s]", TSK_BUFFER_TO_STRING(buffer));
+ tsk_buffer_cleanup(buffer);
+ TSK_OBJECT_SAFE_FREE(params);
+
+ TSK_OBJECT_SAFE_FREE(buffer);
+}
+
+
+#endif /*_TEST_PARAMS_H_ */
diff --git a/tinySAK/test/test_runnable.h b/tinySAK/test/test_runnable.h
new file mode 100644
index 0000000..f55635a
--- /dev/null
+++ b/tinySAK/test/test_runnable.h
@@ -0,0 +1,126 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+#ifndef _TEST_RUNNABLE_H_
+#define _TEST_RUNNABLE_H_
+
+typedef struct test_runnable_timer_s
+{
+ tsk_timer_id_t id;
+ uint64_t timeout;
+ const char *arg;
+}
+test_runnable_timer_t;
+
+test_runnable_timer_t runnable_timers[] =
+{
+ {0, 2000, "3"},
+ {1, 2500, "4"},
+ {2, 500, "1"},
+ {3, 1000, "2"},
+ {4, 1000, "2"},
+ {5, 0, "0"},
+ {6, 10000, "6"},
+ {7, 3000, "5"},
+ {8, 2500, "4"},
+};
+
+typedef struct tsk_obj_s
+{
+ TSK_DECLARE_OBJECT;
+
+ tsk_timer_id_t timer_id;
+}
+tsk_obj_t;
+
+static void* tsk_obj_ctor(void * self, va_list * app){
+ tsk_obj_t *obj = self;
+ if(obj){
+ obj->timer_id = va_arg(*app, tsk_timer_id_t);
+ }
+ return self;
+}
+static void* tsk_obj_dtor(void * self) {
+ return self;
+}
+static int tsk_obj_cmp(const void *obj1, const void *obj2){
+ return 0;
+}
+static const tsk_object_def_t tsk_obj_def_s =
+{
+ sizeof(tsk_obj_t),
+ tsk_obj_ctor,
+ tsk_obj_dtor,
+ tsk_obj_cmp,
+};
+const tsk_object_def_t *tsk_obj_def_t = &tsk_obj_def_s;
+
+void *run(void* self)
+{
+ int i = 0;
+ tsk_list_item_t *curr;
+
+ TSK_RUNNABLE_RUN_BEGIN(self);
+
+ if(curr = TSK_RUNNABLE_POP_FIRST(self)){
+ const tsk_obj_t *obj = (const tsk_obj_t*)curr->data;
+ printf("\n\nRunnable event-id===>[%llu]\n\n", obj->timer_id);
+ tsk_object_unref(curr);
+ }
+
+ TSK_RUNNABLE_RUN_END(self);
+
+ return 0;
+}
+
+static int test_runnable_timer_callback(const void* arg, tsk_timer_id_t timer_id)
+{
+ const tsk_runnable_t* runnable = arg;
+ if(runnable){
+ TSK_RUNNABLE_ENQUEUE(runnable, timer_id);
+ return 0;
+ }
+ return -1;
+}
+
+void test_runnable()
+{
+ size_t i;
+ tsk_timer_manager_handle_t *timer_mgr = tsk_timer_manager_create();
+ tsk_runnable_t* runnable = tsk_runnable_create();
+ runnable->run = run;
+ printf("test_runnable//\n");
+
+ tsk_timer_manager_start(timer_mgr);
+ tsk_runnable_start(runnable, tsk_obj_def_t);
+
+ for(i=0; i<sizeof(runnable_timers)/sizeof(test_runnable_timer_t); ++i){
+ runnable_timers[i].id = tsk_timer_manager_schedule(timer_mgr, runnable_timers[i].timeout, test_runnable_timer_callback, runnable);
+ }
+
+ tsk_thread_sleep(4000);
+
+ /* Stops and frees both timer manager and runnable object */
+ TSK_OBJECT_SAFE_FREE(runnable);
+ TSK_OBJECT_SAFE_FREE(timer_mgr);
+}
+
+#endif /* _TEST_RUNNABLE_H_ */
diff --git a/tinySAK/test/test_safeobject.h b/tinySAK/test/test_safeobject.h
new file mode 100644
index 0000000..0220b30
--- /dev/null
+++ b/tinySAK/test/test_safeobject.h
@@ -0,0 +1,90 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+#ifndef _TEST_SAFEOBJ_H_
+#define _TEST_SAFEOBJ_H_
+
+int so_mutex_count = 0;
+
+typedef struct mysafeobj_s
+{
+ TSK_DECLARE_SAFEOBJ;
+
+ int test1;
+ int test2;
+}
+mysafeobj_t;
+
+void *threadfunc_safeobj1(void *parm)
+{
+ mysafeobj_t *safeobj = (mysafeobj_t *)parm;
+ int ret = 0;
+
+ so_mutex_count++;
+ ret = tsk_safeobj_lock(safeobj);
+ printf("threadfunc_safeobj1/// %d\n", ret);
+
+ return 0;
+}
+
+void *threadfunc_safeobj2(void *parm)
+{
+ mysafeobj_t *safeobj = (mysafeobj_t *)parm;
+ int ret = 0;
+
+ so_mutex_count++;
+ ret = tsk_safeobj_lock(safeobj);
+ printf("threadfunc_safeobj2/// %d\n", ret);
+
+ return 0;
+}
+
+/* test safeobject */
+void test_safeobject()
+{
+ mysafeobj_t* obj = calloc(1, sizeof(mysafeobj_t));
+ void* tid[2] = {0, 0};
+ int i;
+
+ printf("test_safeobject//\n");
+
+ tsk_safeobj_init(obj);
+
+ //assert(!tsk_safeobj_lock(obj));
+
+ tsk_thread_create(&tid[0], threadfunc_safeobj1, obj);
+ tsk_thread_create(&tid[1], threadfunc_safeobj2, obj);
+
+ /* VERY BAD */
+ while(so_mutex_count<2);
+ for(i=0;i<10000000;i++);
+
+ /*assert(!*/tsk_safeobj_unlock(obj)/*)*/;
+ /*assert(!*/tsk_safeobj_unlock(obj)/*)*/;
+
+ tsk_thread_join(&tid[0]);
+ tsk_thread_join(&tid[1]);
+
+ tsk_safeobj_deinit(obj);
+ tsk_free((void**)&obj);
+}
+
+#endif /* _TEST_SAFEOBJ_H_ */
diff --git a/tinySAK/test/test_semaphore.h b/tinySAK/test/test_semaphore.h
new file mode 100644
index 0000000..977dd9f
--- /dev/null
+++ b/tinySAK/test/test_semaphore.h
@@ -0,0 +1,73 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+#ifndef _TEST_SEMAPHORE_H_
+#define _TEST_SEMAPHORE_H_
+
+void *threadfunc_semaphore1(void *parm)
+{
+ tsk_semaphore_handle_t *semaphore = (tsk_semaphore_handle_t *)parm;
+ int ret = 0;
+
+ printf("threadfunc_semaphore1/// START %d\n", ret);
+ ret = tsk_semaphore_decrement(semaphore);
+ printf("threadfunc_semaphore1/// STOP %d\n", ret);
+
+ return 0;
+}
+
+void *threadfunc_semaphore2(void *parm)
+{
+ tsk_semaphore_handle_t *semaphore = (tsk_semaphore_handle_t *)parm;
+ int ret = 0;
+
+ printf("threadfunc_semaphore2/// START %d\n", ret);
+ ret = tsk_semaphore_decrement(semaphore);
+ printf("threadfunc_semaphore2/// STOP %d\n", ret);
+
+ return 0;
+}
+
+/* Pthread semaphore */
+void test_semaphore()
+{
+ tsk_semaphore_handle_t *semaphore = tsk_semaphore_create();
+ void* tid[2] = {0,0};
+
+ printf("test_semaphore//\n");
+
+ tsk_thread_create(&tid[0], threadfunc_semaphore1, semaphore);
+ tsk_thread_create(&tid[1], threadfunc_semaphore2, semaphore);
+
+ tsk_thread_sleep(1000);
+
+ assert(!tsk_semaphore_increment(semaphore));
+ assert(!tsk_semaphore_increment(semaphore));
+
+ tsk_thread_sleep(1000);
+
+ tsk_thread_join(&tid[0]);
+ tsk_thread_join(&tid[1]);
+
+ tsk_semaphore_destroy(&semaphore);
+}
+
+#endif /* _TEST_SEMAPHORE_H_ */
diff --git a/tinySAK/test/test_sha1.h b/tinySAK/test/test_sha1.h
new file mode 100644
index 0000000..5e2ef78
--- /dev/null
+++ b/tinySAK/test/test_sha1.h
@@ -0,0 +1,96 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+#ifndef _TEST_SHA1_H_
+#define _TEST_SHA1_H_
+
+struct sha1_result
+{
+ const char* msg;
+ const char* xres;
+};
+
+struct sha1_result msgs[] =
+{
+ { "", "da39a3ee5e6b4b0d3255bfef95601890afd80709" },
+ { "The quick brown fox jumps over the lazy dog", "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12" },
+ { "The quick brown fox jumps over the lazy cog", "de9f2c7fd25e1b3afad3e85a0bd17d9b100db4b3" },
+};
+
+void test_sha1()
+{
+ size_t i;
+ tsk_sha1string_t sha1result;
+
+ for(i=0; i< sizeof(msgs)/sizeof(struct sha1_result); i++)
+ {
+ tsk_sha1compute(msgs[i].msg, strlen(msgs[i].msg), &sha1result);
+ if(tsk_striequals(msgs[i].xres, sha1result))
+ {
+ TSK_DEBUG_INFO("[SHA1-%d] ==> OK", i);
+ }
+ else
+ {
+ TSK_DEBUG_INFO("[SHA1-%d] ==> NOK", i);
+ }
+ }
+}
+
+struct hmac_sha1_result
+{
+ const char* msg;
+ const char* key;
+ const char* xres;
+};
+
+struct hmac_sha1_result hmac_sha1_msgs[] =
+{
+ { "Hi There", "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", "b617318655057264e28bc0b6fb378c8ef146be00" },
+ { "what do ya want for nothing?", "Jefe", "effcdf6ae5eb2fa2d27416d5f184df9c259a7c79" },
+ { "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd", "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", "125d7342b9ac11cd91a39af48aa17b4f63f175d3" },
+ { "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd", "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19", "4c9007f4026250c6bc8414f9bf50c86c2d7235da" },
+ { "Test With Truncation", "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c", "4c1a03424b55e07fe7f27be1d58bb9324a9a5a04" },
+ { "Test Using Larger Than Block-Size Key - Hash Key First", "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", "aa4ae5e15272d00e95705637ce8a3b55ed402112" },
+ { "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data", "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", "e8e99d0f45237d786d6bbaa7965c7808bbff1a91" },
+
+};
+
+void test_hmac_sha1()
+{
+ size_t i;
+ tsk_sha1string_t sha1result;
+
+ for(i=0; i< sizeof(hmac_sha1_msgs)/sizeof(struct hmac_sha1_result); i++)
+ {
+ hmac_sha1_compute((const uint8_t*)hmac_sha1_msgs[i].msg, strlen(hmac_sha1_msgs[i].msg), hmac_sha1_msgs[i].key, strlen(hmac_sha1_msgs[i].key), &sha1result);
+ if(tsk_striequals(hmac_sha1_msgs[i].xres, sha1result))
+ {
+ TSK_DEBUG_INFO("[SHA1-%d] ==> OK", i);
+ }
+ else
+ {
+ TSK_DEBUG_INFO("[SHA1-%d] ==> NOK", i);
+ }
+ }
+}
+
+
+#endif /* _TEST_SHA1_H_ */
diff --git a/tinySAK/test/test_strings.h b/tinySAK/test/test_strings.h
new file mode 100644
index 0000000..a6d1b10
--- /dev/null
+++ b/tinySAK/test/test_strings.h
@@ -0,0 +1,75 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+#ifndef _TEST_STRINGS_H_
+#define _TEST_STRINGS_H_
+
+/* test string manipulation */
+void test_strings()
+{
+ char* str = tsk_null;
+ int index;
+
+ /* IndexOf */
+ index = tsk_strindexOf("C:\\test.zip", 5, "\\");
+ index = tsk_strindexOf("C:\\test.zip", tsk_strlen("C:\\test.zip"), "abc");
+ index = tsk_strLastIndexOf("C:\\my dirctory\\test.zip", tsk_strlen("C:\\my dirctory\test.zip"), "\\");
+ index = tsk_strLastIndexOf("C:\\my dirctory\\test.zip", tsk_strlen("C:\\my dirctory\test.zip"), ".");
+
+ /* LastIndexOf */
+
+ /* concatenation */
+ tsk_strcat(&str, " first ");
+ printf("test_strings/// strcat=%s\n", str);
+
+ /* Trim Right */
+ tsk_strtrim_right(&str);
+ printf("test_strings/// trim_right=%s\n", str);
+
+ tsk_strcat(&str, "second");
+ printf("test_strings/// strcat=%s\n", str);
+
+ /* Trim Left */
+ tsk_strtrim_left(&str);
+ printf("test_strings/// trim_left=%s\n", str);
+
+ tsk_free((void**)&str);
+
+ /* sprintf */
+ tsk_sprintf(&str, " \n\t%s %s\r ", "first", "second");
+ printf("test_strings/// strcat=\"%s\"\n", str);
+
+ /* Trim Both */
+ tsk_strtrim_both(&str);
+ printf("test_strings/// trim_both=%s\n", str);
+
+ /* Quote */
+ tsk_strquote(&str);
+ printf("test_strings/// quote=%s\n", str);
+
+ /* Unquote */
+ tsk_strunquote(&str);
+ printf("test_strings/// unquote=%s\n", str);
+
+ tsk_free((void**)&str);
+}
+
+#endif /* _TEST_STRINGS_H_ */
diff --git a/tinySAK/test/test_threads.h b/tinySAK/test/test_threads.h
new file mode 100644
index 0000000..166765b
--- /dev/null
+++ b/tinySAK/test/test_threads.h
@@ -0,0 +1,48 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou@yahoo.fr>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+
+
+#ifndef _TEST_THREADS_H_
+#define _TEST_THREADS_H_
+
+
+void* MyThreadFunction(void *arg)
+{
+ printf("arg=%d", *((int*)arg));
+ return tsk_null;
+}
+
+void test_threads()
+{
+ void* tid[1] = {tsk_null}; // thread id
+ int arg = 112; // arg to pass to the function
+
+ printf("test_threads//\n");
+
+ // create the thread
+ tsk_thread_create(&tid[0], MyThreadFunction, &arg);
+
+ // join the thread
+ tsk_thread_join(&(tid[0]));
+}
+
+#endif /* _TEST_THREADS_H_ */
diff --git a/tinySAK/test/test_timer.h b/tinySAK/test/test_timer.h
new file mode 100644
index 0000000..2b7ab4f
--- /dev/null
+++ b/tinySAK/test/test_timer.h
@@ -0,0 +1,104 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+#ifndef _TEST_TIMER_H_
+#define _TEST_TIMER_H_
+typedef struct test_timer_s
+{
+ tsk_timer_id_t id;
+ uint64_t timeout;
+ const char *arg;
+}
+test_timer_t;
+
+test_timer_t timers[] =
+{
+ {0, 2000, "3"},
+ {1, 2500, "4"},
+ {2, 500, "1"},
+ {3, 1000, "2"},
+ {4, 1000, "2"},
+ {5, 0, "0"},
+ {6, 10000, "6"},
+ {7, 3000, "5"},
+ {8, 2500, "4"},
+};
+
+static int test_timer_callback(const void* arg, tsk_timer_id_t timer_id)
+{
+ // Do quick job
+ printf("test_timer - id=%llu and arg=%s//\n", timer_id, arg);
+ return 0;
+}
+
+void test_global_timer()
+{
+ size_t i;
+ tsk_timer_mgr_global_ref();
+
+ // for test: start it two times
+ tsk_timer_mgr_global_start();
+ tsk_timer_mgr_global_start();
+
+ for(i=0; i<sizeof(timers)/sizeof(test_timer_t); ++i){
+ timers[i].id = tsk_timer_mgr_global_schedule(timers[i].timeout, test_timer_callback, timers[i].arg);
+ }
+
+ tsk_timer_mgr_global_cancel(timers[6].id);
+ tsk_timer_mgr_global_cancel(timers[2].id);
+
+ tsk_thread_sleep(4000);
+
+ // for test: stop it only one time
+ tsk_timer_mgr_global_stop();
+ tsk_timer_mgr_global_stop();
+
+ tsk_timer_mgr_global_unref();
+}
+
+void test_single_timer()
+{
+ size_t i;
+ tsk_timer_manager_handle_t *handle = tsk_timer_manager_create();
+ printf("test_timer//\n");
+
+ tsk_timer_manager_start(handle);
+
+ for(i=0; i<sizeof(timers)/sizeof(test_timer_t); ++i){
+ timers[i].id = tsk_timer_manager_schedule(handle, timers[i].timeout, test_timer_callback, timers[i].arg);
+ }
+
+ tsk_timer_manager_cancel(handle, timers[6].id);
+ tsk_timer_manager_cancel(handle, timers[2].id);
+
+ tsk_thread_sleep(4000);
+
+ /* Stops and frees the timer manager */
+ TSK_OBJECT_SAFE_FREE(handle);
+}
+
+void test_timer()
+{
+ //test_single_timer();
+ test_global_timer();
+}
+
+#endif /* _TEST_TIMER_H_ */
diff --git a/tinySAK/test/test_url.h b/tinySAK/test/test_url.h
new file mode 100644
index 0000000..76aa456
--- /dev/null
+++ b/tinySAK/test/test_url.h
@@ -0,0 +1,43 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+#ifndef _TEST_URL_H_
+#define _TEST_URL_H_
+
+/* url encoding/decoding */
+void test_url()
+{
+ const char *url = "http://xcap.example.org/resource-lists/users/sip:RCSUser@example.org/index/~~/resource-lists/list%5B@name=%22rcs%22%5D";
+ char *str1, *str2;
+
+ /*decode url*/
+ str1 = tsk_url_decode(url);
+ printf("test_url/// decoded url:%s\n", str1);
+
+ /*encode url*/
+ str2 = tsk_url_encode(str1);
+ printf("test_url/// encoded url:%s\n", str2);
+
+ tsk_free((void**)&str1);
+ tsk_free((void**)&str2);
+}
+
+#endif /* _TEST_URL_H_ */
diff --git a/tinySAK/test/test_uuid.h b/tinySAK/test/test_uuid.h
new file mode 100644
index 0000000..b02db33
--- /dev/null
+++ b/tinySAK/test/test_uuid.h
@@ -0,0 +1,35 @@
+/*
+* Copyright (C) 2009 Mamadou Diop.
+*
+* Contact: Mamadou Diop <diopmamadou@yahoo.fr>
+*
+* This file is part of Open Source Doubango Framework.
+*
+* DOUBANGO 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 3 of the License, or
+* (at your option) any later version.
+*
+* DOUBANGO 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 DOUBANGO.
+*
+*/
+#ifndef _TEST_UUID_H_
+#define _TEST_UUID_H_
+
+void test_uuid()
+{
+ tsk_uuidstring_t uuid;
+
+ tsk_uuidgenerate(&uuid);
+
+ TSK_DEBUG_INFO("Generated UUID: %s", uuid);
+}
+
+#endif /* _TEST_UUID_H_ */
+
diff --git a/tinySAK/tinySAK.sln b/tinySAK/tinySAK.sln
new file mode 100644
index 0000000..717e783
--- /dev/null
+++ b/tinySAK/tinySAK.sln
@@ -0,0 +1,40 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinySAK", "tinySAK.vcproj", "{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test\test.vcproj", "{7A1F8D56-A91F-4658-867F-5E24837071C0}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ Release|Win32 = Release|Win32
+ Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Win32.Build.0 = Debug|Win32
+ {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Win32.ActiveCfg = Release|Win32
+ {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Win32.Build.0 = Release|Win32
+ {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ {6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ {7A1F8D56-A91F-4658-867F-5E24837071C0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7A1F8D56-A91F-4658-867F-5E24837071C0}.Debug|Win32.Build.0 = Debug|Win32
+ {7A1F8D56-A91F-4658-867F-5E24837071C0}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ {7A1F8D56-A91F-4658-867F-5E24837071C0}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ {7A1F8D56-A91F-4658-867F-5E24837071C0}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ {7A1F8D56-A91F-4658-867F-5E24837071C0}.Release|Win32.ActiveCfg = Release|Win32
+ {7A1F8D56-A91F-4658-867F-5E24837071C0}.Release|Win32.Build.0 = Release|Win32
+ {7A1F8D56-A91F-4658-867F-5E24837071C0}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ {7A1F8D56-A91F-4658-867F-5E24837071C0}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ {7A1F8D56-A91F-4658-867F-5E24837071C0}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/tinySAK/tinySAK.tag b/tinySAK/tinySAK.tag
new file mode 100644
index 0000000..efc01ed
--- /dev/null
+++ b/tinySAK/tinySAK.tag
@@ -0,0 +1,7144 @@
+<?xml version='1.0' encoding='ISO-8859-1' standalone='yes' ?>
+<tagfile>
+ <compound kind="page">
+ <name>index</name>
+ <title>tinySAK API Overview</title>
+ <filename>index</filename>
+ </compound>
+ <compound kind="file">
+ <name>tinysak_config.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tinysak__config_8h</filename>
+ <includes id="tsk__common_8h" name="tsk_common.h" local="yes" imported="no">tsk_common.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>TINYSAK_API</name>
+ <anchorfile>tinysak__config_8h.html</anchorfile>
+ <anchor>a93681e32eaf27aa97043e5d448a1b252</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TINYSAK_GEXTERN</name>
+ <anchorfile>tinysak__config_8h.html</anchorfile>
+ <anchor>aba27eabe25f2151a8b68a8dde1ab75c9</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BEGIN_DECLS</name>
+ <anchorfile>tinysak__config_8h.html</anchorfile>
+ <anchor>a61fec07ba4497f9657df0cf0ab9cdbd9</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_END_DECLS</name>
+ <anchorfile>tinysak__config_8h.html</anchorfile>
+ <anchor>a872c16ec77fe0589da74f115b518a7dd</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_INLINE</name>
+ <anchorfile>tinysak__config_8h.html</anchorfile>
+ <anchor>a474b4d749c75a2541046d8d768baf9f8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>HAVE_GETTIMEOFDAY</name>
+ <anchorfile>tinysak__config_8h.html</anchorfile>
+ <anchor>a32e7ff1da5763e68f44097cb23826415</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk_8c</filename>
+ <includes id="tsk_8h" name="tsk.h" local="yes" imported="no">tsk.h</includes>
+ <docanchor file="tsk_8c">LICENSE</docanchor>
+ </compound>
+ <compound kind="file">
+ <name>tsk.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <includes id="tsk__list_8h" name="tsk_list.h" local="yes" imported="no">tsk_list.h</includes>
+ <includes id="tsk__string_8h" name="tsk_string.h" local="yes" imported="no">tsk_string.h</includes>
+ <includes id="tsk__buffer_8h" name="tsk_buffer.h" local="yes" imported="no">tsk_buffer.h</includes>
+ <includes id="tsk__memory_8h" name="tsk_memory.h" local="yes" imported="no">tsk_memory.h</includes>
+ <includes id="tsk__url_8h" name="tsk_url.h" local="yes" imported="no">tsk_url.h</includes>
+ <includes id="tsk__params_8h" name="tsk_params.h" local="yes" imported="no">tsk_params.h</includes>
+ <includes id="tsk__options_8h" name="tsk_options.h" local="yes" imported="no">tsk_options.h</includes>
+ <includes id="tsk__fsm_8h" name="tsk_fsm.h" local="yes" imported="no">tsk_fsm.h</includes>
+ <includes id="tsk__time_8h" name="tsk_time.h" local="yes" imported="no">tsk_time.h</includes>
+ <includes id="tsk__timer_8h" name="tsk_timer.h" local="yes" imported="no">tsk_timer.h</includes>
+ <includes id="tsk__condwait_8h" name="tsk_condwait.h" local="yes" imported="no">tsk_condwait.h</includes>
+ <includes id="tsk__mutex_8h" name="tsk_mutex.h" local="yes" imported="no">tsk_mutex.h</includes>
+ <includes id="tsk__semaphore_8h" name="tsk_semaphore.h" local="yes" imported="no">tsk_semaphore.h</includes>
+ <includes id="tsk__thread_8h" name="tsk_thread.h" local="yes" imported="no">tsk_thread.h</includes>
+ <includes id="tsk__runnable_8h" name="tsk_runnable.h" local="yes" imported="no">tsk_runnable.h</includes>
+ <includes id="tsk__safeobj_8h" name="tsk_safeobj.h" local="yes" imported="no">tsk_safeobj.h</includes>
+ <includes id="tsk__object_8h" name="tsk_object.h" local="yes" imported="no">tsk_object.h</includes>
+ <includes id="tsk__debug_8h" name="tsk_debug.h" local="yes" imported="no">tsk_debug.h</includes>
+ <includes id="tsk__ppfcs16_8h" name="tsk_ppfcs16.h" local="yes" imported="no">tsk_ppfcs16.h</includes>
+ <includes id="tsk__sha1_8h" name="tsk_sha1.h" local="yes" imported="no">tsk_sha1.h</includes>
+ <includes id="tsk__md5_8h" name="tsk_md5.h" local="yes" imported="no">tsk_md5.h</includes>
+ <includes id="tsk__hmac_8h" name="tsk_hmac.h" local="yes" imported="no">tsk_hmac.h</includes>
+ <includes id="tsk__base64_8h" name="tsk_base64.h" local="yes" imported="no">tsk_base64.h</includes>
+ <includes id="tsk__uuid_8h" name="tsk_uuid.h" local="yes" imported="no">tsk_uuid.h</includes>
+ <includes id="tsk__ragel__state_8h" name="tsk_ragel_state.h" local="yes" imported="no">tsk_ragel_state.h</includes>
+ </compound>
+ <compound kind="file">
+ <name>tsk_base64.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__base64_8c</filename>
+ <includes id="tsk__base64_8h" name="tsk_base64.h" local="yes" imported="no">tsk_base64.h</includes>
+ <includes id="tsk__memory_8h" name="tsk_memory.h" local="yes" imported="no">tsk_memory.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BASE64_PAD</name>
+ <anchorfile>tsk__base64_8c.html</anchorfile>
+ <anchor>a87d3c925f8c6a07d6972150f67bdf4ca</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BASE64_ENCODE_BLOCK_SIZE</name>
+ <anchorfile>tsk__base64_8c.html</anchorfile>
+ <anchor>aa9eaa10849ebb08891f69583ef9ef7a2</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BASE64_DECODE_BLOCK_SIZE</name>
+ <anchorfile>tsk__base64_8c.html</anchorfile>
+ <anchor>aae9a3ab74cddc1c3d57ab33d853d3e54</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_size_t</type>
+ <name>tsk_base64_encode</name>
+ <anchorfile>group__tsk__base64__group.html</anchorfile>
+ <anchor>gaa38edf458cb1977768855c2eb5ac68e6</anchor>
+ <arglist>(const uint8_t *input, tsk_size_t input_size, char **output)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_size_t</type>
+ <name>tsk_base64_decode</name>
+ <anchorfile>group__tsk__base64__group.html</anchorfile>
+ <anchor>ga1921043aba8ed60cbe1089220ecc8dd0</anchor>
+ <arglist>(const uint8_t *input, tsk_size_t input_size, char **output)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_base64.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__base64_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BASE64_ENCODE_LEN</name>
+ <anchorfile>group__tsk__base64__group.html</anchorfile>
+ <anchor>gaa519cde8485bcd190353fa92d90b8d0e</anchor>
+ <arglist>(IN_LEN)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BASE64_DECODE_LEN</name>
+ <anchorfile>group__tsk__base64__group.html</anchorfile>
+ <anchor>ga271eb33c717d7581dbe6949f80c772bb</anchor>
+ <arglist>(IN_LEN)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_size_t</type>
+ <name>tsk_base64_encode</name>
+ <anchorfile>group__tsk__base64__group.html</anchorfile>
+ <anchor>gaa38edf458cb1977768855c2eb5ac68e6</anchor>
+ <arglist>(const uint8_t *input, tsk_size_t input_size, char **output)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_size_t</type>
+ <name>tsk_base64_decode</name>
+ <anchorfile>group__tsk__base64__group.html</anchorfile>
+ <anchor>ga1921043aba8ed60cbe1089220ecc8dd0</anchor>
+ <arglist>(const uint8_t *input, tsk_size_t input_size, char **output)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_binaryutils.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__binaryutils_8c</filename>
+ <includes id="tsk__binaryutils_8h" name="tsk_binaryutils.h" local="yes" imported="no">tsk_binaryutils.h</includes>
+ </compound>
+ <compound kind="file">
+ <name>tsk_binaryutils.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__binaryutils_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BINARY_REVERSE_2BYTE</name>
+ <anchorfile>group__tsk__binaryutils__group.html</anchorfile>
+ <anchor>gae5cadce2121209897be98dfaf59f7cd4</anchor>
+ <arglist>(value)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_TO_U8</name>
+ <anchorfile>group__tsk__binaryutils__group.html</anchorfile>
+ <anchor>ga66745fafbfa0f8f707e77db6c42d5cf7</anchor>
+ <arglist>(buffer)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BINARY_GET_1BYTE</name>
+ <anchorfile>group__tsk__binaryutils__group.html</anchorfile>
+ <anchor>gaf3a4d14eabeeaf8bcb65c2f54f7150df</anchor>
+ <arglist>(buffer)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BINARY_GET_2BYTES</name>
+ <anchorfile>group__tsk__binaryutils__group.html</anchorfile>
+ <anchor>ga70d6ced21c19792d0423d71e00966231</anchor>
+ <arglist>(buffer)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BINARY_SET_2BYTES</name>
+ <anchorfile>group__tsk__binaryutils__group.html</anchorfile>
+ <anchor>gabedeb908519a0fd5eaba54b28ac9abfa</anchor>
+ <arglist>(buffer, value)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_buffer.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__buffer_8c</filename>
+ <includes id="tsk__buffer_8h" name="tsk_buffer.h" local="yes" imported="no">tsk_buffer.h</includes>
+ <includes id="tsk__memory_8h" name="tsk_memory.h" local="yes" imported="no">tsk_memory.h</includes>
+ <includes id="tsk__debug_8h" name="tsk_debug.h" local="yes" imported="no">tsk_debug.h</includes>
+ <member kind="function">
+ <type>tsk_buffer_t *</type>
+ <name>tsk_buffer_create</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga30c932d68d69c4d981a2a9550171061f</anchor>
+ <arglist>(const void *data, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_buffer_t *</type>
+ <name>tsk_buffer_create_null</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga1548cfc14bf9636cd81ec286536d74b5</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_buffer_append_2</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga80784bf413b679251342733d67f83251</anchor>
+ <arglist>(tsk_buffer_t *self, const char *format,...)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_buffer_append</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>gac7a49242ed646e895e0c8cf084b6377c</anchor>
+ <arglist>(tsk_buffer_t *self, const void *data, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_buffer_realloc</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga5f14a6fa7f4fa006a7a7ac184320acef</anchor>
+ <arglist>(tsk_buffer_t *self, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_buffer_remove</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>gaf9a140a6139445c9d6bbbec01221884f</anchor>
+ <arglist>(tsk_buffer_t *self, tsk_size_t position, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_buffer_insert</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>gaafb6764ac2eca7d572d5daff83551f00</anchor>
+ <arglist>(tsk_buffer_t *self, tsk_size_t position, const void *data, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_buffer_cleanup</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga8a31cbf88b943d87b6858e9c6472459d</anchor>
+ <arglist>(tsk_buffer_t *self)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_buffer_takeownership</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga0c66b3c564a79f4d5ba7a2c0bf199464</anchor>
+ <arglist>(tsk_buffer_t *self, void **data, tsk_size_t size)</arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tsk_buffer_def_t</name>
+ <anchorfile>tsk__buffer_8c.html</anchorfile>
+ <anchor>aea122411bde6027a05f0de2208d1ec15</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_buffer.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__buffer_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <includes id="tsk__list_8h" name="tsk_list.h" local="yes" imported="no">tsk_list.h</includes>
+ <class kind="struct">tsk_buffer_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BUFFER</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga0b2d18231f123fc48880d65950f786ea</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BUFFER_DATA</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>gaf525a0b1ba4d2e0086bc2630006f805b</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BUFFER_SIZE</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga252cf6d43f95ebeada69424ab8a023d5</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BUFFER_TO_STRING</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>gaf3026d62d560741429fcdefa3ca3c729</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BUFFER_TO_U8</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga61169862fb2754c5bcaab5a8015a1efc</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_buffer_s</type>
+ <name>tsk_buffer_t</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga0d2bdd4e540e5c9d08fc3e1802390cf8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>tsk_list_t</type>
+ <name>tsk_buffers_L_t</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>gafbd810591304fb3538654b30b26d672b</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_buffer_t *</type>
+ <name>tsk_buffer_create</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga30c932d68d69c4d981a2a9550171061f</anchor>
+ <arglist>(const void *data, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_buffer_t *</type>
+ <name>tsk_buffer_create_null</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga1548cfc14bf9636cd81ec286536d74b5</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_buffer_append_2</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga80784bf413b679251342733d67f83251</anchor>
+ <arglist>(tsk_buffer_t *self, const char *format,...)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_buffer_append</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>gac7a49242ed646e895e0c8cf084b6377c</anchor>
+ <arglist>(tsk_buffer_t *self, const void *data, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_buffer_realloc</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga5f14a6fa7f4fa006a7a7ac184320acef</anchor>
+ <arglist>(tsk_buffer_t *self, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_buffer_remove</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>gaf9a140a6139445c9d6bbbec01221884f</anchor>
+ <arglist>(tsk_buffer_t *self, tsk_size_t position, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_buffer_insert</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>gaafb6764ac2eca7d572d5daff83551f00</anchor>
+ <arglist>(tsk_buffer_t *self, tsk_size_t position, const void *data, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_buffer_cleanup</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga8a31cbf88b943d87b6858e9c6472459d</anchor>
+ <arglist>(tsk_buffer_t *self)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_buffer_takeownership</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga0c66b3c564a79f4d5ba7a2c0bf199464</anchor>
+ <arglist>(tsk_buffer_t *self, void **data, tsk_size_t size)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSAK_GEXTERN const tsk_object_def_t *</type>
+ <name>tsk_buffer_def_t</name>
+ <anchorfile>tsk__buffer_8h.html</anchorfile>
+ <anchor>ab9a49f04d1e341a1c0a33635d1527894</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_common.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__common_8h</filename>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_bool_t</name>
+ <anchorfile>tsk__common_8h.html</anchorfile>
+ <anchor>a32e17114f759223130cec639c6b53d1f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_true</name>
+ <anchorfile>tsk__common_8h.html</anchorfile>
+ <anchor>a5202cc7c9131f77e728a0c5c616110d0</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_false</name>
+ <anchorfile>tsk__common_8h.html</anchorfile>
+ <anchor>ac5590fee35fe792eceee64d601c2117a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_MIN</name>
+ <anchorfile>tsk__common_8h.html</anchorfile>
+ <anchor>af453d02f1103c2b559869388e3e06691</anchor>
+ <arglist>(a, b)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_MAX</name>
+ <anchorfile>tsk__common_8h.html</anchorfile>
+ <anchor>aaab1cdd48d7a13eb531d4b2f5274af2c</anchor>
+ <arglist>(a, b)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_ABS</name>
+ <anchorfile>tsk__common_8h.html</anchorfile>
+ <anchor>a7ca41ecea51e673e7e58dc4362e0524a</anchor>
+ <arglist>(a)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_TO_UINT32</name>
+ <anchorfile>tsk__common_8h.html</anchorfile>
+ <anchor>a5855220a2bb70105e4d5d9c7221a8ea4</anchor>
+ <arglist>(u8_ptr)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_TO_UINT16</name>
+ <anchorfile>tsk__common_8h.html</anchorfile>
+ <anchor>aa1c120ec94a6f02584758fd4de966a84</anchor>
+ <arglist>(u8_ptr)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_va_copy</name>
+ <anchorfile>tsk__common_8h.html</anchorfile>
+ <anchor>a8ca2c911f024cbebc3c4fce91e2f70f4</anchor>
+ <arglist>(D, S)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_null</name>
+ <anchorfile>tsk__common_8h.html</anchorfile>
+ <anchor>a1ac412f55bd0cc0e2a8100cea25cee95</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>int</type>
+ <name>tsk_boolean_t</name>
+ <anchorfile>tsk__common_8h.html</anchorfile>
+ <anchor>a3077e2af3329e6b8df84f83ba5db2e24</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>int</type>
+ <name>tsk_ssize_t</name>
+ <anchorfile>tsk__common_8h.html</anchorfile>
+ <anchor>a1a7b96419b10bbb4970ba092109b08a2</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>unsigned int</type>
+ <name>tsk_size_t</name>
+ <anchorfile>tsk__common_8h.html</anchorfile>
+ <anchor>aa5603826497451951bace4f20f62bba2</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_condwait.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__condwait_8c</filename>
+ <includes id="tsk__condwait_8h" name="tsk_condwait.h" local="yes" imported="no">tsk_condwait.h</includes>
+ <includes id="tsk__memory_8h" name="tsk_memory.h" local="yes" imported="no">tsk_memory.h</includes>
+ <includes id="tsk__debug_8h" name="tsk_debug.h" local="yes" imported="no">tsk_debug.h</includes>
+ <includes id="tsk__time_8h" name="tsk_time.h" local="yes" imported="no">tsk_time.h</includes>
+ <class kind="struct">tsk_condwait_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>CONDWAIT_S</name>
+ <anchorfile>tsk__condwait_8c.html</anchorfile>
+ <anchor>a238114cc8e1e016a6cc6fd57d3cfcc59</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TIMED_OUT</name>
+ <anchorfile>tsk__condwait_8c.html</anchorfile>
+ <anchor>a643edcb536f268f003f2f276ddfa6e48</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>CONDWAIT_S *</type>
+ <name>CONDWAIT_T</name>
+ <anchorfile>tsk__condwait_8c.html</anchorfile>
+ <anchor>a00ff6950e064768630d037886d656d30</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_condwait_s</type>
+ <name>tsk_condwait_t</name>
+ <anchorfile>group__tsk__condwait__group.html</anchorfile>
+ <anchor>ga501fe99869f3cf1af0628f23faf318c4</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_condwait_handle_t *</type>
+ <name>tsk_condwait_create</name>
+ <anchorfile>group__tsk__condwait__group.html</anchorfile>
+ <anchor>ga8d98b2aa5bb33d951e3b82d96f0625ef</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_condwait_wait</name>
+ <anchorfile>group__tsk__condwait__group.html</anchorfile>
+ <anchor>ga1c8bfe69229db0b08e432dbc79eaed46</anchor>
+ <arglist>(tsk_condwait_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_condwait_timedwait</name>
+ <anchorfile>group__tsk__condwait__group.html</anchorfile>
+ <anchor>ga89e771e74d6a3cce8ae076eac75c5ae1</anchor>
+ <arglist>(tsk_condwait_handle_t *handle, uint64_t ms)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_condwait_signal</name>
+ <anchorfile>group__tsk__condwait__group.html</anchorfile>
+ <anchor>ga9eaad3ffd23720abfc081ac86ea74ca4</anchor>
+ <arglist>(tsk_condwait_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_condwait_broadcast</name>
+ <anchorfile>group__tsk__condwait__group.html</anchorfile>
+ <anchor>ga9133f2cc189150eb606015962b07bc98</anchor>
+ <arglist>(tsk_condwait_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_condwait_destroy</name>
+ <anchorfile>group__tsk__condwait__group.html</anchorfile>
+ <anchor>ga95a587d61b4797b7421f02c6650203cc</anchor>
+ <arglist>(tsk_condwait_handle_t **handle)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_condwait.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__condwait_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <includes id="tsk__mutex_8h" name="tsk_mutex.h" local="yes" imported="no">tsk_mutex.h</includes>
+ <member kind="function">
+ <type>TINYSAK_API tsk_condwait_handle_t *</type>
+ <name>tsk_condwait_create</name>
+ <anchorfile>group__tsk__condwait__group.html</anchorfile>
+ <anchor>ga8d98b2aa5bb33d951e3b82d96f0625ef</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_condwait_wait</name>
+ <anchorfile>group__tsk__condwait__group.html</anchorfile>
+ <anchor>ga1c8bfe69229db0b08e432dbc79eaed46</anchor>
+ <arglist>(tsk_condwait_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_condwait_timedwait</name>
+ <anchorfile>group__tsk__condwait__group.html</anchorfile>
+ <anchor>ga89e771e74d6a3cce8ae076eac75c5ae1</anchor>
+ <arglist>(tsk_condwait_handle_t *handle, uint64_t ms)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_condwait_signal</name>
+ <anchorfile>group__tsk__condwait__group.html</anchorfile>
+ <anchor>ga9eaad3ffd23720abfc081ac86ea74ca4</anchor>
+ <arglist>(tsk_condwait_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_condwait_broadcast</name>
+ <anchorfile>group__tsk__condwait__group.html</anchorfile>
+ <anchor>ga9133f2cc189150eb606015962b07bc98</anchor>
+ <arglist>(tsk_condwait_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_condwait_destroy</name>
+ <anchorfile>group__tsk__condwait__group.html</anchorfile>
+ <anchor>ga95a587d61b4797b7421f02c6650203cc</anchor>
+ <arglist>(tsk_condwait_handle_t **handle)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TSK_BEGIN_DECLS typedef void</type>
+ <name>tsk_condwait_handle_t</name>
+ <anchorfile>group__tsk__condwait__group.html</anchorfile>
+ <anchor>gaaeb911fdb4bbe29f40b36ffadc92e9c4</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_debug.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__debug_8c</filename>
+ <includes id="tsk__debug_8h" name="tsk_debug.h" local="yes" imported="no">tsk_debug.h</includes>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_debug_set_arg_data</name>
+ <anchorfile>tsk__debug_8c.html</anchorfile>
+ <anchor>ae72cfdebdb56e2a7b8083fca53907982</anchor>
+ <arglist>(const void *arg_data)</arglist>
+ </member>
+ <member kind="function">
+ <type>const void *</type>
+ <name>tsk_debug_get_arg_data</name>
+ <anchorfile>tsk__debug_8c.html</anchorfile>
+ <anchor>af830dfa1bc42ca0bae29974fb21ec9d7</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_debug_set_info_cb</name>
+ <anchorfile>tsk__debug_8c.html</anchorfile>
+ <anchor>a3bc2c8eb37a87eacc2aea0478b20fa06</anchor>
+ <arglist>(tsk_debug_f cb)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_debug_f</type>
+ <name>tsk_debug_get_info_cb</name>
+ <anchorfile>tsk__debug_8c.html</anchorfile>
+ <anchor>afcb21dd599ca81b30e2a1d18d43740d0</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_debug_set_warn_cb</name>
+ <anchorfile>tsk__debug_8c.html</anchorfile>
+ <anchor>ab59085cfc5ce170d1fc82f3e4a7f5d94</anchor>
+ <arglist>(tsk_debug_f cb)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_debug_f</type>
+ <name>tsk_debug_get_warn_cb</name>
+ <anchorfile>tsk__debug_8c.html</anchorfile>
+ <anchor>a30cce1816fc6af384da5557648d8e281</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_debug_set_error_cb</name>
+ <anchorfile>tsk__debug_8c.html</anchorfile>
+ <anchor>a8f785bbd68b21b2f99b1a811b7f6eb96</anchor>
+ <arglist>(tsk_debug_f cb)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_debug_f</type>
+ <name>tsk_debug_get_error_cb</name>
+ <anchorfile>tsk__debug_8c.html</anchorfile>
+ <anchor>a9773a07d4ad8979a4a875c3274d4b1bd</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_debug_set_fatal_cb</name>
+ <anchorfile>tsk__debug_8c.html</anchorfile>
+ <anchor>aec0e2e62f4376943a788a4aee8e454e9</anchor>
+ <arglist>(tsk_debug_f cb)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_debug_f</type>
+ <name>tsk_debug_get_fatal_cb</name>
+ <anchorfile>tsk__debug_8c.html</anchorfile>
+ <anchor>ac3a7a77f74d2f61ce021f96be8e259ec</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="variable">
+ <type>const void *</type>
+ <name>tsk_debug_arg_data</name>
+ <anchorfile>tsk__debug_8c.html</anchorfile>
+ <anchor>affba4054dd05905e5359b7ea6bb46a47</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_debug_f</type>
+ <name>tsk_debug_info_cb</name>
+ <anchorfile>tsk__debug_8c.html</anchorfile>
+ <anchor>a1347f2f56083f289ad44d429a573fb73</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_debug_f</type>
+ <name>tsk_debug_warn_cb</name>
+ <anchorfile>tsk__debug_8c.html</anchorfile>
+ <anchor>acaa4f0a0d028ef9f3cb47729e9c14544</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_debug_f</type>
+ <name>tsk_debug_error_cb</name>
+ <anchorfile>tsk__debug_8c.html</anchorfile>
+ <anchor>a6fc91cae0fd94107336b4264d2919230</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_debug_f</type>
+ <name>tsk_debug_fatal_cb</name>
+ <anchorfile>tsk__debug_8c.html</anchorfile>
+ <anchor>abd90179616e4ff286f77e0a5511362bc</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_debug.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__debug_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>DEBUG_LEVEL</name>
+ <anchorfile>tsk__debug_8h.html</anchorfile>
+ <anchor>ac2d33ccaf63f5d5b66552b95426c0137</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DEBUG_LEVEL_INFO</name>
+ <anchorfile>group__tsk__debug__group.html</anchorfile>
+ <anchor>ga5f068e0ead7c7e158d2ff28e7b2f2794</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DEBUG_LEVEL_WARN</name>
+ <anchorfile>group__tsk__debug__group.html</anchorfile>
+ <anchor>ga07c8ec1cc5bc17da4b0dcecf724251bd</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DEBUG_LEVEL_ERROR</name>
+ <anchorfile>group__tsk__debug__group.html</anchorfile>
+ <anchor>ga6c7c6775845a96501c54d1f08b0f00c4</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DEBUG_LEVEL_FATAL</name>
+ <anchorfile>group__tsk__debug__group.html</anchorfile>
+ <anchor>gade8136c97f2dd21c2449282fe0ce0f97</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_DEBUG_INFO</name>
+ <anchorfile>tsk__debug_8h.html</anchorfile>
+ <anchor>a05159e17332ba3f49e442c469c3276bd</anchor>
+ <arglist>(FMT,...)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_DEBUG_WARN</name>
+ <anchorfile>tsk__debug_8h.html</anchorfile>
+ <anchor>a3b6eda91adc45bd9a684f9bf9f3c22a4</anchor>
+ <arglist>(FMT,...)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_DEBUG_ERROR</name>
+ <anchorfile>tsk__debug_8h.html</anchorfile>
+ <anchor>a792ec700b78b6143520a2a582f1c99f4</anchor>
+ <arglist>(FMT,...)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_DEBUG_FATAL</name>
+ <anchorfile>tsk__debug_8h.html</anchorfile>
+ <anchor>a5a5352523fd58911b823bdf2b87e789d</anchor>
+ <arglist>(FMT,...)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>int(*</type>
+ <name>tsk_debug_f</name>
+ <anchorfile>tsk__debug_8h.html</anchorfile>
+ <anchor>a672fd4419741fb5780cd29cb0a8315f9</anchor>
+ <arglist>)(const void *arg, const char *fmt,...)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_debug_set_arg_data</name>
+ <anchorfile>tsk__debug_8h.html</anchorfile>
+ <anchor>aff671f9d0c6bf7c9836a305fbf3a711b</anchor>
+ <arglist>(const void *)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API const void *</type>
+ <name>tsk_debug_get_arg_data</name>
+ <anchorfile>tsk__debug_8h.html</anchorfile>
+ <anchor>aaa7532cfe3446913873be0de4dac2938</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_debug_set_info_cb</name>
+ <anchorfile>tsk__debug_8h.html</anchorfile>
+ <anchor>a2bbbddaf14461aacca6c7aa3b72ff656</anchor>
+ <arglist>(tsk_debug_f)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_debug_f</type>
+ <name>tsk_debug_get_info_cb</name>
+ <anchorfile>tsk__debug_8h.html</anchorfile>
+ <anchor>a4662fe8c04eee4dc59bd9ab04c1d340d</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_debug_set_warn_cb</name>
+ <anchorfile>tsk__debug_8h.html</anchorfile>
+ <anchor>ada9e57310804de59f529e1c0b5268eb7</anchor>
+ <arglist>(tsk_debug_f)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_debug_f</type>
+ <name>tsk_debug_get_warn_cb</name>
+ <anchorfile>tsk__debug_8h.html</anchorfile>
+ <anchor>a632383662ba814c39d1ba937d09dba15</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_debug_set_error_cb</name>
+ <anchorfile>tsk__debug_8h.html</anchorfile>
+ <anchor>ae124cbf313fe01ba77eb6765a2bef99c</anchor>
+ <arglist>(tsk_debug_f)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_debug_f</type>
+ <name>tsk_debug_get_error_cb</name>
+ <anchorfile>tsk__debug_8h.html</anchorfile>
+ <anchor>a344550bf3c10dc73168ee713f3336da3</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_debug_set_fatal_cb</name>
+ <anchorfile>tsk__debug_8h.html</anchorfile>
+ <anchor>aa41544c4019c3b06daa8b6be5d1ce1df</anchor>
+ <arglist>(tsk_debug_f)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_debug_f</type>
+ <name>tsk_debug_get_fatal_cb</name>
+ <anchorfile>tsk__debug_8h.html</anchorfile>
+ <anchor>a93160943d9c0ec1780875a76b33c4520</anchor>
+ <arglist>()</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_errno.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__errno_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ </compound>
+ <compound kind="file">
+ <name>tsk_fsm.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__fsm_8c</filename>
+ <includes id="tsk__fsm_8h" name="tsk_fsm.h" local="yes" imported="no">tsk_fsm.h</includes>
+ <includes id="tsk__memory_8h" name="tsk_memory.h" local="yes" imported="no">tsk_memory.h</includes>
+ <includes id="tsk__debug_8h" name="tsk_debug.h" local="yes" imported="no">tsk_debug.h</includes>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_fsm_exec_nothing</name>
+ <anchorfile>tsk__fsm_8c.html</anchorfile>
+ <anchor>acabb8e5cd96f9d74a292750b42994664</anchor>
+ <arglist>(va_list *app)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tsk_fsm_cond_always</name>
+ <anchorfile>tsk__fsm_8c.html</anchorfile>
+ <anchor>aae046fdfd21dbee82cd583cff85713d1</anchor>
+ <arglist>(const void *data1, const void *data2)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_fsm_t *</type>
+ <name>tsk_fsm_create</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>gaf6fbfbe79246f21658bf6313112eccc2</anchor>
+ <arglist>(tsk_fsm_state_id state_curr, tsk_fsm_state_id state_term)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_fsm_entry_t *</type>
+ <name>tsk_fsm_entry_create</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>gaf34efba304baf532624fbdc612085ea3</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_fsm_set</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga9059c5c9cdccf14f4c963bfee38b5ba4</anchor>
+ <arglist>(tsk_fsm_t *self,...)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_fsm_set_callback_terminated</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga609f68b40066be6caebe0c088239f8fa</anchor>
+ <arglist>(tsk_fsm_t *self, tsk_fsm_onterminated_f callback, const void *callbackdata)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_fsm_act</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>gaad1a993a8149a9bda8b67922c1bfa575</anchor>
+ <arglist>(tsk_fsm_t *self, tsk_fsm_action_id action, const void *cond_data1, const void *cond_data2,...)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tsk_fsm_terminated</name>
+ <anchorfile>tsk__fsm_8c.html</anchorfile>
+ <anchor>a9a401a7ad2e0fe27fd365914e57f99d9</anchor>
+ <arglist>(tsk_fsm_t *self)</arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tsk_fsm_def_t</name>
+ <anchorfile>tsk__fsm_8c.html</anchorfile>
+ <anchor>a433fc815f4741519d56ec34eeca223c9</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tsk_fsm_entry_def_t</name>
+ <anchorfile>tsk__fsm_8c.html</anchorfile>
+ <anchor>add408f4ece004a57dd3c20973f6bfad7</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_fsm.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__fsm_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <includes id="tsk__list_8h" name="tsk_list.h" local="yes" imported="no">tsk_list.h</includes>
+ <includes id="tsk__safeobj_8h" name="tsk_safeobj.h" local="yes" imported="no">tsk_safeobj.h</includes>
+ <class kind="struct">tsk_fsm_entry_s</class>
+ <class kind="struct">tsk_fsm_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_FSM_ONTERMINATED_F</name>
+ <anchorfile>tsk__fsm_8h.html</anchorfile>
+ <anchor>a14aa95a9f36477137a566458496ae3c9</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_fsm_state_any</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga9b23f7aef02f0583de042cdfdbed36fd</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_fsm_state_default</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga9cec29ff916b0b892289aa253b9a9005</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_fsm_state_none</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>gab6f3bc3a1849b0f87166a17d9693222d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_fsm_state_final</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga011da4535ba4f75c8b96cb8b854af23e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_fsm_action_any</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>gac3dff3bfd9beb524f0042e05f4c32406</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_FSM_ADD</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga5805916c7bf7784a1a8f004cf8331cf8</anchor>
+ <arglist>(from, action, cond, to, exec, desc)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_FSM_ADD_ALWAYS</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>gabf353526cd2a9a469dd0b51d5cf2be84</anchor>
+ <arglist>(from, action, to, exec, desc)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_FSM_ADD_NOTHING</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga65dad33c43f7a4ff8fbe60ced18b73cb</anchor>
+ <arglist>(from, action, cond, desc)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_FSM_ADD_ALWAYS_NOTHING</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>gacd68f0d226bb6327031b5366ad897436</anchor>
+ <arglist>(from, desc)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_FSM_ADD_DEFAULT</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga9559f633c6a28a18fadd41e38da49015</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_FSM_ADD_NULL</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga471ae39640b3bec50250c259dccf03bf</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="typedef">
+ <type>int</type>
+ <name>tsk_fsm_state_id</name>
+ <anchorfile>tsk__fsm_8h.html</anchorfile>
+ <anchor>ac3a725d1327b6810ca81087dedc86e4f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>int</type>
+ <name>tsk_fsm_action_id</name>
+ <anchorfile>tsk__fsm_8h.html</anchorfile>
+ <anchor>ab16b01d525aeb3ee8549a5b60d651f1e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>tsk_bool_t(*</type>
+ <name>tsk_fsm_cond</name>
+ <anchorfile>tsk__fsm_8h.html</anchorfile>
+ <anchor>ae4c19aefc43ba7f006583f9187857722</anchor>
+ <arglist>)(const void *, const void *)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>int(*</type>
+ <name>tsk_fsm_exec</name>
+ <anchorfile>tsk__fsm_8h.html</anchorfile>
+ <anchor>a12efba0d1645d88a5e685dc187c127a9</anchor>
+ <arglist>)(va_list *app)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>int(*</type>
+ <name>tsk_fsm_onterminated_f</name>
+ <anchorfile>tsk__fsm_8h.html</anchorfile>
+ <anchor>a795596f9aeff2d9ff8bd1f6064117b5b</anchor>
+ <arglist>)(const void *)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_fsm_entry_s</type>
+ <name>tsk_fsm_entry_t</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga72f1e845bcd6c7852a7cc8e2bcbb2d6e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>tsk_list_t</type>
+ <name>tsk_fsm_entries_L_t</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga55fa98af3aeed79f9e0ac47d9c183cbb</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_fsm_s</type>
+ <name>tsk_fsm_t</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga79a204ea8f2c1333aba2d12065bc8a33</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_fsm_t *</type>
+ <name>tsk_fsm_create</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>gaf6fbfbe79246f21658bf6313112eccc2</anchor>
+ <arglist>(tsk_fsm_state_id state_curr, tsk_fsm_state_id state_term)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_fsm_exec_nothing</name>
+ <anchorfile>tsk__fsm_8h.html</anchorfile>
+ <anchor>a5265ee6b2846cb4c7a0d66b7f64ea38f</anchor>
+ <arglist>(va_list *app)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_bool_t</type>
+ <name>tsk_fsm_cond_always</name>
+ <anchorfile>tsk__fsm_8h.html</anchorfile>
+ <anchor>a5f1802d27d36c6c1a45e84837f2daf41</anchor>
+ <arglist>(const void *, const void *)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_fsm_set</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga9059c5c9cdccf14f4c963bfee38b5ba4</anchor>
+ <arglist>(tsk_fsm_t *self,...)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_fsm_set_callback_terminated</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga609f68b40066be6caebe0c088239f8fa</anchor>
+ <arglist>(tsk_fsm_t *self, tsk_fsm_onterminated_f callback, const void *callbackdata)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_fsm_act</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>gaad1a993a8149a9bda8b67922c1bfa575</anchor>
+ <arglist>(tsk_fsm_t *self, tsk_fsm_action_id action, const void *cond_data1, const void *cond_data2,...)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_bool_t</type>
+ <name>tsk_fsm_terminated</name>
+ <anchorfile>tsk__fsm_8h.html</anchorfile>
+ <anchor>a0496f698deb3cfa7c7dc7d3e2ca52c3c</anchor>
+ <arglist>(tsk_fsm_t *self)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSAK_GEXTERN const tsk_object_def_t *</type>
+ <name>tsk_fsm_def_t</name>
+ <anchorfile>tsk__fsm_8h.html</anchorfile>
+ <anchor>a8e917fdf70178d06cb691f888ed44e7f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSAK_GEXTERN const tsk_object_def_t *</type>
+ <name>tsk_fsm_entry_def_t</name>
+ <anchorfile>tsk__fsm_8h.html</anchorfile>
+ <anchor>af01d1250037316521f68c3ebe36e3492</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_hmac.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__hmac_8c</filename>
+ <includes id="tsk__hmac_8h" name="tsk_hmac.h" local="yes" imported="no">tsk_hmac.h</includes>
+ <includes id="tsk__string_8h" name="tsk_string.h" local="yes" imported="no">tsk_string.h</includes>
+ <includes id="tsk__buffer_8h" name="tsk_buffer.h" local="yes" imported="no">tsk_buffer.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_MAX_BLOCK_SIZE</name>
+ <anchorfile>tsk__hmac_8c.html</anchorfile>
+ <anchor>a6eb804cde523f83c9a43722b199abe8f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>enum tsk_hash_type_e</type>
+ <name>tsk_hash_type_t</name>
+ <anchorfile>group__tsk__hmac__group.html</anchorfile>
+ <anchor>gaa0bd128426d679716d9d23a0fb677469</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="enumeration">
+ <name>tsk_hash_type_e</name>
+ <anchorfile>group__tsk__hmac__group.html</anchorfile>
+ <anchor>gaeec7a6e6f400d343cce4e646099aeded</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="enumvalue">
+ <name>md5</name>
+ <anchorfile>group__tsk__hmac__group.html</anchorfile>
+ <anchor>ggaeec7a6e6f400d343cce4e646099aededa261074350302568b2909ca5caaf32c4c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="enumvalue">
+ <name>sha1</name>
+ <anchorfile>group__tsk__hmac__group.html</anchorfile>
+ <anchor>ggaeec7a6e6f400d343cce4e646099aededa79411db037421f2bf2355d19f282444b</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_hmac_xxxcompute</name>
+ <anchorfile>tsk__hmac_8c.html</anchorfile>
+ <anchor>ad841da0165c4d2af4397629cacdb119e</anchor>
+ <arglist>(const uint8_t *input, tsk_size_t input_size, const char *key, tsk_size_t key_size, tsk_hash_type_t type, uint8_t *digest)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>hmac_md5_compute</name>
+ <anchorfile>group__tsk__hmac__group.html</anchorfile>
+ <anchor>gaa4085ee3be5e9d58c675fbf81333121b</anchor>
+ <arglist>(const uint8_t *input, tsk_size_t input_size, const char *key, tsk_size_t key_size, tsk_md5string_t *result)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>hmac_md5digest_compute</name>
+ <anchorfile>group__tsk__hmac__group.html</anchorfile>
+ <anchor>ga1a70aab02cdd93eb7e75c26ed79db846</anchor>
+ <arglist>(const uint8_t *input, tsk_size_t input_size, const char *key, tsk_size_t key_size, tsk_md5digest_t result)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>hmac_sha1_compute</name>
+ <anchorfile>group__tsk__hmac__group.html</anchorfile>
+ <anchor>gadbbbed195249a97ef96509932ba4c1ea</anchor>
+ <arglist>(const uint8_t *input, tsk_size_t input_size, const char *key, tsk_size_t key_size, tsk_sha1string_t *result)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>hmac_sha1digest_compute</name>
+ <anchorfile>group__tsk__hmac__group.html</anchorfile>
+ <anchor>ga3a4fcff9ca7e9ec85d3d3fca50b16de0</anchor>
+ <arglist>(const uint8_t *input, tsk_size_t input_size, const char *key, tsk_size_t key_size, tsk_sha1digest_t result)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_hmac.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__hmac_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <includes id="tsk__sha1_8h" name="tsk_sha1.h" local="yes" imported="no">tsk_sha1.h</includes>
+ <includes id="tsk__md5_8h" name="tsk_md5.h" local="yes" imported="no">tsk_md5.h</includes>
+ <member kind="function">
+ <type>TSK_BEGIN_DECLS TINYSAK_API int</type>
+ <name>hmac_md5_compute</name>
+ <anchorfile>group__tsk__hmac__group.html</anchorfile>
+ <anchor>gaa4085ee3be5e9d58c675fbf81333121b</anchor>
+ <arglist>(const uint8_t *input, tsk_size_t input_size, const char *key, tsk_size_t key_size, tsk_md5string_t *result)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>hmac_md5digest_compute</name>
+ <anchorfile>group__tsk__hmac__group.html</anchorfile>
+ <anchor>ga1a70aab02cdd93eb7e75c26ed79db846</anchor>
+ <arglist>(const uint8_t *input, tsk_size_t input_size, const char *key, tsk_size_t key_size, tsk_md5digest_t result)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>hmac_sha1_compute</name>
+ <anchorfile>group__tsk__hmac__group.html</anchorfile>
+ <anchor>gadbbbed195249a97ef96509932ba4c1ea</anchor>
+ <arglist>(const uint8_t *input, tsk_size_t input_size, const char *key, tsk_size_t key_size, tsk_sha1string_t *result)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>hmac_sha1digest_compute</name>
+ <anchorfile>group__tsk__hmac__group.html</anchorfile>
+ <anchor>ga3a4fcff9ca7e9ec85d3d3fca50b16de0</anchor>
+ <arglist>(const uint8_t *input, tsk_size_t input_size, const char *key, tsk_size_t key_size, tsk_sha1digest_t result)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_list.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__list_8c</filename>
+ <includes id="tsk__list_8h" name="tsk_list.h" local="yes" imported="no">tsk_list.h</includes>
+ <includes id="tsk__memory_8h" name="tsk_memory.h" local="yes" imported="no">tsk_memory.h</includes>
+ <includes id="tsk__debug_8h" name="tsk_debug.h" local="yes" imported="no">tsk_debug.h</includes>
+ <member kind="function">
+ <type>tsk_list_t *</type>
+ <name>tsk_list_create</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga2fb2802394ee97c550ae1e39bb8d073a</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_list_item_t *</type>
+ <name>tsk_list_item_create</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga66702bf5657b609fd6b4e5df5e780ca4</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_list_lock</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga50ea10b14ed681d3d479b323b33f6c28</anchor>
+ <arglist>(tsk_list_t *list)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_list_unlock</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga31b7bea171002ae04936016725a87b06</anchor>
+ <arglist>(tsk_list_t *list)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_list_remove_item</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga2af261ca7e590e04356ec6b2c25dd8aa</anchor>
+ <arglist>(tsk_list_t *list, tsk_list_item_t *item)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_list_item_t *</type>
+ <name>tsk_list_pop_item_by_data</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>gab0fd61b7818ab2bc66089a8f2df08329</anchor>
+ <arglist>(tsk_list_t *list, const tsk_object_t *tskobj)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_list_remove_item_by_data</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga49ab1be4f114420c5b4b8c7f2b8374ad</anchor>
+ <arglist>(tsk_list_t *list, const tsk_object_t *tskobj)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_list_item_t *</type>
+ <name>tsk_list_pop_item_by_pred</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>gac19d6873b2ba28e0e94c0124de6e03ad</anchor>
+ <arglist>(tsk_list_t *list, tsk_list_func_predicate predicate, const void *data)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_list_remove_item_by_pred</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>gacc1b42538856ec9f756de13fe9d56ddd</anchor>
+ <arglist>(tsk_list_t *list, tsk_list_func_predicate predicate, const tsk_object_t *data)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_list_clear_items</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga74a841b1c7df8292b1207fb2f648252b</anchor>
+ <arglist>(tsk_list_t *list)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_list_item_t *</type>
+ <name>tsk_list_pop_first_item</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga511f50b84436857501c343b48938bcc5</anchor>
+ <arglist>(tsk_list_t *list)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_list_push_item</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga78e84f4c8fb03171ed290b8019997aef</anchor>
+ <arglist>(tsk_list_t *list, tsk_list_item_t **item, tsk_bool_t back)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_list_push_filtered_item</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>gad2e1c9d02af90c65b64880fe205c98c5</anchor>
+ <arglist>(tsk_list_t *list, tsk_list_item_t **item, tsk_bool_t ascending)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_list_push_list</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga37e45e926966517183eade6ccc44ea10</anchor>
+ <arglist>(tsk_list_t *dest, const tsk_list_t *src, tsk_bool_t back)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_list_push_data</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>gad38aa4e81cdba612c803c546cdae7b0a</anchor>
+ <arglist>(tsk_list_t *list, void **data, tsk_bool_t back)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_list_push_filtered_data</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga5c8466f48649b102f981d44edb1c717e</anchor>
+ <arglist>(tsk_list_t *list, void **data, tsk_bool_t ascending)</arglist>
+ </member>
+ <member kind="function">
+ <type>const tsk_list_item_t *</type>
+ <name>tsk_list_find_item_by_data</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga126667d805e5cc53af126bbd69ef6b53</anchor>
+ <arglist>(const tsk_list_t *list, const tsk_object_t *tskobj)</arglist>
+ </member>
+ <member kind="function">
+ <type>const tsk_list_item_t *</type>
+ <name>tsk_list_find_item_by_pred</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga830c02dde8ebc3f009365358e42c90f0</anchor>
+ <arglist>(const tsk_list_t *list, tsk_list_func_predicate predicate, const void *data)</arglist>
+ </member>
+ <member kind="function">
+ <type>const tsk_object_t *</type>
+ <name>tsk_list_find_object_by_pred</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>gacedbefcbe8600f1ae107560b1e97aa29</anchor>
+ <arglist>(const tsk_list_t *list, tsk_list_func_predicate predicate, const void *data)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_size_t</type>
+ <name>tsk_list_count</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga4f3cf383327dc893a85685f826c44a04</anchor>
+ <arglist>(const tsk_list_t *list, tsk_list_func_predicate predicate, const void *data)</arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tsk_list_item_def_t</name>
+ <anchorfile>tsk__list_8c.html</anchorfile>
+ <anchor>a2d8374f72591187b9366fc490657a376</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tsk_list_def_t</name>
+ <anchorfile>tsk__list_8c.html</anchorfile>
+ <anchor>ab1bcb3571ff95e9050099b7ceae580d1</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_list.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__list_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <includes id="tsk__mutex_8h" name="tsk_mutex.h" local="yes" imported="no">tsk_mutex.h</includes>
+ <includes id="tsk__object_8h" name="tsk_object.h" local="yes" imported="no">tsk_object.h</includes>
+ <class kind="struct">tsk_list_item_s</class>
+ <class kind="struct">tsk_list_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_LIST_IS_EMPTY</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga3b505dbb26ce90b203d54c83afac4f22</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_LIST_IS_FIRST</name>
+ <anchorfile>tsk__list_8h.html</anchorfile>
+ <anchor>a118c7f663f34373010999aa31ac3d77f</anchor>
+ <arglist>(self, item)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_LIST_IS_LAST</name>
+ <anchorfile>tsk__list_8h.html</anchorfile>
+ <anchor>a857dafa2338b17558205c41b683b3123</anchor>
+ <arglist>(self, item)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_LIST_FIRST_DATA</name>
+ <anchorfile>tsk__list_8h.html</anchorfile>
+ <anchor>a1385601514ae885521f7a5d790b9c4e0</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_list_foreach</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga3dc00dc6de6f204db6cc311fab641552</anchor>
+ <arglist>(item, list)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_list_push_back_item</name>
+ <anchorfile>tsk__list_8h.html</anchorfile>
+ <anchor>a7e9af70f535944be00c283d51e197c49</anchor>
+ <arglist>(list, item)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_list_push_front_item</name>
+ <anchorfile>tsk__list_8h.html</anchorfile>
+ <anchor>adef4a064d5e88a24b5b6a48d1680e2af</anchor>
+ <arglist>(list, item)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_list_push_ascending_item</name>
+ <anchorfile>tsk__list_8h.html</anchorfile>
+ <anchor>a9239fd1b3ca181b7fee9c5489e0b095d</anchor>
+ <arglist>(list, item)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_list_push_descending_item</name>
+ <anchorfile>tsk__list_8h.html</anchorfile>
+ <anchor>ac44b14cd88a2eda24500a8750402b34a</anchor>
+ <arglist>(list, item)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_list_pushback_list</name>
+ <anchorfile>tsk__list_8h.html</anchorfile>
+ <anchor>a6e73ea373bb74e3b1a3f963c69ab4db1</anchor>
+ <arglist>(destination, source)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_list_pushfront_list</name>
+ <anchorfile>tsk__list_8h.html</anchorfile>
+ <anchor>aa94132edee7964ba4f5d4a937d877602</anchor>
+ <arglist>(destination, source)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_list_push_back_data</name>
+ <anchorfile>tsk__list_8h.html</anchorfile>
+ <anchor>ad1042b711878ab31c53b6690c55a433d</anchor>
+ <arglist>(list, data)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_list_push_front_data</name>
+ <anchorfile>tsk__list_8h.html</anchorfile>
+ <anchor>ad9158bd82e61cf316f7fe3005da6e5da</anchor>
+ <arglist>(list, data)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_list_push_ascending_data</name>
+ <anchorfile>tsk__list_8h.html</anchorfile>
+ <anchor>ad24156b46b9d085e73024254198f4565</anchor>
+ <arglist>(list, data)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_list_push_descending_data</name>
+ <anchorfile>tsk__list_8h.html</anchorfile>
+ <anchor>a3ced61760ab8ebe75b13bbb6f4e99c74</anchor>
+ <arglist>(list, data)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_list_item_s</type>
+ <name>tsk_list_item_t</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga7a571edc459af1e1f1019a029e0a694f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_list_s</type>
+ <name>tsk_list_t</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga002f4981eafdbe60111f916ccdfcb128</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>int(*</type>
+ <name>tsk_list_func_predicate</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga527098153df95a041c510091e0a80267</anchor>
+ <arglist>)(const tsk_list_item_t *item, const void *data)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_list_t *</type>
+ <name>tsk_list_create</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga2fb2802394ee97c550ae1e39bb8d073a</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_list_item_t *</type>
+ <name>tsk_list_item_create</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga66702bf5657b609fd6b4e5df5e780ca4</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_list_lock</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga50ea10b14ed681d3d479b323b33f6c28</anchor>
+ <arglist>(tsk_list_t *list)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_list_unlock</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga31b7bea171002ae04936016725a87b06</anchor>
+ <arglist>(tsk_list_t *list)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_list_remove_item</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga2af261ca7e590e04356ec6b2c25dd8aa</anchor>
+ <arglist>(tsk_list_t *list, tsk_list_item_t *item)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_list_item_t *</type>
+ <name>tsk_list_pop_item_by_data</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>gab0fd61b7818ab2bc66089a8f2df08329</anchor>
+ <arglist>(tsk_list_t *list, const tsk_object_t *tskobj)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_list_remove_item_by_data</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga49ab1be4f114420c5b4b8c7f2b8374ad</anchor>
+ <arglist>(tsk_list_t *list, const tsk_object_t *tskobj)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_list_remove_item_by_pred</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>gacc1b42538856ec9f756de13fe9d56ddd</anchor>
+ <arglist>(tsk_list_t *list, tsk_list_func_predicate predicate, const tsk_object_t *data)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_list_item_t *</type>
+ <name>tsk_list_pop_item_by_pred</name>
+ <anchorfile>tsk__list_8h.html</anchorfile>
+ <anchor>adcf2ef7b8bec0a4a5733f957273d06b7</anchor>
+ <arglist>(tsk_list_t *list, tsk_list_func_predicate predicate, const tsk_object_t *data)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_list_clear_items</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga74a841b1c7df8292b1207fb2f648252b</anchor>
+ <arglist>(tsk_list_t *list)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_list_item_t *</type>
+ <name>tsk_list_pop_first_item</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga511f50b84436857501c343b48938bcc5</anchor>
+ <arglist>(tsk_list_t *list)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_list_push_item</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga78e84f4c8fb03171ed290b8019997aef</anchor>
+ <arglist>(tsk_list_t *list, tsk_list_item_t **item, tsk_bool_t back)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_list_push_filtered_item</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>gad2e1c9d02af90c65b64880fe205c98c5</anchor>
+ <arglist>(tsk_list_t *list, tsk_list_item_t **item, tsk_bool_t ascending)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_list_push_list</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga37e45e926966517183eade6ccc44ea10</anchor>
+ <arglist>(tsk_list_t *destination, const tsk_list_t *source, tsk_bool_t back)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_list_push_data</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>gad38aa4e81cdba612c803c546cdae7b0a</anchor>
+ <arglist>(tsk_list_t *list, void **data, tsk_bool_t back)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_list_push_filtered_data</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga5c8466f48649b102f981d44edb1c717e</anchor>
+ <arglist>(tsk_list_t *list, void **data, tsk_bool_t ascending)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API const tsk_list_item_t *</type>
+ <name>tsk_list_find_item_by_data</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga126667d805e5cc53af126bbd69ef6b53</anchor>
+ <arglist>(const tsk_list_t *list, const tsk_object_t *tskobj)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API const tsk_list_item_t *</type>
+ <name>tsk_list_find_item_by_pred</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga830c02dde8ebc3f009365358e42c90f0</anchor>
+ <arglist>(const tsk_list_t *list, tsk_list_func_predicate predicate, const void *data)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API const tsk_object_t *</type>
+ <name>tsk_list_find_object_by_pred</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>gacedbefcbe8600f1ae107560b1e97aa29</anchor>
+ <arglist>(const tsk_list_t *list, tsk_list_func_predicate predicate, const void *data)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_size_t</type>
+ <name>tsk_list_count</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga4f3cf383327dc893a85685f826c44a04</anchor>
+ <arglist>(const tsk_list_t *list, tsk_list_func_predicate predicate, const void *data)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSAK_GEXTERN const tsk_object_def_t *</type>
+ <name>tsk_list_def_t</name>
+ <anchorfile>tsk__list_8h.html</anchorfile>
+ <anchor>a60a97db634e7b9ef3e3878400d710312</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSAK_GEXTERN const tsk_object_def_t *</type>
+ <name>tsk_list_item_def_t</name>
+ <anchorfile>tsk__list_8h.html</anchorfile>
+ <anchor>ab91ea3e24622a03f5110f7cafa534be3</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_md5.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__md5_8c</filename>
+ <includes id="tsk__md5_8h" name="tsk_md5.h" local="yes" imported="no">tsk_md5.h</includes>
+ <includes id="tsk__string_8h" name="tsk_string.h" local="yes" imported="no">tsk_string.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_byteReverse</name>
+ <anchorfile>group__tsk__md5__group.html</anchorfile>
+ <anchor>ga518ec0e3e377b3da67ae8019fc1e6a0c</anchor>
+ <arglist>(buf, words)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>F1</name>
+ <anchorfile>tsk__md5_8c.html</anchorfile>
+ <anchor>a3c2b6b2959faadfcf644757cb570b734</anchor>
+ <arglist>(x, y, z)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>F2</name>
+ <anchorfile>tsk__md5_8c.html</anchorfile>
+ <anchor>ae131b09a86bdafd00f48095647e80a00</anchor>
+ <arglist>(x, y, z)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>F3</name>
+ <anchorfile>tsk__md5_8c.html</anchorfile>
+ <anchor>a8f6625b749e5fe36981ee2d149229b98</anchor>
+ <arglist>(x, y, z)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>F4</name>
+ <anchorfile>tsk__md5_8c.html</anchorfile>
+ <anchor>a61cdb7eca418cc9b37e33601c1b08868</anchor>
+ <arglist>(x, y, z)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>MD5STEP</name>
+ <anchorfile>tsk__md5_8c.html</anchorfile>
+ <anchor>ac73d2be8c5c464c7566f290300d2d756</anchor>
+ <arglist>(f, w, x, y, z, in, s)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_md5init</name>
+ <anchorfile>group__tsk__md5__group.html</anchorfile>
+ <anchor>ga42503ae8b9fb7b62153cc88307b2c750</anchor>
+ <arglist>(tsk_md5context_t *ctx)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_md5update</name>
+ <anchorfile>group__tsk__md5__group.html</anchorfile>
+ <anchor>gae36ae9627c1eb5760415ab6e8d6f8566</anchor>
+ <arglist>(tsk_md5context_t *ctx, uint8_t const *buf, tsk_size_t len)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_md5final</name>
+ <anchorfile>group__tsk__md5__group.html</anchorfile>
+ <anchor>ga3fa4d0613f3c999a65e5d4d016b973e8</anchor>
+ <arglist>(tsk_md5digest_t digest, tsk_md5context_t *ctx)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_md5transform</name>
+ <anchorfile>group__tsk__md5__group.html</anchorfile>
+ <anchor>ga1eb60a1ed35b2d103881d60c3fcc0f81</anchor>
+ <arglist>(uint32_t buf[4], uint32_t const in[TSK_MD5_DIGEST_SIZE])</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_md5compute</name>
+ <anchorfile>group__tsk__md5__group.html</anchorfile>
+ <anchor>ga7c088380455e3aba0413be8e312fff06</anchor>
+ <arglist>(const char *input, tsk_size_t size, tsk_md5string_t *result)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_md5.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__md5_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <class kind="struct">tsk_md5context_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_MD5_DIGEST_SIZE</name>
+ <anchorfile>tsk__md5_8h.html</anchorfile>
+ <anchor>a302032c8a72152cf1e7c02ab7acea9aa</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_MD5_BLOCK_SIZE</name>
+ <anchorfile>group__tsk__md5__group.html</anchorfile>
+ <anchor>gab5a94ba495c9b2bcc491dd588bbbbaa1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_MD5_EMPTY</name>
+ <anchorfile>group__tsk__md5__group.html</anchorfile>
+ <anchor>ga4a697e556ebf215706dfe290d79cc42e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_MD5_STRING_SIZE</name>
+ <anchorfile>group__tsk__md5__group.html</anchorfile>
+ <anchor>ga5db19878f020d26450704a9b47740f97</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_MD5_DIGEST_CALC</name>
+ <anchorfile>tsk__md5_8h.html</anchorfile>
+ <anchor>ab1a42b0ced2e43d7aad9ec67eabe0378</anchor>
+ <arglist>(input, input_size, digest)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>char</type>
+ <name>tsk_md5string_t</name>
+ <anchorfile>tsk__md5_8h.html</anchorfile>
+ <anchor>a7872a980c4ef62f972a282a16f725d5e</anchor>
+ <arglist>[TSK_MD5_STRING_SIZE+1]</arglist>
+ </member>
+ <member kind="typedef">
+ <type>uint8_t</type>
+ <name>tsk_md5digest_t</name>
+ <anchorfile>tsk__md5_8h.html</anchorfile>
+ <anchor>aedf252ab5f53e542f2e672f6919c4fe6</anchor>
+ <arglist>[TSK_MD5_DIGEST_SIZE]</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_md5context_s</type>
+ <name>tsk_md5context_t</name>
+ <anchorfile>tsk__md5_8h.html</anchorfile>
+ <anchor>aec77fdece19cc99a493c65cff327e12e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_md5init</name>
+ <anchorfile>group__tsk__md5__group.html</anchorfile>
+ <anchor>ga42503ae8b9fb7b62153cc88307b2c750</anchor>
+ <arglist>(tsk_md5context_t *context)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_md5update</name>
+ <anchorfile>group__tsk__md5__group.html</anchorfile>
+ <anchor>gae36ae9627c1eb5760415ab6e8d6f8566</anchor>
+ <arglist>(tsk_md5context_t *context, uint8_t const *buf, tsk_size_t len)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_md5final</name>
+ <anchorfile>group__tsk__md5__group.html</anchorfile>
+ <anchor>ga3fa4d0613f3c999a65e5d4d016b973e8</anchor>
+ <arglist>(tsk_md5digest_t digest, tsk_md5context_t *context)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_md5transform</name>
+ <anchorfile>group__tsk__md5__group.html</anchorfile>
+ <anchor>ga1eb60a1ed35b2d103881d60c3fcc0f81</anchor>
+ <arglist>(uint32_t buf[4], uint32_t const in[TSK_MD5_DIGEST_SIZE])</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_md5compute</name>
+ <anchorfile>group__tsk__md5__group.html</anchorfile>
+ <anchor>ga7c088380455e3aba0413be8e312fff06</anchor>
+ <arglist>(const char *input, tsk_size_t size, tsk_md5string_t *result)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_memory.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__memory_8c</filename>
+ <includes id="tsk__memory_8h" name="tsk_memory.h" local="yes" imported="no">tsk_memory.h</includes>
+ <includes id="tsk__debug_8h" name="tsk_debug.h" local="yes" imported="no">tsk_debug.h</includes>
+ <member kind="function">
+ <type>void *</type>
+ <name>tsk_malloc</name>
+ <anchorfile>group__tsk__memory__group.html</anchorfile>
+ <anchor>gadf67b3acd9d721b603821aa9a0c8fb56</anchor>
+ <arglist>(tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>void *</type>
+ <name>tsk_realloc</name>
+ <anchorfile>group__tsk__memory__group.html</anchorfile>
+ <anchor>gaac69627d2bbf3aeef0e0aafb6371bf82</anchor>
+ <arglist>(void *ptr, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_free</name>
+ <anchorfile>group__tsk__memory__group.html</anchorfile>
+ <anchor>ga68503d6c940fa6739cc56f3bb8894301</anchor>
+ <arglist>(void **ptr)</arglist>
+ </member>
+ <member kind="function">
+ <type>void *</type>
+ <name>tsk_calloc</name>
+ <anchorfile>group__tsk__memory__group.html</anchorfile>
+ <anchor>gaf4d8432e44e4c13cd1f82243e0b156b3</anchor>
+ <arglist>(tsk_size_t num, tsk_size_t size)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_memory.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__memory_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_SAFE_FREE</name>
+ <anchorfile>group__tsk__memory__group.html</anchorfile>
+ <anchor>gafa021802335b70c6358abe3cb0c2fba4</anchor>
+ <arglist>(ptr)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_FREE</name>
+ <anchorfile>group__tsk__memory__group.html</anchorfile>
+ <anchor>ga32ce64ddec3db2fa200fd91c8dec5016</anchor>
+ <arglist>(ptr)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void *</type>
+ <name>tsk_malloc</name>
+ <anchorfile>group__tsk__memory__group.html</anchorfile>
+ <anchor>gadf67b3acd9d721b603821aa9a0c8fb56</anchor>
+ <arglist>(tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void *</type>
+ <name>tsk_realloc</name>
+ <anchorfile>group__tsk__memory__group.html</anchorfile>
+ <anchor>gaac69627d2bbf3aeef0e0aafb6371bf82</anchor>
+ <arglist>(void *ptr, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_free</name>
+ <anchorfile>group__tsk__memory__group.html</anchorfile>
+ <anchor>ga68503d6c940fa6739cc56f3bb8894301</anchor>
+ <arglist>(void **ptr)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void *</type>
+ <name>tsk_calloc</name>
+ <anchorfile>group__tsk__memory__group.html</anchorfile>
+ <anchor>gaf4d8432e44e4c13cd1f82243e0b156b3</anchor>
+ <arglist>(tsk_size_t num, tsk_size_t size)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_mutex.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__mutex_8c</filename>
+ <includes id="tsk__mutex_8h" name="tsk_mutex.h" local="yes" imported="no">tsk_mutex.h</includes>
+ <includes id="tsk__memory_8h" name="tsk_memory.h" local="yes" imported="no">tsk_memory.h</includes>
+ <includes id="tsk__debug_8h" name="tsk_debug.h" local="yes" imported="no">tsk_debug.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>MUTEX_S</name>
+ <anchorfile>tsk__mutex_8c.html</anchorfile>
+ <anchor>a6495ff55339fe11d5aa30adade2ab1ed</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_ERROR_NOT_OWNER</name>
+ <anchorfile>tsk__mutex_8c.html</anchorfile>
+ <anchor>aebac307067fdb317f04b12ccea64c5cd</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>MUTEX_S *</type>
+ <name>MUTEX_T</name>
+ <anchorfile>tsk__mutex_8c.html</anchorfile>
+ <anchor>aacf6b9dcf963c3e09a64dce5f7f6502d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_mutex_handle_t *</type>
+ <name>tsk_mutex_create</name>
+ <anchorfile>group__tsk__mutex__group.html</anchorfile>
+ <anchor>gaaf964e56762d736c25b75d1ac99b864b</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_mutex_lock</name>
+ <anchorfile>group__tsk__mutex__group.html</anchorfile>
+ <anchor>ga8a5e359d06ff188986175690b39a0150</anchor>
+ <arglist>(tsk_mutex_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_mutex_unlock</name>
+ <anchorfile>group__tsk__mutex__group.html</anchorfile>
+ <anchor>ga94e3cda29378307cbd370ab9c49dd584</anchor>
+ <arglist>(tsk_mutex_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_mutex_destroy</name>
+ <anchorfile>group__tsk__mutex__group.html</anchorfile>
+ <anchor>gad113bb5fdcaef72e3fcbe0537cbe2788</anchor>
+ <arglist>(tsk_mutex_handle_t **handle)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_mutex.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__mutex_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <member kind="function">
+ <type>TINYSAK_API tsk_mutex_handle_t *</type>
+ <name>tsk_mutex_create</name>
+ <anchorfile>group__tsk__mutex__group.html</anchorfile>
+ <anchor>gaaf964e56762d736c25b75d1ac99b864b</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_mutex_lock</name>
+ <anchorfile>group__tsk__mutex__group.html</anchorfile>
+ <anchor>ga8a5e359d06ff188986175690b39a0150</anchor>
+ <arglist>(tsk_mutex_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_mutex_unlock</name>
+ <anchorfile>group__tsk__mutex__group.html</anchorfile>
+ <anchor>ga94e3cda29378307cbd370ab9c49dd584</anchor>
+ <arglist>(tsk_mutex_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_mutex_destroy</name>
+ <anchorfile>group__tsk__mutex__group.html</anchorfile>
+ <anchor>gad113bb5fdcaef72e3fcbe0537cbe2788</anchor>
+ <arglist>(tsk_mutex_handle_t **handle)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TSK_BEGIN_DECLS typedef void</type>
+ <name>tsk_mutex_handle_t</name>
+ <anchorfile>group__tsk__mutex__group.html</anchorfile>
+ <anchor>ga2c8f7cbe4027fb08a072376d92834995</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_object.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__object_8c</filename>
+ <includes id="tsk__object_8h" name="tsk_object.h" local="yes" imported="no">tsk_object.h</includes>
+ <includes id="tsk__memory_8h" name="tsk_memory.h" local="yes" imported="no">tsk_memory.h</includes>
+ <includes id="tsk__debug_8h" name="tsk_debug.h" local="yes" imported="no">tsk_debug.h</includes>
+ <includes id="tsk__common_8h" name="tsk_common.h" local="yes" imported="no">tsk_common.h</includes>
+ <class kind="struct">tsk_object_header_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_DEBUG_OBJECTS</name>
+ <anchorfile>tsk__object_8c.html</anchorfile>
+ <anchor>a6cda304ddd5bb2526db60c74a98ba28c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_OBJECT_HEADER</name>
+ <anchorfile>tsk__object_8c.html</anchorfile>
+ <anchor>a58c9c81151b88e275c7de73df458e7a6</anchor>
+ <arglist>(object)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_object_header_s</type>
+ <name>tsk_object_header_t</name>
+ <anchorfile>tsk__object_8c.html</anchorfile>
+ <anchor>a6f01617111fbf74cccfb24618b9cc2af</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_object_t *</type>
+ <name>tsk_object_new</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>gaa3ee920a46dea8ba02932aa8e6a6060e</anchor>
+ <arglist>(const tsk_object_def_t *objdef,...)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_object_t *</type>
+ <name>tsk_object_new_2</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>ga63893a9927979180dfc7621492f334c4</anchor>
+ <arglist>(const tsk_object_def_t *objdef, va_list *ap)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_size_t</type>
+ <name>tsk_object_sizeof</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>ga65133674abc90858ffbc13c40ec33745</anchor>
+ <arglist>(const tsk_object_t *self)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_object_cmp</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>gacf253f86208fb586b8d86f0e9bb3c549</anchor>
+ <arglist>(const tsk_object_t *object1, const tsk_object_t *object2)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_object_t *</type>
+ <name>tsk_object_ref</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>gaaea32a7f461d6f2fd1e0e5a19bbb986f</anchor>
+ <arglist>(tsk_object_t *self)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_object_t *</type>
+ <name>tsk_object_unref</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>ga32ef69f32a1dd6bc0d0be0e164ea2843</anchor>
+ <arglist>(tsk_object_t *self)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_object_delete</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>ga4f4eb990f3cf2f579f439870e8fec35d</anchor>
+ <arglist>(tsk_object_t *self)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_object.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__object_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <class kind="struct">tsk_object_def_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_OBJECT_SAFE_FREE</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>ga56da14173987325ef8b0c75fec002664</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>ga2b288558d49ee137b399e49cd5aa552e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_OBJECT_DEF</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>ga2e8cef948dd1000968ae4df6cc7d7e69</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_object_def_s</type>
+ <name>tsk_object_def_t</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>ga28480098d7f6bdcc8c9361286959229e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_object_t *</type>
+ <name>tsk_object_new</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>gaa3ee920a46dea8ba02932aa8e6a6060e</anchor>
+ <arglist>(const tsk_object_def_t *objdef,...)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_object_t *</type>
+ <name>tsk_object_new_2</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>ga63893a9927979180dfc7621492f334c4</anchor>
+ <arglist>(const tsk_object_def_t *objdef, va_list *ap)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_size_t</type>
+ <name>tsk_object_sizeof</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>ga65133674abc90858ffbc13c40ec33745</anchor>
+ <arglist>(const tsk_object_t *)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_object_cmp</name>
+ <anchorfile>tsk__object_8h.html</anchorfile>
+ <anchor>a8e0d191d361623dc0312d1e1ba82e540</anchor>
+ <arglist>(const void *self, const tsk_object_t *object)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_object_t *</type>
+ <name>tsk_object_ref</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>gaaea32a7f461d6f2fd1e0e5a19bbb986f</anchor>
+ <arglist>(tsk_object_t *self)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_object_t *</type>
+ <name>tsk_object_unref</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>ga32ef69f32a1dd6bc0d0be0e164ea2843</anchor>
+ <arglist>(tsk_object_t *self)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_object_delete</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>ga4f4eb990f3cf2f579f439870e8fec35d</anchor>
+ <arglist>(tsk_object_t *self)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TSK_BEGIN_DECLS typedef void</type>
+ <name>tsk_object_t</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>ga854eac17e0c0bdfa29862f294d22f7fb</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_options.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__options_8c</filename>
+ <includes id="tsk__options_8h" name="tsk_options.h" local="yes" imported="no">tsk_options.h</includes>
+ <includes id="tsk__memory_8h" name="tsk_memory.h" local="yes" imported="no">tsk_memory.h</includes>
+ <includes id="tsk__string_8h" name="tsk_string.h" local="yes" imported="no">tsk_string.h</includes>
+ <includes id="tsk__common_8h" name="tsk_common.h" local="yes" imported="no">tsk_common.h</includes>
+ <member kind="function">
+ <type>tsk_option_t *</type>
+ <name>tsk_option_create</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>ga15c3f065d1b4ed0894d653460ed7aee8</anchor>
+ <arglist>(int id, const char *value)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_option_t *</type>
+ <name>tsk_option_create_null</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>ga539381ba69534803eec268721f71d734</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tsk_options_have_option</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>ga95cd90fc62a7c94242ef3565e3d29c12</anchor>
+ <arglist>(const tsk_options_L_t *self, int id)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_options_add_option</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>gaf4a7e2b50370d3bacbfb02d6208bde48</anchor>
+ <arglist>(tsk_options_L_t **self, int id, const char *value)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_options_add_option_2</name>
+ <anchorfile>tsk__options_8c.html</anchorfile>
+ <anchor>a31a9228a18e61061490c6ab9983ac908</anchor>
+ <arglist>(tsk_options_L_t **self, const tsk_option_t *option)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_options_remove_option</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>ga22d21df71d29386129297cf1c1763edb</anchor>
+ <arglist>(tsk_options_L_t *self, int id)</arglist>
+ </member>
+ <member kind="function">
+ <type>const tsk_option_t *</type>
+ <name>tsk_options_get_option_by_id</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>gae91a373b327a62b3a8cc13682d6175c4</anchor>
+ <arglist>(const tsk_options_L_t *self, int id)</arglist>
+ </member>
+ <member kind="function">
+ <type>const char *</type>
+ <name>tsk_options_get_option_value</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>gaf4a3aa09b3c9e20cfad18639ef3b24b6</anchor>
+ <arglist>(const tsk_options_L_t *self, int id)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_options_get_option_value_as_int</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>ga36f6819e19e19ffe6fe0ce8fe639673c</anchor>
+ <arglist>(const tsk_options_L_t *self, int id)</arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tsk_option_def_t</name>
+ <anchorfile>tsk__options_8c.html</anchorfile>
+ <anchor>a35fd4e22079c851cb0936df89eef7f8d</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_options.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__options_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <includes id="tsk__object_8h" name="tsk_object.h" local="yes" imported="no">tsk_object.h</includes>
+ <includes id="tsk__list_8h" name="tsk_list.h" local="yes" imported="no">tsk_list.h</includes>
+ <includes id="tsk__buffer_8h" name="tsk_buffer.h" local="yes" imported="no">tsk_buffer.h</includes>
+ <class kind="struct">tsk_option_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_OPTION_VA_ARGS</name>
+ <anchorfile>tsk__options_8h.html</anchorfile>
+ <anchor>adce46a405232a01fa92e26742a4e5781</anchor>
+ <arglist>(id, value)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_OPTION</name>
+ <anchorfile>tsk__options_8h.html</anchorfile>
+ <anchor>a1a3ad89c5ce792a31e9310140eb74f06</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_option_s</type>
+ <name>tsk_option_t</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>gaf060ef8c6afe37ae8c10b9814e005e21</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>tsk_list_t</type>
+ <name>tsk_options_L_t</name>
+ <anchorfile>tsk__options_8h.html</anchorfile>
+ <anchor>a1f619fbe43ff506f357e4518c063b2b6</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_option_t *</type>
+ <name>tsk_option_create</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>ga15c3f065d1b4ed0894d653460ed7aee8</anchor>
+ <arglist>(int id, const char *value)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_option_t *</type>
+ <name>tsk_option_create_null</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>ga539381ba69534803eec268721f71d734</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_options_have_option</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>ga95cd90fc62a7c94242ef3565e3d29c12</anchor>
+ <arglist>(const tsk_options_L_t *self, int id)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_options_add_option</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>gaf4a7e2b50370d3bacbfb02d6208bde48</anchor>
+ <arglist>(tsk_options_L_t **self, int id, const char *value)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_options_add_option_2</name>
+ <anchorfile>tsk__options_8h.html</anchorfile>
+ <anchor>a7f8e7bc2e6630c1745954c5047381465</anchor>
+ <arglist>(tsk_options_L_t **self, const tsk_option_t *option)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_options_remove_option</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>ga22d21df71d29386129297cf1c1763edb</anchor>
+ <arglist>(tsk_options_L_t *self, int id)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API const tsk_option_t *</type>
+ <name>tsk_options_get_option_by_id</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>gae91a373b327a62b3a8cc13682d6175c4</anchor>
+ <arglist>(const tsk_options_L_t *self, int id)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API const char *</type>
+ <name>tsk_options_get_option_value</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>gaf4a3aa09b3c9e20cfad18639ef3b24b6</anchor>
+ <arglist>(const tsk_options_L_t *self, int id)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_options_get_option_value_as_int</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>ga36f6819e19e19ffe6fe0ce8fe639673c</anchor>
+ <arglist>(const tsk_options_L_t *self, int id)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSAK_GEXTERN const tsk_object_def_t *</type>
+ <name>tsk_option_def_t</name>
+ <anchorfile>tsk__options_8h.html</anchorfile>
+ <anchor>af61fed0795f478465c5b77ae6637f18b</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_params.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__params_8c</filename>
+ <includes id="tsk__params_8h" name="tsk_params.h" local="yes" imported="no">tsk_params.h</includes>
+ <includes id="tsk__memory_8h" name="tsk_memory.h" local="yes" imported="no">tsk_memory.h</includes>
+ <includes id="tsk__string_8h" name="tsk_string.h" local="yes" imported="no">tsk_string.h</includes>
+ <includes id="tsk__common_8h" name="tsk_common.h" local="yes" imported="no">tsk_common.h</includes>
+ <includes id="tsk__debug_8h" name="tsk_debug.h" local="yes" imported="no">tsk_debug.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>PUSH_PARAM</name>
+ <anchorfile>tsk__params_8c.html</anchorfile>
+ <anchor>aa7ff6012ff4d41b1c267bb7c0fa73ba8</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_param_t *</type>
+ <name>tsk_param_create</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>ga3ce4ef8ec0a30ad5a08d0222ce795a50</anchor>
+ <arglist>(const char *name, const char *value)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_param_t *</type>
+ <name>tsk_param_create_null</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>gac6b69a0d9a82cf63db111614455f4bfa</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_param_t *</type>
+ <name>tsk_params_parse_param</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>gaa8a439408d71b4337898c37ea3d71592</anchor>
+ <arglist>(const char *line, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tsk_params_have_param</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>ga31cbb886619c8d00c1805a5feaed8ce6</anchor>
+ <arglist>(const tsk_params_L_t *self, const char *name)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_params_add_param</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>ga42acaefd481f3af60bd7029b968630d2</anchor>
+ <arglist>(tsk_params_L_t **self, const char *name, const char *value)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_params_add_param_2</name>
+ <anchorfile>tsk__params_8c.html</anchorfile>
+ <anchor>a3f82a14a8cb75bc1251d7d537875cfae</anchor>
+ <arglist>(tsk_params_L_t **self, const tsk_param_t *param)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_params_remove_param</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>gab0f4f4d272eec7eb8a4cd10027eea260</anchor>
+ <arglist>(tsk_params_L_t *self, const char *name)</arglist>
+ </member>
+ <member kind="function">
+ <type>const tsk_param_t *</type>
+ <name>tsk_params_get_param_by_name</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>gabb53a986f29f1de5a400ae448153d09f</anchor>
+ <arglist>(const tsk_params_L_t *self, const char *name)</arglist>
+ </member>
+ <member kind="function">
+ <type>const char *</type>
+ <name>tsk_params_get_param_value</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>gaa9d1485289ab4f56eb659ba4d2978d2e</anchor>
+ <arglist>(const tsk_params_L_t *self, const char *name)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_params_get_param_value_as_int</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>ga0c24b5d4f9d070109a8ac2ed20233158</anchor>
+ <arglist>(const tsk_params_L_t *self, const char *name)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_params_param_tostring</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>ga0af26eb3c22e24fa0afdf8328633ab05</anchor>
+ <arglist>(const tsk_param_t *param, tsk_buffer_t *output)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_params_tostring</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>ga724a941858f72384e0163be39c550595</anchor>
+ <arglist>(const tsk_params_L_t *self, const char separator, tsk_buffer_t *output)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_params_L_t *</type>
+ <name>tsk_params_fromstring</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>ga90890f00599201b2bd599f3e4d406746</anchor>
+ <arglist>(const char *string, const char *separator, tsk_bool_t trim)</arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tsk_param_def_t</name>
+ <anchorfile>tsk__params_8c.html</anchorfile>
+ <anchor>a4e9fd59fdcd636516a3d55e470b7e6bb</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_params.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__params_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <includes id="tsk__object_8h" name="tsk_object.h" local="yes" imported="no">tsk_object.h</includes>
+ <includes id="tsk__list_8h" name="tsk_list.h" local="yes" imported="no">tsk_list.h</includes>
+ <includes id="tsk__buffer_8h" name="tsk_buffer.h" local="yes" imported="no">tsk_buffer.h</includes>
+ <class kind="struct">tsk_param_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PARAM_VA_ARGS</name>
+ <anchorfile>tsk__params_8h.html</anchorfile>
+ <anchor>a82d8ee4b4d65e09902bd7182232c9b56</anchor>
+ <arglist>(name, value)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PARAM</name>
+ <anchorfile>tsk__params_8h.html</anchorfile>
+ <anchor>a646bb88b397a6de55b4daa74b432b1eb</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_param_s</type>
+ <name>tsk_param_t</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>gaeb6673242bb3fe02f0ed95c99738712a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>tsk_list_t</type>
+ <name>tsk_params_L_t</name>
+ <anchorfile>tsk__params_8h.html</anchorfile>
+ <anchor>a3fabe285dce65c301b8065c197cead83</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_param_t *</type>
+ <name>tsk_param_create</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>ga3ce4ef8ec0a30ad5a08d0222ce795a50</anchor>
+ <arglist>(const char *name, const char *value)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_param_t *</type>
+ <name>tsk_param_create_null</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>gac6b69a0d9a82cf63db111614455f4bfa</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_param_t *</type>
+ <name>tsk_params_parse_param</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>gaa8a439408d71b4337898c37ea3d71592</anchor>
+ <arglist>(const char *line, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_bool_t</type>
+ <name>tsk_params_have_param</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>ga31cbb886619c8d00c1805a5feaed8ce6</anchor>
+ <arglist>(const tsk_params_L_t *self, const char *name)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_params_add_param</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>ga42acaefd481f3af60bd7029b968630d2</anchor>
+ <arglist>(tsk_params_L_t **self, const char *name, const char *value)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_params_add_param_2</name>
+ <anchorfile>tsk__params_8h.html</anchorfile>
+ <anchor>a35a9c7e7e43a4d393705b5c199e27757</anchor>
+ <arglist>(tsk_params_L_t **self, const tsk_param_t *param)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_params_remove_param</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>gab0f4f4d272eec7eb8a4cd10027eea260</anchor>
+ <arglist>(tsk_params_L_t *self, const char *name)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API const tsk_param_t *</type>
+ <name>tsk_params_get_param_by_name</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>gabb53a986f29f1de5a400ae448153d09f</anchor>
+ <arglist>(const tsk_params_L_t *self, const char *name)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API const char *</type>
+ <name>tsk_params_get_param_value</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>gaa9d1485289ab4f56eb659ba4d2978d2e</anchor>
+ <arglist>(const tsk_params_L_t *self, const char *name)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_params_get_param_value_as_int</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>ga0c24b5d4f9d070109a8ac2ed20233158</anchor>
+ <arglist>(const tsk_params_L_t *self, const char *name)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_params_param_tostring</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>ga0af26eb3c22e24fa0afdf8328633ab05</anchor>
+ <arglist>(const tsk_param_t *param, tsk_buffer_t *output)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_params_tostring</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>ga724a941858f72384e0163be39c550595</anchor>
+ <arglist>(const tsk_params_L_t *self, const char separator, tsk_buffer_t *output)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_params_L_t *</type>
+ <name>tsk_params_fromstring</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>ga90890f00599201b2bd599f3e4d406746</anchor>
+ <arglist>(const char *string, const char *separator, tsk_bool_t trim)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSAK_GEXTERN const tsk_object_def_t *</type>
+ <name>tsk_param_def_t</name>
+ <anchorfile>tsk__params_8h.html</anchorfile>
+ <anchor>a28ab451d4c278e33139d2468eef56071</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_ppfcs16.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__ppfcs16_8c</filename>
+ <includes id="tsk__ppfcs16_8h" name="tsk_ppfcs16.h" local="yes" imported="no">tsk_ppfcs16.h</includes>
+ <member kind="function">
+ <type>uint16_t</type>
+ <name>tsk_pppfcs16</name>
+ <anchorfile>group__tsk__ppfcs16__group.html</anchorfile>
+ <anchor>ga6aeb4f3b70bd66f68d2d1a9fbebc7582</anchor>
+ <arglist>(register uint16_t fcs, register const uint8_t *cp, register int32_t len)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_ppfcs16.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__ppfcs16_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PPPINITFCS16</name>
+ <anchorfile>tsk__ppfcs16_8h.html</anchorfile>
+ <anchor>af22b9ac38a9aac0cb7cfddc59792ad59</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PPPGOODFCS16</name>
+ <anchorfile>tsk__ppfcs16_8h.html</anchorfile>
+ <anchor>a334e56a2986ff6c9d6a7d42638950ed3</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API uint16_t</type>
+ <name>tsk_pppfcs16</name>
+ <anchorfile>group__tsk__ppfcs16__group.html</anchorfile>
+ <anchor>ga6aeb4f3b70bd66f68d2d1a9fbebc7582</anchor>
+ <arglist>(register uint16_t fcs, register const uint8_t *cp, register int32_t len)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_ppfcs32.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__ppfcs32_8c</filename>
+ <includes id="tsk__ppfcs32_8h" name="tsk_ppfcs32.h" local="yes" imported="no">tsk_ppfcs32.h</includes>
+ <member kind="function">
+ <type>uint32_t</type>
+ <name>tsk_pppfcs32</name>
+ <anchorfile>group__tsk__ppfcs32__group.html</anchorfile>
+ <anchor>gafd4873e357e96a4455e50b6e55d6d54f</anchor>
+ <arglist>(register uint32_t fcs, register const uint8_t *cp, register int32_t len)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_ppfcs32.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__ppfcs32_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PPPINITFCS32</name>
+ <anchorfile>tsk__ppfcs32_8h.html</anchorfile>
+ <anchor>ae5ac69ad9a4b02520729d9677b94a5b2</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PPPGOODFCS32</name>
+ <anchorfile>tsk__ppfcs32_8h.html</anchorfile>
+ <anchor>aea5b54c61ba31efa9375c3662c31c6b5</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API uint32_t</type>
+ <name>tsk_pppfcs32</name>
+ <anchorfile>group__tsk__ppfcs32__group.html</anchorfile>
+ <anchor>gafd4873e357e96a4455e50b6e55d6d54f</anchor>
+ <arglist>(register uint32_t fcs, register const uint8_t *cp, register int32_t len)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_ragel_state.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__ragel__state_8c</filename>
+ <includes id="tsk__ragel__state_8h" name="tsk_ragel_state.h" local="yes" imported="no">tsk_ragel_state.h</includes>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_ragel_state_init</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>ga5501b9417f264a8ec197008f084220fb</anchor>
+ <arglist>(tsk_ragel_state_t *state, const char *data, tsk_size_t size)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_ragel_state.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__ragel__state_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <includes id="tsk__params_8h" name="tsk_params.h" local="yes" imported="no">tsk_params.h</includes>
+ <class kind="struct">tsk_ragel_state_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>atoi64</name>
+ <anchorfile>tsk__ragel__state_8h.html</anchorfile>
+ <anchor>aac4a32a829d1bbbd1f003136c143bbbc</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_SCANNER_SET_STRING</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>gab3bad9dd91bf57945d6991881207439b</anchor>
+ <arglist>(string)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PARSER_SET_STRING</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>ga98d459a2c3160b37c175ddb8c1638978</anchor>
+ <arglist>(string)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_SCANNER_SET_INTEGER</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>ga56277e20af043a63529ee517df073888</anchor>
+ <arglist>(integer)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PARSER_SET_INTEGER_EX</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>gae2d97ed7f19e0423888b629d488f01a3</anchor>
+ <arglist>(retval, type, func)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PARSER_SET_INTEGER</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>ga7935f1a48958154d5d872e39ddcdabcc</anchor>
+ <arglist>(retval)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PARSER_SET_INT</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>ga1ed59e238f59ab1f9313e77d6c408df5</anchor>
+ <arglist>(retval)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PARSER_SET_UINT</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>ga3c9a1b51b38ff79992d2592bee6c8a13</anchor>
+ <arglist>(retval)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PARSER_SET_FLOAT</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>ga942dc4c86698c2608553b5e38b817f01</anchor>
+ <arglist>(retval)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PARSER_SET_DOUBLE</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>ga97293ec81862088730764f3224b21783</anchor>
+ <arglist>(retval)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PARSER_ADD_PARAM</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>ga4c8e3289fce1e4da7f252d9a5febbd51</anchor>
+ <arglist>(dest)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_SACANNER_ADD_PARAM</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>ga24044072008fc824d550e2d1f8c93981</anchor>
+ <arglist>(dest)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PARSER_ADD_STRING</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>ga79bf67f1cf887e50eac9a6c4856bf0eb</anchor>
+ <arglist>(dest)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_ragel_state_s</type>
+ <name>tsk_ragel_state_t</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>gae45218c3eba34c2555e17a117d5cb003</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_ragel_state_init</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>ga5501b9417f264a8ec197008f084220fb</anchor>
+ <arglist>(tsk_ragel_state_t *state, const char *data, tsk_size_t size)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_runnable.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__runnable_8c</filename>
+ <includes id="tsk__runnable_8h" name="tsk_runnable.h" local="yes" imported="no">tsk_runnable.h</includes>
+ <includes id="tsk__thread_8h" name="tsk_thread.h" local="yes" imported="no">tsk_thread.h</includes>
+ <includes id="tsk__debug_8h" name="tsk_debug.h" local="yes" imported="no">tsk_debug.h</includes>
+ <member kind="function">
+ <type>tsk_runnable_t *</type>
+ <name>tsk_runnable_create</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga5794a5eaeb3523f697cb7c390a81bc0c</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_runnable_start</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga42877c534be2c2898f3fb82529daa5c4</anchor>
+ <arglist>(tsk_runnable_t *self, const tsk_object_def_t *objdef)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_runnable_set_important</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga90e0d8e4a0de86dc183c9124716afd57</anchor>
+ <arglist>(tsk_runnable_t *self, tsk_bool_t important)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_runnable_stop</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga5b9173b4e6b22204f55f97645acd71e6</anchor>
+ <arglist>(tsk_runnable_t *self)</arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tsk_runnable_def_t</name>
+ <anchorfile>tsk__runnable_8c.html</anchorfile>
+ <anchor>a5b8aa3dde5e24e838a6d0769178203db</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_runnable.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__runnable_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <includes id="tsk__object_8h" name="tsk_object.h" local="yes" imported="no">tsk_object.h</includes>
+ <includes id="tsk__semaphore_8h" name="tsk_semaphore.h" local="yes" imported="no">tsk_semaphore.h</includes>
+ <includes id="tsk__list_8h" name="tsk_list.h" local="yes" imported="no">tsk_list.h</includes>
+ <class kind="struct">tsk_runnable_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_RUNNABLE</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>gac2bef0f74acd9c86f5ab7c4b35801ee4</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_RUNNABLE_RUN_BEGIN</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga626da5c40a90003d1c72d7304bbac5d2</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_RUNNABLE_RUN_END</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga8f92a104a11fdfcd3c701511313a49e8</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_RUNNABLE_ENQUEUE</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga14e034bba99a99ce9076ea5d0660006f</anchor>
+ <arglist>(self,...)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_RUNNABLE_ENQUEUE_OBJECT</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga913f766dbedd4cb2c6509811ef9624b7</anchor>
+ <arglist>(self, object)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_RUNNABLE_POP_FIRST</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>gab0b5f62ddca1b5ae24f37eadcf817298</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_DECLARE_RUNNABLE</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga814229d43b826a259deef2eefa2e0859</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_runnable_s</type>
+ <name>tsk_runnable_t</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga54eb0f526d3315c9e1da776deeb904a8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_runnable_t *</type>
+ <name>tsk_runnable_create</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga5794a5eaeb3523f697cb7c390a81bc0c</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_runnable_start</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga42877c534be2c2898f3fb82529daa5c4</anchor>
+ <arglist>(tsk_runnable_t *self, const tsk_object_def_t *objdef)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_runnable_set_important</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga90e0d8e4a0de86dc183c9124716afd57</anchor>
+ <arglist>(tsk_runnable_t *self, tsk_bool_t important)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_runnable_enqueue</name>
+ <anchorfile>tsk__runnable_8h.html</anchorfile>
+ <anchor>a36978d84f61d2a32772b409a36ac6e85</anchor>
+ <arglist>(tsk_runnable_t *self,...)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_runnable_stop</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga5b9173b4e6b22204f55f97645acd71e6</anchor>
+ <arglist>(tsk_runnable_t *self)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TSK_BEGIN_DECLS typedef void *(*</type>
+ <name>tsk_runnable_func_run</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga09f91d68dcb46db4ec35fabf4763aca9</anchor>
+ <arglist>)(void *self)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSAK_GEXTERN const tsk_object_def_t *</type>
+ <name>tsk_runnable_def_t</name>
+ <anchorfile>tsk__runnable_8h.html</anchorfile>
+ <anchor>a608cb429b0ca65036efc03bc3d6766a5</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_safeobj.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__safeobj_8c</filename>
+ <includes id="tsk__safeobj_8h" name="tsk_safeobj.h" local="yes" imported="no">tsk_safeobj.h</includes>
+ </compound>
+ <compound kind="file">
+ <name>tsk_safeobj.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__safeobj_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <includes id="tsk__mutex_8h" name="tsk_mutex.h" local="yes" imported="no">tsk_mutex.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_DECLARE_SAFEOBJ</name>
+ <anchorfile>group__tsk__safeobj__group.html</anchorfile>
+ <anchor>ga5e04a13107724380914fc704debc7ba6</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_SAFEOBJ_MUTEX</name>
+ <anchorfile>tsk__safeobj_8h.html</anchorfile>
+ <anchor>a682714be79e68a3f9ed62af5b4192b29</anchor>
+ <arglist>(safeobj)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_safeobj_init</name>
+ <anchorfile>group__tsk__safeobj__group.html</anchorfile>
+ <anchor>gaf3bd528fb9f712b51238f22485b4ea99</anchor>
+ <arglist>(safeobj)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_safeobj_lock</name>
+ <anchorfile>group__tsk__safeobj__group.html</anchorfile>
+ <anchor>gaf0508810ea6d917b271b75cd97ebabae</anchor>
+ <arglist>(safeobj)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_safeobj_unlock</name>
+ <anchorfile>group__tsk__safeobj__group.html</anchorfile>
+ <anchor>ga2cebbf10ab680b2e13877a3a5bbd2c79</anchor>
+ <arglist>(safeobj)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_safeobj_deinit</name>
+ <anchorfile>group__tsk__safeobj__group.html</anchorfile>
+ <anchor>gacb9211884adce27e6a82dbf0e29668d4</anchor>
+ <arglist>(safeobj)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_semaphore.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__semaphore_8c</filename>
+ <includes id="tsk__semaphore_8h" name="tsk_semaphore.h" local="yes" imported="no">tsk_semaphore.h</includes>
+ <includes id="tsk__memory_8h" name="tsk_memory.h" local="yes" imported="no">tsk_memory.h</includes>
+ <includes id="tsk__debug_8h" name="tsk_debug.h" local="yes" imported="no">tsk_debug.h</includes>
+ <includes id="tsk__string_8h" name="tsk_string.h" local="yes" imported="no">tsk_string.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_USE_NAMED_SEM</name>
+ <anchorfile>tsk__semaphore_8c.html</anchorfile>
+ <anchor>afc4ee3c581b67ab46175e36c4fd7e8ba</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>SEMAPHORE_S</name>
+ <anchorfile>tsk__semaphore_8c.html</anchorfile>
+ <anchor>af5257c505ef20549b1e98f0d31d3b3a7</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>GET_SEM</name>
+ <anchorfile>tsk__semaphore_8c.html</anchorfile>
+ <anchor>a7ec9cbd02d20a86c9d4e36a5ce9e0fbc</anchor>
+ <arglist>(PSEM)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>sem_t *</type>
+ <name>SEMAPHORE_T</name>
+ <anchorfile>tsk__semaphore_8c.html</anchorfile>
+ <anchor>a764f64c997d11f31a8e928e858ec39a8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_semaphore_handle_t *</type>
+ <name>tsk_semaphore_create</name>
+ <anchorfile>group__tsk__semaphore__group.html</anchorfile>
+ <anchor>gac7bb53baa18a1c05e591dcd3ce65261b</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_semaphore_increment</name>
+ <anchorfile>group__tsk__semaphore__group.html</anchorfile>
+ <anchor>gad4043d10db2a71dc1fad5b8a2cc1cb01</anchor>
+ <arglist>(tsk_semaphore_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_semaphore_decrement</name>
+ <anchorfile>group__tsk__semaphore__group.html</anchorfile>
+ <anchor>gaa37790ffbc8c8bd48f973992550be608</anchor>
+ <arglist>(tsk_semaphore_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_semaphore_destroy</name>
+ <anchorfile>group__tsk__semaphore__group.html</anchorfile>
+ <anchor>ga87e5957481afc5974747cf08e3688aa9</anchor>
+ <arglist>(tsk_semaphore_handle_t **handle)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_semaphore.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__semaphore_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <member kind="function">
+ <type>TINYSAK_API tsk_semaphore_handle_t *</type>
+ <name>tsk_semaphore_create</name>
+ <anchorfile>group__tsk__semaphore__group.html</anchorfile>
+ <anchor>gac7bb53baa18a1c05e591dcd3ce65261b</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_semaphore_increment</name>
+ <anchorfile>group__tsk__semaphore__group.html</anchorfile>
+ <anchor>gad4043d10db2a71dc1fad5b8a2cc1cb01</anchor>
+ <arglist>(tsk_semaphore_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_semaphore_decrement</name>
+ <anchorfile>group__tsk__semaphore__group.html</anchorfile>
+ <anchor>gaa37790ffbc8c8bd48f973992550be608</anchor>
+ <arglist>(tsk_semaphore_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_semaphore_destroy</name>
+ <anchorfile>group__tsk__semaphore__group.html</anchorfile>
+ <anchor>ga87e5957481afc5974747cf08e3688aa9</anchor>
+ <arglist>(tsk_semaphore_handle_t **handle)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TSK_BEGIN_DECLS typedef void</type>
+ <name>tsk_semaphore_handle_t</name>
+ <anchorfile>tsk__semaphore_8h.html</anchorfile>
+ <anchor>a70fa578315cfd7a95fa18a997ba13f9a</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_sha1.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__sha1_8c</filename>
+ <includes id="tsk__sha1_8h" name="tsk_sha1.h" local="yes" imported="no">tsk_sha1.h</includes>
+ <includes id="tsk__string_8h" name="tsk_string.h" local="yes" imported="no">tsk_string.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>SHA1CircularShift</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>gac351d89c022d1b36e6e1d6b8ef5a080d</anchor>
+ <arglist>(bits, word)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>SHA1PadMessage</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ga4fb3a1a10bd34aa315a502a5f2879fe5</anchor>
+ <arglist>(tsk_sha1context_t *)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>SHA1ProcessMessageBlock</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ga806117aa3f48006f44fe6f5c5d7e5b22</anchor>
+ <arglist>(tsk_sha1context_t *)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_sha1_errcode_t</type>
+ <name>tsk_sha1reset</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ga571a885d5e57b63861936f8f8b89c26f</anchor>
+ <arglist>(tsk_sha1context_t *context)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_sha1_errcode_t</type>
+ <name>tsk_sha1result</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>gabb49e548a020477187b1edacada69287</anchor>
+ <arglist>(tsk_sha1context_t *context, tsk_sha1digest_t Message_Digest)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_sha1_errcode_t</type>
+ <name>tsk_sha1input</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>gaba598c7c2bd12c5e40a5b9f51b64e599</anchor>
+ <arglist>(tsk_sha1context_t *context, const uint8_t *message_array, unsigned length)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_sha1final</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ga354a016997a0d24bba246a5fd0174beb</anchor>
+ <arglist>(uint8_t *Message_Digest, tsk_sha1context_t *context)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_sha1_errcode_t</type>
+ <name>tsk_sha1compute</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ga28e5fc9335018d092f374abd63f5eb21</anchor>
+ <arglist>(const char *input, tsk_size_t size, tsk_sha1string_t *result)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_sha1.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__sha1_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <class kind="struct">tsk_sha1context_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_SHA1_DIGEST_SIZE</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>gadc925efe2ee6ed28ae917a927881273c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_SHA1_BLOCK_SIZE</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ga13985728d69be839b3873e829c58e885</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_SHA1_STRING_SIZE</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>gac4bd0a2dca1b7466456a46cfb7b8fd42</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_SHA1_DIGEST_CALC</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ga834074aea3007c47f8a13ebc25cb5003</anchor>
+ <arglist>(input, input_size, digest)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>TSK_BEGIN_DECLS enum tsk_sha1_errcode_e</type>
+ <name>tsk_sha1_errcode_t</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ga7e2cdbb9d5d397c1facb9e777b05037a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>char</type>
+ <name>tsk_sha1string_t</name>
+ <anchorfile>tsk__sha1_8h.html</anchorfile>
+ <anchor>a9e2378a9665ccad50ea1c609717ebe91</anchor>
+ <arglist>[TSK_SHA1_STRING_SIZE+1]</arglist>
+ </member>
+ <member kind="typedef">
+ <type>char</type>
+ <name>tsk_sha1digest_t</name>
+ <anchorfile>tsk__sha1_8h.html</anchorfile>
+ <anchor>a5f2be1a023d36a3929da8f693319c23d</anchor>
+ <arglist>[TSK_SHA1_DIGEST_SIZE]</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_sha1context_s</type>
+ <name>tsk_sha1context_t</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>gac28d8dfc7802526782492867b3a3d8cb</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="enumeration">
+ <name>tsk_sha1_errcode_e</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>gac8abdcb08ff7633e4618440c0e7d85c9</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="enumvalue">
+ <name>shaSuccess</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ggac8abdcb08ff7633e4618440c0e7d85c9a581d05c0e86b0ca3a00c6e24ea81b3fa</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="enumvalue">
+ <name>shaNull</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ggac8abdcb08ff7633e4618440c0e7d85c9ae801efd0a808fb77467a5bdf8ad5ee70</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="enumvalue">
+ <name>shaInputTooLong</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ggac8abdcb08ff7633e4618440c0e7d85c9a383493bb8927060f349e11f915cbb636</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="enumvalue">
+ <name>shaStateError</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ggac8abdcb08ff7633e4618440c0e7d85c9af95bed729cc00460585fb8d76f0c384d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_sha1_errcode_t</type>
+ <name>tsk_sha1reset</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ga571a885d5e57b63861936f8f8b89c26f</anchor>
+ <arglist>(tsk_sha1context_t *)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_sha1_errcode_t</type>
+ <name>tsk_sha1input</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>gaba598c7c2bd12c5e40a5b9f51b64e599</anchor>
+ <arglist>(tsk_sha1context_t *, const uint8_t *, unsigned length)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_sha1_errcode_t</type>
+ <name>tsk_sha1result</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>gabb49e548a020477187b1edacada69287</anchor>
+ <arglist>(tsk_sha1context_t *, tsk_sha1digest_t Message_Digest)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_sha1final</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ga354a016997a0d24bba246a5fd0174beb</anchor>
+ <arglist>(uint8_t *Message_Digest, tsk_sha1context_t *context)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_sha1_errcode_t</type>
+ <name>tsk_sha1compute</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ga28e5fc9335018d092f374abd63f5eb21</anchor>
+ <arglist>(const char *input, tsk_size_t size, tsk_sha1string_t *result)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_string.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__string_8c</filename>
+ <includes id="tsk__string_8h" name="tsk_string.h" local="yes" imported="no">tsk_string.h</includes>
+ <includes id="tsk__memory_8h" name="tsk_memory.h" local="yes" imported="no">tsk_memory.h</includes>
+ <includes id="tsk__time_8h" name="tsk_time.h" local="yes" imported="no">tsk_time.h</includes>
+ <includes id="tsk__debug_8h" name="tsk_debug.h" local="yes" imported="no">tsk_debug.h</includes>
+ <includes id="tsk__common_8h" name="tsk_common.h" local="yes" imported="no">tsk_common.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>stricmp</name>
+ <anchorfile>tsk__string_8c.html</anchorfile>
+ <anchor>a4e0be90a3757e352f42612d09a7d1aa5</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>strnicmp</name>
+ <anchorfile>tsk__string_8c.html</anchorfile>
+ <anchor>a16a19b1831112e876b010468ec15916f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_string_t *</type>
+ <name>tsk_string_create</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gacb654b2c66d38d6ce2e357283de39955</anchor>
+ <arglist>(const char *str)</arglist>
+ </member>
+ <member kind="function">
+ <type>char</type>
+ <name>tsk_b10tob16</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga7b23d5e04afdda3d08db1568561a9980</anchor>
+ <arglist>(char c)</arglist>
+ </member>
+ <member kind="function">
+ <type>char</type>
+ <name>tsk_b16tob10</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga68936738389a2f95add8714258053317</anchor>
+ <arglist>(char c)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_stricmp</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga73ba2ee5fdc7914bc770f53ab2c73ac5</anchor>
+ <arglist>(const char *str1, const char *str2)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_strnicmp</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gacecd370153236fcc0c8d15612f14d87f</anchor>
+ <arglist>(const char *str1, const char *str2, tsk_size_t n)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_strcmp</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gae2480bf4fa6f6e4f207d476467c93efb</anchor>
+ <arglist>(const char *str1, const char *str2)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_strncmp</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gacd9d33ff7ec1f6c0605c98c6f7259610</anchor>
+ <arglist>(const char *str1, const char *str2, tsk_size_t n)</arglist>
+ </member>
+ <member kind="function">
+ <type>char *</type>
+ <name>tsk_strdup</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gaddd214bef41ba50555daba97e751cebf</anchor>
+ <arglist>(const char *s1)</arglist>
+ </member>
+ <member kind="function">
+ <type>char *</type>
+ <name>tsk_strndup</name>
+ <anchorfile>tsk__string_8c.html</anchorfile>
+ <anchor>a6e1b60e4ec3e630af6e5db198d57cf02</anchor>
+ <arglist>(const char *s1, tsk_size_t n)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tsk_strcontains</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga76413189f0bb8ad77c45d790c0c9c27a</anchor>
+ <arglist>(const char *str, tsk_size_t size, const char *substring)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_strindexOf</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga1137a35a92d8c373caec60bdebf62013</anchor>
+ <arglist>(const char *str, tsk_size_t size, const char *substring)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_strLastIndexOf</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gafd2d8ae98f3829567bb06ca2dd8da628</anchor>
+ <arglist>(const char *str, tsk_size_t size, const char *substring)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strcat</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gaf5d322130a46686000f1495201900285</anchor>
+ <arglist>(char **destination, const char *source)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strcat_2</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gaa8baf82bbc92676188500efb083bf91d</anchor>
+ <arglist>(char **destination, const char *format,...)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strncat</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga9818047196872f81e3478ef297c9ba88</anchor>
+ <arglist>(char **destination, const char *source, tsk_size_t n)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_sprintf</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga511a3cffbc2ed0139e875b857168143a</anchor>
+ <arglist>(char **str, const char *format,...)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_sprintf_2</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga77e7241f6955651bf6a1758a5c7b4d45</anchor>
+ <arglist>(char **str, const char *format, va_list *ap)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strupdate</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga3eb59d8370b5e1c393023856b3967b14</anchor>
+ <arglist>(char **str, const char *newval)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strtrim_left</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga66c595dc75c3cb8667b270d676148dd4</anchor>
+ <arglist>(char **str)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strtrim_right</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gad378af9a4b98b799a1ec208cc3961913</anchor>
+ <arglist>(char **str)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strtrim</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gaed7321cf4459dca45ea7000ad9b02df3</anchor>
+ <arglist>(char **str)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strquote</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gae13ac415b2b77aac738aa02c8d4394a7</anchor>
+ <arglist>(char **str)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strquote_2</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga304c5e49f5887284cfd6139781608a0f</anchor>
+ <arglist>(char **str, char lquote, char rquote)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strunquote</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gaf18615bea8031ae123b00d263d67447c</anchor>
+ <arglist>(char **str)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strunquote_2</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gab22896e63325d6f5c90c29611a12f581</anchor>
+ <arglist>(char **str, char lquote, char rquote)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_itoa</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga3cd07b7c25d5679bafa0b713e88ac13e</anchor>
+ <arglist>(int64_t i, tsk_istr_t *result)</arglist>
+ </member>
+ <member kind="function">
+ <type>int64_t</type>
+ <name>tsk_atoll</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga95b50270702b00c5c4eb8209f80266c5</anchor>
+ <arglist>(const char *str)</arglist>
+ </member>
+ <member kind="function">
+ <type>long</type>
+ <name>tsk_atox</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gac826f5cf2a464799101be484a48f3c29</anchor>
+ <arglist>(const char *str)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strrandom</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gaf2604da73445cfaf349f630b62041eeb</anchor>
+ <arglist>(tsk_istr_t *result)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_str_from_hex</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gaf36af7e0b8741535145d271d6bdc8edd</anchor>
+ <arglist>(const uint8_t *hex, tsk_size_t size, char *str)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_str_to_hex</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga4181f7cbd67e3a6465e3e1ca69f10175</anchor>
+ <arglist>(const char *str, tsk_size_t size, uint8_t *hex)</arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tsk_string_def_t</name>
+ <anchorfile>tsk__string_8c.html</anchorfile>
+ <anchor>aaafad466c06e88e7649751c74a08e833</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_string.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__string_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <includes id="tsk__object_8h" name="tsk_object.h" local="yes" imported="no">tsk_object.h</includes>
+ <includes id="tsk__list_8h" name="tsk_list.h" local="yes" imported="no">tsk_list.h</includes>
+ <class kind="struct">tsk_string_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_STRING_STR</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga8c7fc07364fb87c06584c3037ffd594b</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_strtrim_both</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga482e4555a6e17ab83c22042b07f6e1b8</anchor>
+ <arglist>(str)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_strempty</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gae9ed5b44ed07ea46a231affdc52fbe41</anchor>
+ <arglist>(s)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_strnullORempty</name>
+ <anchorfile>tsk__string_8h.html</anchorfile>
+ <anchor>ad6333d8a78224c3b9aa5037e930ade89</anchor>
+ <arglist>(s)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_striequals</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga5b2ce06e1383d689d5aef413f37722a2</anchor>
+ <arglist>(s1, s2)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_strniequals</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga61da50505d310538f221794122c602c3</anchor>
+ <arglist>(s1, s2, n)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_strequals</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga7cbbc03bb73b24dd12b5f57ab9d4cdcb</anchor>
+ <arglist>(s1, s2)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_strnequals</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga3f694752bc1c8a061a042e513d9d1c8c</anchor>
+ <arglist>(s1, s2, n)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_strlen</name>
+ <anchorfile>tsk__string_8h.html</anchorfile>
+ <anchor>aa09e6bb02b88da505b1e4e2987b07a42</anchor>
+ <arglist>(s)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>char</type>
+ <name>tsk_istr_t</name>
+ <anchorfile>tsk__string_8h.html</anchorfile>
+ <anchor>a5f2ecbbcd64442bf3cc64cbb210a4217</anchor>
+ <arglist>[21]</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_string_s</type>
+ <name>tsk_string_t</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga6dc529c45ed7d2ea554ba07de0bf87fc</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>tsk_list_t</type>
+ <name>tsk_strings_L_t</name>
+ <anchorfile>tsk__string_8h.html</anchorfile>
+ <anchor>ae8cef751ff2b6222229d4f363f1fd34e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API char</type>
+ <name>tsk_b10tob16</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga7b23d5e04afdda3d08db1568561a9980</anchor>
+ <arglist>(char c)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API char</type>
+ <name>tsk_b16tob10</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga68936738389a2f95add8714258053317</anchor>
+ <arglist>(char c)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_stricmp</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga73ba2ee5fdc7914bc770f53ab2c73ac5</anchor>
+ <arglist>(const char *str1, const char *str2)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_strnicmp</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gacecd370153236fcc0c8d15612f14d87f</anchor>
+ <arglist>(const char *str1, const char *str2, tsk_size_t n)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_strcmp</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gae2480bf4fa6f6e4f207d476467c93efb</anchor>
+ <arglist>(const char *str1, const char *str2)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_strncmp</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gacd9d33ff7ec1f6c0605c98c6f7259610</anchor>
+ <arglist>(const char *str1, const char *str2, tsk_size_t n)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API char *</type>
+ <name>tsk_strdup</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gaddd214bef41ba50555daba97e751cebf</anchor>
+ <arglist>(const char *s1)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API char *</type>
+ <name>tsk_strndup</name>
+ <anchorfile>tsk__string_8h.html</anchorfile>
+ <anchor>a169a7df6054da0cad00465e198814cee</anchor>
+ <arglist>(const char *s1, tsk_size_t n)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_bool_t</type>
+ <name>tsk_strcontains</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga76413189f0bb8ad77c45d790c0c9c27a</anchor>
+ <arglist>(const char *str, tsk_size_t size, const char *substring)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_strindexOf</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga1137a35a92d8c373caec60bdebf62013</anchor>
+ <arglist>(const char *str, tsk_size_t size, const char *substring)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_strLastIndexOf</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gafd2d8ae98f3829567bb06ca2dd8da628</anchor>
+ <arglist>(const char *str, tsk_size_t size, const char *substring)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_strcat</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gaf5d322130a46686000f1495201900285</anchor>
+ <arglist>(char **destination, const char *source)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_strcat_2</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gaa8baf82bbc92676188500efb083bf91d</anchor>
+ <arglist>(char **destination, const char *format,...)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_strncat</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga9818047196872f81e3478ef297c9ba88</anchor>
+ <arglist>(char **destination, const char *source, tsk_size_t n)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_sprintf</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga511a3cffbc2ed0139e875b857168143a</anchor>
+ <arglist>(char **str, const char *format,...)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_sprintf_2</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga77e7241f6955651bf6a1758a5c7b4d45</anchor>
+ <arglist>(char **str, const char *format, va_list *ap)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_strupdate</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga3eb59d8370b5e1c393023856b3967b14</anchor>
+ <arglist>(char **str, const char *newval)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_strtrim_left</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga66c595dc75c3cb8667b270d676148dd4</anchor>
+ <arglist>(char **str)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_strtrim_right</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gad378af9a4b98b799a1ec208cc3961913</anchor>
+ <arglist>(char **str)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_strtrim</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gaed7321cf4459dca45ea7000ad9b02df3</anchor>
+ <arglist>(char **str)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_strquote</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gae13ac415b2b77aac738aa02c8d4394a7</anchor>
+ <arglist>(char **str)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_strquote_2</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga304c5e49f5887284cfd6139781608a0f</anchor>
+ <arglist>(char **str, char lquote, char rquote)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_strunquote</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gaf18615bea8031ae123b00d263d67447c</anchor>
+ <arglist>(char **str)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_strunquote_2</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gab22896e63325d6f5c90c29611a12f581</anchor>
+ <arglist>(char **str, char lquote, char rquote)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_itoa</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga3cd07b7c25d5679bafa0b713e88ac13e</anchor>
+ <arglist>(int64_t i, tsk_istr_t *result)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int64_t</type>
+ <name>tsk_atoll</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga95b50270702b00c5c4eb8209f80266c5</anchor>
+ <arglist>(const char *)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API long</type>
+ <name>tsk_atox</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gac826f5cf2a464799101be484a48f3c29</anchor>
+ <arglist>(const char *)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_strrandom</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gaf2604da73445cfaf349f630b62041eeb</anchor>
+ <arglist>(tsk_istr_t *result)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_str_from_hex</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gaf36af7e0b8741535145d271d6bdc8edd</anchor>
+ <arglist>(const uint8_t *hex, tsk_size_t size, char *str)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API void</type>
+ <name>tsk_str_to_hex</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga4181f7cbd67e3a6465e3e1ca69f10175</anchor>
+ <arglist>(const char *str, tsk_size_t size, uint8_t *hex)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_string_t *</type>
+ <name>tsk_string_create</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gacb654b2c66d38d6ce2e357283de39955</anchor>
+ <arglist>(const char *str)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSAK_GEXTERN const tsk_object_def_t *</type>
+ <name>tsk_string_def_t</name>
+ <anchorfile>tsk__string_8h.html</anchorfile>
+ <anchor>a44cff13a4554b5e71bd4e1f4375fa7a1</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_thread.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__thread_8c</filename>
+ <includes id="tsk__thread_8h" name="tsk_thread.h" local="yes" imported="no">tsk_thread.h</includes>
+ <includes id="tsk__debug_8h" name="tsk_debug.h" local="yes" imported="no">tsk_debug.h</includes>
+ <includes id="tsk__memory_8h" name="tsk_memory.h" local="yes" imported="no">tsk_memory.h</includes>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_thread_sleep</name>
+ <anchorfile>group__tsk__thread__group.html</anchorfile>
+ <anchor>ga4ac2a1fa762ccea7b2636f946168595c</anchor>
+ <arglist>(uint64_t ms)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_thread_create</name>
+ <anchorfile>group__tsk__thread__group.html</anchorfile>
+ <anchor>ga27d60d0e9f4e1cd4cd75866ddb76d400</anchor>
+ <arglist>(void **tid, void *(*start)(void *), void *arg)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_thread_join</name>
+ <anchorfile>group__tsk__thread__group.html</anchorfile>
+ <anchor>gaef9e89a97f56887ffee9132c54e480bb</anchor>
+ <arglist>(void **tid)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_thread.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__thread_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <member kind="function">
+ <type>TSK_BEGIN_DECLS TINYSAK_API void</type>
+ <name>tsk_thread_sleep</name>
+ <anchorfile>group__tsk__thread__group.html</anchorfile>
+ <anchor>ga4ac2a1fa762ccea7b2636f946168595c</anchor>
+ <arglist>(uint64_t ms)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_thread_create</name>
+ <anchorfile>group__tsk__thread__group.html</anchorfile>
+ <anchor>ga27d60d0e9f4e1cd4cd75866ddb76d400</anchor>
+ <arglist>(void **tid, void *(*start)(void *), void *arg)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_thread_join</name>
+ <anchorfile>group__tsk__thread__group.html</anchorfile>
+ <anchor>gaef9e89a97f56887ffee9132c54e480bb</anchor>
+ <arglist>(void **tid)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_time.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__time_8c</filename>
+ <includes id="tsk__time_8h" name="tsk_time.h" local="yes" imported="no">tsk_time.h</includes>
+ <includes id="tsk__debug_8h" name="tsk_debug.h" local="yes" imported="no">tsk_debug.h</includes>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_gettimeofday</name>
+ <anchorfile>group__tsk__time__group.html</anchorfile>
+ <anchor>gabad685347be967dcf7fb41ebfb13d634</anchor>
+ <arglist>(struct timeval *tv, struct timezone *tz)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint64_t</type>
+ <name>tsk_time_get_ms</name>
+ <anchorfile>group__tsk__time__group.html</anchorfile>
+ <anchor>ga8a16acf41302b031e38e9e175bc2b671</anchor>
+ <arglist>(struct timeval *tv)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint64_t</type>
+ <name>tsk_time_epoch</name>
+ <anchorfile>group__tsk__time__group.html</anchorfile>
+ <anchor>ga594d612836a2d6c3868d2d4da0db2f66</anchor>
+ <arglist>()</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_time.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__time_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_TIME_S_2_MS</name>
+ <anchorfile>group__tsk__time__group.html</anchorfile>
+ <anchor>ga31aff3abba18fe3ec60ab7d7cc194678</anchor>
+ <arglist>(S)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_TIME_MS_2_S</name>
+ <anchorfile>tsk__time_8h.html</anchorfile>
+ <anchor>a1388ef737c6353aa181d45eac401f9e5</anchor>
+ <arglist>(MS)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_time_now</name>
+ <anchorfile>group__tsk__time__group.html</anchorfile>
+ <anchor>ga08190c30f608b1397602ccba62592b09</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_gettimeofday</name>
+ <anchorfile>group__tsk__time__group.html</anchorfile>
+ <anchor>gabad685347be967dcf7fb41ebfb13d634</anchor>
+ <arglist>(struct timeval *tv, struct timezone *tz)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API uint64_t</type>
+ <name>tsk_time_get_ms</name>
+ <anchorfile>group__tsk__time__group.html</anchorfile>
+ <anchor>ga8a16acf41302b031e38e9e175bc2b671</anchor>
+ <arglist>(struct timeval *tv)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API uint64_t</type>
+ <name>tsk_time_epoch</name>
+ <anchorfile>group__tsk__time__group.html</anchorfile>
+ <anchor>ga594d612836a2d6c3868d2d4da0db2f66</anchor>
+ <arglist>()</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_timer.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__timer_8c</filename>
+ <includes id="tsk__timer_8h" name="tsk_timer.h" local="yes" imported="no">tsk_timer.h</includes>
+ <includes id="tsk__debug_8h" name="tsk_debug.h" local="yes" imported="no">tsk_debug.h</includes>
+ <includes id="tsk__list_8h" name="tsk_list.h" local="yes" imported="no">tsk_list.h</includes>
+ <includes id="tsk__thread_8h" name="tsk_thread.h" local="yes" imported="no">tsk_thread.h</includes>
+ <includes id="tsk__runnable_8h" name="tsk_runnable.h" local="yes" imported="no">tsk_runnable.h</includes>
+ <includes id="tsk__condwait_8h" name="tsk_condwait.h" local="yes" imported="no">tsk_condwait.h</includes>
+ <includes id="tsk__semaphore_8h" name="tsk_semaphore.h" local="yes" imported="no">tsk_semaphore.h</includes>
+ <includes id="tsk__time_8h" name="tsk_time.h" local="yes" imported="no">tsk_time.h</includes>
+ <class kind="struct">tsk_timer_s</class>
+ <class kind="struct">tsk_timer_manager_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_TIMER_CREATE</name>
+ <anchorfile>tsk__timer_8c.html</anchorfile>
+ <anchor>ae4eccf0d91fdca93e1ac810ed0111de3</anchor>
+ <arglist>(timeout, callback, arg)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_TIMER_TIMEOUT</name>
+ <anchorfile>tsk__timer_8c.html</anchorfile>
+ <anchor>afc2938738d6cb98630336536e6b2ef4a</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_TIMER_GET_FIRST</name>
+ <anchorfile>tsk__timer_8c.html</anchorfile>
+ <anchor>ac38523a3500a23420f516c16e4a75d80</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_timer_s</type>
+ <name>tsk_timer_t</name>
+ <anchorfile>tsk__timer_8c.html</anchorfile>
+ <anchor>a233bb2d613fffc30a3ebc1dd50bf10c4</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>tsk_list_t</type>
+ <name>tsk_timers_L_t</name>
+ <anchorfile>tsk__timer_8c.html</anchorfile>
+ <anchor>affcd9e138d359d04b8676f5c8f5e0c8f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_timer_manager_s</type>
+ <name>tsk_timer_manager_t</name>
+ <anchorfile>tsk__timer_8c.html</anchorfile>
+ <anchor>ad8fea783cc288bcfa7e8e0ba61b1dfd8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>tsk_list_t</type>
+ <name>tsk_timer_manager_L_t</name>
+ <anchorfile>tsk__timer_8c.html</anchorfile>
+ <anchor>a943a72f6f641366c70ab91f27523411d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_timer_manager_handle_t *</type>
+ <name>tsk_timer_manager_create</name>
+ <anchorfile>group__tsk__timer__group.html</anchorfile>
+ <anchor>ga998cf3d665df9defe5893af6597d6692</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_timer_manager_start</name>
+ <anchorfile>group__tsk__timer__group.html</anchorfile>
+ <anchor>ga25b764d9f2e9baa9ec1560a7f9cc3ba6</anchor>
+ <arglist>(tsk_timer_manager_handle_t *self)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_timer_manager_debug</name>
+ <anchorfile>group__tsk__timer__group.html</anchorfile>
+ <anchor>ga4446ee9ed7b402d69c2661e9c9c30556</anchor>
+ <arglist>(tsk_timer_manager_handle_t *self)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_timer_manager_stop</name>
+ <anchorfile>group__tsk__timer__group.html</anchorfile>
+ <anchor>gab9c05eea4e9e539138d67c9cb74dfe27</anchor>
+ <arglist>(tsk_timer_manager_handle_t *self)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_timer_id_t</type>
+ <name>tsk_timer_manager_schedule</name>
+ <anchorfile>group__tsk__timer__group.html</anchorfile>
+ <anchor>ga27ad692cb086ce19b2229c949d06a243</anchor>
+ <arglist>(tsk_timer_manager_handle_t *self, uint64_t timeout, tsk_timer_callback_f callback, const void *arg)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_timer_manager_cancel</name>
+ <anchorfile>group__tsk__timer__group.html</anchorfile>
+ <anchor>gade6889f0963fac562b57ec4cd36fd093</anchor>
+ <arglist>(tsk_timer_manager_handle_t *self, tsk_timer_id_t id)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_timer_mgr_global_ref</name>
+ <anchorfile>tsk__timer_8c.html</anchorfile>
+ <anchor>afab075683cf03324938969788b6b4a0b</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_timer_mgr_global_start</name>
+ <anchorfile>tsk__timer_8c.html</anchorfile>
+ <anchor>aa6a570bef69890876d825f9d40bfc825</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_timer_id_t</type>
+ <name>tsk_timer_mgr_global_schedule</name>
+ <anchorfile>tsk__timer_8c.html</anchorfile>
+ <anchor>a69121793b8ac28084ea367c2824961ae</anchor>
+ <arglist>(uint64_t timeout, tsk_timer_callback_f callback, const void *arg)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_timer_mgr_global_cancel</name>
+ <anchorfile>tsk__timer_8c.html</anchorfile>
+ <anchor>ad80cc6a5e8a6ec5a1433d5683ac1fb01</anchor>
+ <arglist>(tsk_timer_id_t id)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_timer_mgr_global_stop</name>
+ <anchorfile>tsk__timer_8c.html</anchorfile>
+ <anchor>a915d081df2cf81bb69ec93467879367e</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_timer_mgr_global_unref</name>
+ <anchorfile>tsk__timer_8c.html</anchorfile>
+ <anchor>aecb0eaa1dfe7ce572773933ab3f91839</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tsk_timer_manager_def_t</name>
+ <anchorfile>tsk__timer_8c.html</anchorfile>
+ <anchor>a1917d2dd70ce49d4f0461227fdf41438</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>tsk_timer_def_t</name>
+ <anchorfile>tsk__timer_8c.html</anchorfile>
+ <anchor>a067dac0810f769093c667a4eab6dc711</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_timer.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__timer_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <includes id="tsk__object_8h" name="tsk_object.h" local="yes" imported="no">tsk_object.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_TIMER_CALLBACK_F</name>
+ <anchorfile>tsk__timer_8h.html</anchorfile>
+ <anchor>a5054b508cb37cfae9fae657485c3851d</anchor>
+ <arglist>(callback)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_INVALID_TIMER_ID</name>
+ <anchorfile>group__tsk__timer__group.html</anchorfile>
+ <anchor>ga5468eccb629e7157cc4892da5b7065cd</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_TIMER_ID_IS_VALID</name>
+ <anchorfile>group__tsk__timer__group.html</anchorfile>
+ <anchor>ga3342e11fde8654aea74ec029eeaef0cc</anchor>
+ <arglist>(id)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>void</type>
+ <name>tsk_timer_manager_handle_t</name>
+ <anchorfile>tsk__timer_8h.html</anchorfile>
+ <anchor>ac66298cc7ab4bae4f757e09f9564fd33</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>uint64_t</type>
+ <name>tsk_timer_id_t</name>
+ <anchorfile>tsk__timer_8h.html</anchorfile>
+ <anchor>a1203c3fdcce400e2d1ed8e09ce5e8484</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>int(*</type>
+ <name>tsk_timer_callback_f</name>
+ <anchorfile>tsk__timer_8h.html</anchorfile>
+ <anchor>aeda9014510db63711f67b6aa8d186cb2</anchor>
+ <arglist>)(const void *arg, tsk_timer_id_t timer_id)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_timer_manager_handle_t *</type>
+ <name>tsk_timer_manager_create</name>
+ <anchorfile>group__tsk__timer__group.html</anchorfile>
+ <anchor>ga998cf3d665df9defe5893af6597d6692</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_timer_manager_start</name>
+ <anchorfile>group__tsk__timer__group.html</anchorfile>
+ <anchor>ga25b764d9f2e9baa9ec1560a7f9cc3ba6</anchor>
+ <arglist>(tsk_timer_manager_handle_t *self)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_timer_manager_stop</name>
+ <anchorfile>group__tsk__timer__group.html</anchorfile>
+ <anchor>gab9c05eea4e9e539138d67c9cb74dfe27</anchor>
+ <arglist>(tsk_timer_manager_handle_t *self)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_timer_id_t</type>
+ <name>tsk_timer_manager_schedule</name>
+ <anchorfile>group__tsk__timer__group.html</anchorfile>
+ <anchor>ga27ad692cb086ce19b2229c949d06a243</anchor>
+ <arglist>(tsk_timer_manager_handle_t *self, uint64_t timeout, tsk_timer_callback_f callback, const void *arg)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_timer_manager_cancel</name>
+ <anchorfile>group__tsk__timer__group.html</anchorfile>
+ <anchor>gade6889f0963fac562b57ec4cd36fd093</anchor>
+ <arglist>(tsk_timer_manager_handle_t *self, tsk_timer_id_t id)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_timer_mgr_global_ref</name>
+ <anchorfile>tsk__timer_8h.html</anchorfile>
+ <anchor>a9a379fe924d040ea94dcdd7716818ca1</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_timer_mgr_global_start</name>
+ <anchorfile>tsk__timer_8h.html</anchorfile>
+ <anchor>a7ca4dfcc097d94be29496744fa667812</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API tsk_timer_id_t</type>
+ <name>tsk_timer_mgr_global_schedule</name>
+ <anchorfile>tsk__timer_8h.html</anchorfile>
+ <anchor>aa97901ae2435faf1d03d5026c9b49af7</anchor>
+ <arglist>(uint64_t timeout, tsk_timer_callback_f callback, const void *arg)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_timer_mgr_global_cancel</name>
+ <anchorfile>tsk__timer_8h.html</anchorfile>
+ <anchor>a5fe3df2135a0c46289158fabc27c8503</anchor>
+ <arglist>(tsk_timer_id_t id)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_timer_mgr_global_stop</name>
+ <anchorfile>tsk__timer_8h.html</anchorfile>
+ <anchor>ab62c55220239856b788bd039594dee13</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_timer_mgr_global_unref</name>
+ <anchorfile>tsk__timer_8h.html</anchorfile>
+ <anchor>aa0d5d02672bf8c5bb4266686d5a91c17</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSAK_GEXTERN const tsk_object_def_t *</type>
+ <name>tsk_timer_def_t</name>
+ <anchorfile>tsk__timer_8h.html</anchorfile>
+ <anchor>a6e6fd981723ed8fa9e765f61882f917b</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>TINYSAK_GEXTERN const tsk_object_def_t *</type>
+ <name>tsk_timer_manager_def_t</name>
+ <anchorfile>tsk__timer_8h.html</anchorfile>
+ <anchor>a0eac54bd27229cbec14cdb899e4a1d74</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_url.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__url_8c</filename>
+ <includes id="tsk__url_8h" name="tsk_url.h" local="yes" imported="no">tsk_url.h</includes>
+ <includes id="tsk__memory_8h" name="tsk_memory.h" local="yes" imported="no">tsk_memory.h</includes>
+ <includes id="tsk__string_8h" name="tsk_string.h" local="yes" imported="no">tsk_string.h</includes>
+ <member kind="function">
+ <type>char *</type>
+ <name>tsk_url_encode</name>
+ <anchorfile>group__tsk__url__group.html</anchorfile>
+ <anchor>gac0f4125aa7a9ff146e15a210fd3662f8</anchor>
+ <arglist>(const char *url)</arglist>
+ </member>
+ <member kind="function">
+ <type>char *</type>
+ <name>tsk_url_decode</name>
+ <anchorfile>group__tsk__url__group.html</anchorfile>
+ <anchor>ga0342c2b49f0df12c3022ede2b4fcde00</anchor>
+ <arglist>(const char *url)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_url.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__url_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <member kind="function">
+ <type>TSK_BEGIN_DECLS TINYSAK_API char *</type>
+ <name>tsk_url_encode</name>
+ <anchorfile>group__tsk__url__group.html</anchorfile>
+ <anchor>gac0f4125aa7a9ff146e15a210fd3662f8</anchor>
+ <arglist>(const char *url)</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API char *</type>
+ <name>tsk_url_decode</name>
+ <anchorfile>group__tsk__url__group.html</anchorfile>
+ <anchor>ga0342c2b49f0df12c3022ede2b4fcde00</anchor>
+ <arglist>(const char *url)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_uuid.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__uuid_8c</filename>
+ <includes id="tsk__uuid_8h" name="tsk_uuid.h" local="yes" imported="no">tsk_uuid.h</includes>
+ <includes id="tsk__sha1_8h" name="tsk_sha1.h" local="yes" imported="no">tsk_sha1.h</includes>
+ <includes id="tsk__string_8h" name="tsk_string.h" local="yes" imported="no">tsk_string.h</includes>
+ <includes id="tsk__time_8h" name="tsk_time.h" local="yes" imported="no">tsk_time.h</includes>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_uuidgenerate</name>
+ <anchorfile>group__tsk__uuid__group.html</anchorfile>
+ <anchor>gabeb07ebd52db8d125f9db70f91c225f3</anchor>
+ <arglist>(tsk_uuidstring_t *result)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_uuid.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__uuid_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_UUID_DIGEST_SIZE</name>
+ <anchorfile>tsk__uuid_8h.html</anchorfile>
+ <anchor>a09022aafeaf8d8a690b5607cf8a2aa0c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_UUID_STRING_SIZE</name>
+ <anchorfile>tsk__uuid_8h.html</anchorfile>
+ <anchor>a9347709e58bd88e68a2cbc2bafb7b859</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>char</type>
+ <name>tsk_uuidstring_t</name>
+ <anchorfile>tsk__uuid_8h.html</anchorfile>
+ <anchor>a21782e268f0efcef9b5ec5d0d349d8a9</anchor>
+ <arglist>[TSK_UUID_STRING_SIZE+1]</arglist>
+ </member>
+ <member kind="typedef">
+ <type>char</type>
+ <name>tsk_uuiddigest_t</name>
+ <anchorfile>tsk__uuid_8h.html</anchorfile>
+ <anchor>a7ab404f052e8eecbceaecb79b3eeec4b</anchor>
+ <arglist>[TSK_UUID_DIGEST_SIZE]</arglist>
+ </member>
+ <member kind="function">
+ <type>TINYSAK_API int</type>
+ <name>tsk_uuidgenerate</name>
+ <anchorfile>group__tsk__uuid__group.html</anchorfile>
+ <anchor>gabeb07ebd52db8d125f9db70f91c225f3</anchor>
+ <arglist>(tsk_uuidstring_t *result)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>tsk_xml.c</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__xml_8c</filename>
+ <includes id="tsk__xml_8h" name="tsk_xml.h" local="yes" imported="no">tsk_xml.h</includes>
+ </compound>
+ <compound kind="file">
+ <name>tsk_xml.h</name>
+ <path>C:/Projects/Doubango/tinySAK/src/</path>
+ <filename>tsk__xml_8h</filename>
+ <includes id="tinysak__config_8h" name="tinysak_config.h" local="yes" imported="no">tinysak_config.h</includes>
+ <includes id="tsk__list_8h" name="tsk_list.h" local="yes" imported="no">tsk_list.h</includes>
+ </compound>
+ <compound kind="group">
+ <name>tsk_base64_group</name>
+ <title>Base64 encoder/decoder as per RFC 4648.</title>
+ <filename>group__tsk__base64__group.html</filename>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BASE64_ENCODE_LEN</name>
+ <anchorfile>group__tsk__base64__group.html</anchorfile>
+ <anchor>gaa519cde8485bcd190353fa92d90b8d0e</anchor>
+ <arglist>(IN_LEN)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BASE64_DECODE_LEN</name>
+ <anchorfile>group__tsk__base64__group.html</anchorfile>
+ <anchor>ga271eb33c717d7581dbe6949f80c772bb</anchor>
+ <arglist>(IN_LEN)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_size_t</type>
+ <name>tsk_base64_encode</name>
+ <anchorfile>group__tsk__base64__group.html</anchorfile>
+ <anchor>gaa38edf458cb1977768855c2eb5ac68e6</anchor>
+ <arglist>(const uint8_t *input, tsk_size_t input_size, char **output)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_size_t</type>
+ <name>tsk_base64_decode</name>
+ <anchorfile>group__tsk__base64__group.html</anchorfile>
+ <anchor>ga1921043aba8ed60cbe1089220ecc8dd0</anchor>
+ <arglist>(const uint8_t *input, tsk_size_t input_size, char **output)</arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_binaryutils_group</name>
+ <title>Binary utility functions.</title>
+ <filename>group__tsk__binaryutils__group.html</filename>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BINARY_REVERSE_2BYTE</name>
+ <anchorfile>group__tsk__binaryutils__group.html</anchorfile>
+ <anchor>gae5cadce2121209897be98dfaf59f7cd4</anchor>
+ <arglist>(value)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_TO_U8</name>
+ <anchorfile>group__tsk__binaryutils__group.html</anchorfile>
+ <anchor>ga66745fafbfa0f8f707e77db6c42d5cf7</anchor>
+ <arglist>(buffer)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BINARY_GET_1BYTE</name>
+ <anchorfile>group__tsk__binaryutils__group.html</anchorfile>
+ <anchor>gaf3a4d14eabeeaf8bcb65c2f54f7150df</anchor>
+ <arglist>(buffer)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BINARY_GET_2BYTES</name>
+ <anchorfile>group__tsk__binaryutils__group.html</anchorfile>
+ <anchor>ga70d6ced21c19792d0423d71e00966231</anchor>
+ <arglist>(buffer)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BINARY_SET_2BYTES</name>
+ <anchorfile>group__tsk__binaryutils__group.html</anchorfile>
+ <anchor>gabedeb908519a0fd5eaba54b28ac9abfa</anchor>
+ <arglist>(buffer, value)</arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_buffer_group</name>
+ <title>Buffer management.</title>
+ <filename>group__tsk__buffer__group.html</filename>
+ <class kind="struct">tsk_buffer_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BUFFER</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga0b2d18231f123fc48880d65950f786ea</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BUFFER_DATA</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>gaf525a0b1ba4d2e0086bc2630006f805b</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BUFFER_SIZE</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga252cf6d43f95ebeada69424ab8a023d5</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BUFFER_TO_STRING</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>gaf3026d62d560741429fcdefa3ca3c729</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_BUFFER_TO_U8</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga61169862fb2754c5bcaab5a8015a1efc</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_buffer_s</type>
+ <name>tsk_buffer_t</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga0d2bdd4e540e5c9d08fc3e1802390cf8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>tsk_list_t</type>
+ <name>tsk_buffers_L_t</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>gafbd810591304fb3538654b30b26d672b</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_buffer_t *</type>
+ <name>tsk_buffer_create</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga30c932d68d69c4d981a2a9550171061f</anchor>
+ <arglist>(const void *data, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_buffer_t *</type>
+ <name>tsk_buffer_create_null</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga1548cfc14bf9636cd81ec286536d74b5</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_buffer_append_2</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga80784bf413b679251342733d67f83251</anchor>
+ <arglist>(tsk_buffer_t *self, const char *format,...)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_buffer_append</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>gac7a49242ed646e895e0c8cf084b6377c</anchor>
+ <arglist>(tsk_buffer_t *self, const void *data, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_buffer_realloc</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga5f14a6fa7f4fa006a7a7ac184320acef</anchor>
+ <arglist>(tsk_buffer_t *self, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_buffer_remove</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>gaf9a140a6139445c9d6bbbec01221884f</anchor>
+ <arglist>(tsk_buffer_t *self, tsk_size_t position, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_buffer_insert</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>gaafb6764ac2eca7d572d5daff83551f00</anchor>
+ <arglist>(tsk_buffer_t *self, tsk_size_t position, const void *data, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_buffer_cleanup</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga8a31cbf88b943d87b6858e9c6472459d</anchor>
+ <arglist>(tsk_buffer_t *self)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_buffer_takeownership</name>
+ <anchorfile>group__tsk__buffer__group.html</anchorfile>
+ <anchor>ga0c66b3c564a79f4d5ba7a2c0bf199464</anchor>
+ <arglist>(tsk_buffer_t *self, void **data, tsk_size_t size)</arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_condwait_group</name>
+ <title>Pthread/Windows functions for waiting and signaling on condition variables (conwait).</title>
+ <filename>group__tsk__condwait__group.html</filename>
+ <class kind="struct">tsk_condwait_s</class>
+ <member kind="typedef">
+ <type>struct tsk_condwait_s</type>
+ <name>tsk_condwait_t</name>
+ <anchorfile>group__tsk__condwait__group.html</anchorfile>
+ <anchor>ga501fe99869f3cf1af0628f23faf318c4</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_condwait_handle_t *</type>
+ <name>tsk_condwait_create</name>
+ <anchorfile>group__tsk__condwait__group.html</anchorfile>
+ <anchor>ga8d98b2aa5bb33d951e3b82d96f0625ef</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_condwait_wait</name>
+ <anchorfile>group__tsk__condwait__group.html</anchorfile>
+ <anchor>ga1c8bfe69229db0b08e432dbc79eaed46</anchor>
+ <arglist>(tsk_condwait_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_condwait_timedwait</name>
+ <anchorfile>group__tsk__condwait__group.html</anchorfile>
+ <anchor>ga89e771e74d6a3cce8ae076eac75c5ae1</anchor>
+ <arglist>(tsk_condwait_handle_t *handle, uint64_t ms)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_condwait_signal</name>
+ <anchorfile>group__tsk__condwait__group.html</anchorfile>
+ <anchor>ga9eaad3ffd23720abfc081ac86ea74ca4</anchor>
+ <arglist>(tsk_condwait_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_condwait_broadcast</name>
+ <anchorfile>group__tsk__condwait__group.html</anchorfile>
+ <anchor>ga9133f2cc189150eb606015962b07bc98</anchor>
+ <arglist>(tsk_condwait_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_condwait_destroy</name>
+ <anchorfile>group__tsk__condwait__group.html</anchorfile>
+ <anchor>ga95a587d61b4797b7421f02c6650203cc</anchor>
+ <arglist>(tsk_condwait_handle_t **handle)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TSK_BEGIN_DECLS typedef void</type>
+ <name>tsk_condwait_handle_t</name>
+ <anchorfile>group__tsk__condwait__group.html</anchorfile>
+ <anchor>gaaeb911fdb4bbe29f40b36ffadc92e9c4</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_debug_group</name>
+ <title>Utility functions for debugging purpose.</title>
+ <filename>group__tsk__debug__group.html</filename>
+ <member kind="define">
+ <type>#define</type>
+ <name>DEBUG_LEVEL_INFO</name>
+ <anchorfile>group__tsk__debug__group.html</anchorfile>
+ <anchor>ga5f068e0ead7c7e158d2ff28e7b2f2794</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DEBUG_LEVEL_WARN</name>
+ <anchorfile>group__tsk__debug__group.html</anchorfile>
+ <anchor>ga07c8ec1cc5bc17da4b0dcecf724251bd</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DEBUG_LEVEL_ERROR</name>
+ <anchorfile>group__tsk__debug__group.html</anchorfile>
+ <anchor>ga6c7c6775845a96501c54d1f08b0f00c4</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>DEBUG_LEVEL_FATAL</name>
+ <anchorfile>group__tsk__debug__group.html</anchorfile>
+ <anchor>gade8136c97f2dd21c2449282fe0ce0f97</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_fsm_group</name>
+ <title>Finite-state machine (FSM) implementation.</title>
+ <filename>group__tsk__fsm__group.html</filename>
+ <class kind="struct">tsk_fsm_entry_s</class>
+ <class kind="struct">tsk_fsm_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_fsm_state_any</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga9b23f7aef02f0583de042cdfdbed36fd</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_fsm_state_default</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga9cec29ff916b0b892289aa253b9a9005</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_fsm_state_none</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>gab6f3bc3a1849b0f87166a17d9693222d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_fsm_state_final</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga011da4535ba4f75c8b96cb8b854af23e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_fsm_action_any</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>gac3dff3bfd9beb524f0042e05f4c32406</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_FSM_ADD</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga5805916c7bf7784a1a8f004cf8331cf8</anchor>
+ <arglist>(from, action, cond, to, exec, desc)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_FSM_ADD_ALWAYS</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>gabf353526cd2a9a469dd0b51d5cf2be84</anchor>
+ <arglist>(from, action, to, exec, desc)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_FSM_ADD_NOTHING</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga65dad33c43f7a4ff8fbe60ced18b73cb</anchor>
+ <arglist>(from, action, cond, desc)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_FSM_ADD_ALWAYS_NOTHING</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>gacd68f0d226bb6327031b5366ad897436</anchor>
+ <arglist>(from, desc)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_FSM_ADD_DEFAULT</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga9559f633c6a28a18fadd41e38da49015</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_FSM_ADD_NULL</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga471ae39640b3bec50250c259dccf03bf</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_fsm_entry_s</type>
+ <name>tsk_fsm_entry_t</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga72f1e845bcd6c7852a7cc8e2bcbb2d6e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>tsk_list_t</type>
+ <name>tsk_fsm_entries_L_t</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga55fa98af3aeed79f9e0ac47d9c183cbb</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_fsm_s</type>
+ <name>tsk_fsm_t</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga79a204ea8f2c1333aba2d12065bc8a33</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_fsm_t *</type>
+ <name>tsk_fsm_create</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>gaf6fbfbe79246f21658bf6313112eccc2</anchor>
+ <arglist>(tsk_fsm_state_id state_curr, tsk_fsm_state_id state_term)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_fsm_entry_t *</type>
+ <name>tsk_fsm_entry_create</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>gaf34efba304baf532624fbdc612085ea3</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_fsm_set</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga9059c5c9cdccf14f4c963bfee38b5ba4</anchor>
+ <arglist>(tsk_fsm_t *self,...)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_fsm_set_callback_terminated</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>ga609f68b40066be6caebe0c088239f8fa</anchor>
+ <arglist>(tsk_fsm_t *self, tsk_fsm_onterminated_f callback, const void *callbackdata)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_fsm_act</name>
+ <anchorfile>group__tsk__fsm__group.html</anchorfile>
+ <anchor>gaad1a993a8149a9bda8b67922c1bfa575</anchor>
+ <arglist>(tsk_fsm_t *self, tsk_fsm_action_id action, const void *cond_data1, const void *cond_data2,...)</arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_hmac_group</name>
+ <title>Keyed-Hashing for Message Authentication (RFC 2104/ FIPS-198-1).</title>
+ <filename>group__tsk__hmac__group.html</filename>
+ <member kind="typedef">
+ <type>enum tsk_hash_type_e</type>
+ <name>tsk_hash_type_t</name>
+ <anchorfile>group__tsk__hmac__group.html</anchorfile>
+ <anchor>gaa0bd128426d679716d9d23a0fb677469</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="enumeration">
+ <name>tsk_hash_type_e</name>
+ <anchorfile>group__tsk__hmac__group.html</anchorfile>
+ <anchor>gaeec7a6e6f400d343cce4e646099aeded</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="enumvalue">
+ <name>md5</name>
+ <anchorfile>group__tsk__hmac__group.html</anchorfile>
+ <anchor>ggaeec7a6e6f400d343cce4e646099aededa261074350302568b2909ca5caaf32c4c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="enumvalue">
+ <name>sha1</name>
+ <anchorfile>group__tsk__hmac__group.html</anchorfile>
+ <anchor>ggaeec7a6e6f400d343cce4e646099aededa79411db037421f2bf2355d19f282444b</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>hmac_md5_compute</name>
+ <anchorfile>group__tsk__hmac__group.html</anchorfile>
+ <anchor>gaa4085ee3be5e9d58c675fbf81333121b</anchor>
+ <arglist>(const uint8_t *input, tsk_size_t input_size, const char *key, tsk_size_t key_size, tsk_md5string_t *result)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>hmac_md5digest_compute</name>
+ <anchorfile>group__tsk__hmac__group.html</anchorfile>
+ <anchor>ga1a70aab02cdd93eb7e75c26ed79db846</anchor>
+ <arglist>(const uint8_t *input, tsk_size_t input_size, const char *key, tsk_size_t key_size, tsk_md5digest_t result)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>hmac_sha1_compute</name>
+ <anchorfile>group__tsk__hmac__group.html</anchorfile>
+ <anchor>gadbbbed195249a97ef96509932ba4c1ea</anchor>
+ <arglist>(const uint8_t *input, tsk_size_t input_size, const char *key, tsk_size_t key_size, tsk_sha1string_t *result)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>hmac_sha1digest_compute</name>
+ <anchorfile>group__tsk__hmac__group.html</anchorfile>
+ <anchor>ga3a4fcff9ca7e9ec85d3d3fca50b16de0</anchor>
+ <arglist>(const uint8_t *input, tsk_size_t input_size, const char *key, tsk_size_t key_size, tsk_sha1digest_t result)</arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_list_group</name>
+ <title>Linked list.</title>
+ <filename>group__tsk__list__group.html</filename>
+ <class kind="struct">tsk_list_item_s</class>
+ <class kind="struct">tsk_list_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_LIST_IS_EMPTY</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga3b505dbb26ce90b203d54c83afac4f22</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_list_foreach</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga3dc00dc6de6f204db6cc311fab641552</anchor>
+ <arglist>(item, list)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_list_item_s</type>
+ <name>tsk_list_item_t</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga7a571edc459af1e1f1019a029e0a694f</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_list_s</type>
+ <name>tsk_list_t</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga002f4981eafdbe60111f916ccdfcb128</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>int(*</type>
+ <name>tsk_list_func_predicate</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga527098153df95a041c510091e0a80267</anchor>
+ <arglist>)(const tsk_list_item_t *item, const void *data)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_list_t *</type>
+ <name>tsk_list_create</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga2fb2802394ee97c550ae1e39bb8d073a</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_list_item_t *</type>
+ <name>tsk_list_item_create</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga66702bf5657b609fd6b4e5df5e780ca4</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_list_lock</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga50ea10b14ed681d3d479b323b33f6c28</anchor>
+ <arglist>(tsk_list_t *list)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_list_unlock</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga31b7bea171002ae04936016725a87b06</anchor>
+ <arglist>(tsk_list_t *list)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_list_remove_item</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga2af261ca7e590e04356ec6b2c25dd8aa</anchor>
+ <arglist>(tsk_list_t *list, tsk_list_item_t *item)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_list_item_t *</type>
+ <name>tsk_list_pop_item_by_data</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>gab0fd61b7818ab2bc66089a8f2df08329</anchor>
+ <arglist>(tsk_list_t *list, const tsk_object_t *tskobj)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_list_remove_item_by_data</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga49ab1be4f114420c5b4b8c7f2b8374ad</anchor>
+ <arglist>(tsk_list_t *list, const tsk_object_t *tskobj)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_list_item_t *</type>
+ <name>tsk_list_pop_item_by_pred</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>gac19d6873b2ba28e0e94c0124de6e03ad</anchor>
+ <arglist>(tsk_list_t *list, tsk_list_func_predicate predicate, const void *data)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_list_remove_item_by_pred</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>gacc1b42538856ec9f756de13fe9d56ddd</anchor>
+ <arglist>(tsk_list_t *list, tsk_list_func_predicate predicate, const tsk_object_t *data)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_list_clear_items</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga74a841b1c7df8292b1207fb2f648252b</anchor>
+ <arglist>(tsk_list_t *list)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_list_item_t *</type>
+ <name>tsk_list_pop_first_item</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga511f50b84436857501c343b48938bcc5</anchor>
+ <arglist>(tsk_list_t *list)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_list_push_item</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga78e84f4c8fb03171ed290b8019997aef</anchor>
+ <arglist>(tsk_list_t *list, tsk_list_item_t **item, tsk_bool_t back)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_list_push_filtered_item</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>gad2e1c9d02af90c65b64880fe205c98c5</anchor>
+ <arglist>(tsk_list_t *list, tsk_list_item_t **item, tsk_bool_t ascending)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_list_push_list</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga37e45e926966517183eade6ccc44ea10</anchor>
+ <arglist>(tsk_list_t *dest, const tsk_list_t *src, tsk_bool_t back)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_list_push_data</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>gad38aa4e81cdba612c803c546cdae7b0a</anchor>
+ <arglist>(tsk_list_t *list, void **data, tsk_bool_t back)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_list_push_filtered_data</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga5c8466f48649b102f981d44edb1c717e</anchor>
+ <arglist>(tsk_list_t *list, void **data, tsk_bool_t ascending)</arglist>
+ </member>
+ <member kind="function">
+ <type>const tsk_list_item_t *</type>
+ <name>tsk_list_find_item_by_data</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga126667d805e5cc53af126bbd69ef6b53</anchor>
+ <arglist>(const tsk_list_t *list, const tsk_object_t *tskobj)</arglist>
+ </member>
+ <member kind="function">
+ <type>const tsk_list_item_t *</type>
+ <name>tsk_list_find_item_by_pred</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga830c02dde8ebc3f009365358e42c90f0</anchor>
+ <arglist>(const tsk_list_t *list, tsk_list_func_predicate predicate, const void *data)</arglist>
+ </member>
+ <member kind="function">
+ <type>const tsk_object_t *</type>
+ <name>tsk_list_find_object_by_pred</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>gacedbefcbe8600f1ae107560b1e97aa29</anchor>
+ <arglist>(const tsk_list_t *list, tsk_list_func_predicate predicate, const void *data)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_size_t</type>
+ <name>tsk_list_count</name>
+ <anchorfile>group__tsk__list__group.html</anchorfile>
+ <anchor>ga4f3cf383327dc893a85685f826c44a04</anchor>
+ <arglist>(const tsk_list_t *list, tsk_list_func_predicate predicate, const void *data)</arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_md5_group</name>
+ <title>MD5 (RFC 1321) utility functions.</title>
+ <filename>group__tsk__md5__group.html</filename>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_byteReverse</name>
+ <anchorfile>group__tsk__md5__group.html</anchorfile>
+ <anchor>ga518ec0e3e377b3da67ae8019fc1e6a0c</anchor>
+ <arglist>(buf, words)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_MD5_BLOCK_SIZE</name>
+ <anchorfile>group__tsk__md5__group.html</anchorfile>
+ <anchor>gab5a94ba495c9b2bcc491dd588bbbbaa1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_MD5_EMPTY</name>
+ <anchorfile>group__tsk__md5__group.html</anchorfile>
+ <anchor>ga4a697e556ebf215706dfe290d79cc42e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_MD5_STRING_SIZE</name>
+ <anchorfile>group__tsk__md5__group.html</anchorfile>
+ <anchor>ga5db19878f020d26450704a9b47740f97</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_md5init</name>
+ <anchorfile>group__tsk__md5__group.html</anchorfile>
+ <anchor>ga42503ae8b9fb7b62153cc88307b2c750</anchor>
+ <arglist>(tsk_md5context_t *ctx)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_md5update</name>
+ <anchorfile>group__tsk__md5__group.html</anchorfile>
+ <anchor>gae36ae9627c1eb5760415ab6e8d6f8566</anchor>
+ <arglist>(tsk_md5context_t *ctx, uint8_t const *buf, tsk_size_t len)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_md5final</name>
+ <anchorfile>group__tsk__md5__group.html</anchorfile>
+ <anchor>ga3fa4d0613f3c999a65e5d4d016b973e8</anchor>
+ <arglist>(tsk_md5digest_t digest, tsk_md5context_t *ctx)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_md5transform</name>
+ <anchorfile>group__tsk__md5__group.html</anchorfile>
+ <anchor>ga1eb60a1ed35b2d103881d60c3fcc0f81</anchor>
+ <arglist>(uint32_t buf[4], uint32_t const in[TSK_MD5_DIGEST_SIZE])</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_md5compute</name>
+ <anchorfile>group__tsk__md5__group.html</anchorfile>
+ <anchor>ga7c088380455e3aba0413be8e312fff06</anchor>
+ <arglist>(const char *input, tsk_size_t size, tsk_md5string_t *result)</arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_memory_group</name>
+ <title>Utility functions for memory management.</title>
+ <filename>group__tsk__memory__group.html</filename>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_SAFE_FREE</name>
+ <anchorfile>group__tsk__memory__group.html</anchorfile>
+ <anchor>gafa021802335b70c6358abe3cb0c2fba4</anchor>
+ <arglist>(ptr)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_FREE</name>
+ <anchorfile>group__tsk__memory__group.html</anchorfile>
+ <anchor>ga32ce64ddec3db2fa200fd91c8dec5016</anchor>
+ <arglist>(ptr)</arglist>
+ </member>
+ <member kind="function">
+ <type>void *</type>
+ <name>tsk_malloc</name>
+ <anchorfile>group__tsk__memory__group.html</anchorfile>
+ <anchor>gadf67b3acd9d721b603821aa9a0c8fb56</anchor>
+ <arglist>(tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>void *</type>
+ <name>tsk_realloc</name>
+ <anchorfile>group__tsk__memory__group.html</anchorfile>
+ <anchor>gaac69627d2bbf3aeef0e0aafb6371bf82</anchor>
+ <arglist>(void *ptr, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_free</name>
+ <anchorfile>group__tsk__memory__group.html</anchorfile>
+ <anchor>ga68503d6c940fa6739cc56f3bb8894301</anchor>
+ <arglist>(void **ptr)</arglist>
+ </member>
+ <member kind="function">
+ <type>void *</type>
+ <name>tsk_calloc</name>
+ <anchorfile>group__tsk__memory__group.html</anchorfile>
+ <anchor>gaf4d8432e44e4c13cd1f82243e0b156b3</anchor>
+ <arglist>(tsk_size_t num, tsk_size_t size)</arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_mutex_group</name>
+ <title>Pthread/Windows Mutex utility functions.</title>
+ <filename>group__tsk__mutex__group.html</filename>
+ <member kind="function">
+ <type>tsk_mutex_handle_t *</type>
+ <name>tsk_mutex_create</name>
+ <anchorfile>group__tsk__mutex__group.html</anchorfile>
+ <anchor>gaaf964e56762d736c25b75d1ac99b864b</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_mutex_lock</name>
+ <anchorfile>group__tsk__mutex__group.html</anchorfile>
+ <anchor>ga8a5e359d06ff188986175690b39a0150</anchor>
+ <arglist>(tsk_mutex_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_mutex_unlock</name>
+ <anchorfile>group__tsk__mutex__group.html</anchorfile>
+ <anchor>ga94e3cda29378307cbd370ab9c49dd584</anchor>
+ <arglist>(tsk_mutex_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_mutex_destroy</name>
+ <anchorfile>group__tsk__mutex__group.html</anchorfile>
+ <anchor>gad113bb5fdcaef72e3fcbe0537cbe2788</anchor>
+ <arglist>(tsk_mutex_handle_t **handle)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TSK_BEGIN_DECLS typedef void</type>
+ <name>tsk_mutex_handle_t</name>
+ <anchorfile>group__tsk__mutex__group.html</anchorfile>
+ <anchor>ga2c8f7cbe4027fb08a072376d92834995</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_object_group</name>
+ <title>Base object implementation.</title>
+ <filename>group__tsk__object__group.html</filename>
+ <class kind="struct">tsk_object_def_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_OBJECT_SAFE_FREE</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>ga56da14173987325ef8b0c75fec002664</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>ga2b288558d49ee137b399e49cd5aa552e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_OBJECT_DEF</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>ga2e8cef948dd1000968ae4df6cc7d7e69</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_object_def_s</type>
+ <name>tsk_object_def_t</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>ga28480098d7f6bdcc8c9361286959229e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_object_t *</type>
+ <name>tsk_object_new</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>gaa3ee920a46dea8ba02932aa8e6a6060e</anchor>
+ <arglist>(const tsk_object_def_t *objdef,...)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_object_t *</type>
+ <name>tsk_object_new_2</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>ga63893a9927979180dfc7621492f334c4</anchor>
+ <arglist>(const tsk_object_def_t *objdef, va_list *ap)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_size_t</type>
+ <name>tsk_object_sizeof</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>ga65133674abc90858ffbc13c40ec33745</anchor>
+ <arglist>(const tsk_object_t *self)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_object_cmp</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>gacf253f86208fb586b8d86f0e9bb3c549</anchor>
+ <arglist>(const tsk_object_t *object1, const tsk_object_t *object2)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_object_t *</type>
+ <name>tsk_object_ref</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>gaaea32a7f461d6f2fd1e0e5a19bbb986f</anchor>
+ <arglist>(tsk_object_t *self)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_object_t *</type>
+ <name>tsk_object_unref</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>ga32ef69f32a1dd6bc0d0be0e164ea2843</anchor>
+ <arglist>(tsk_object_t *self)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_object_delete</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>ga4f4eb990f3cf2f579f439870e8fec35d</anchor>
+ <arglist>(tsk_object_t *self)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TSK_BEGIN_DECLS typedef void</type>
+ <name>tsk_object_t</name>
+ <anchorfile>group__tsk__object__group.html</anchorfile>
+ <anchor>ga854eac17e0c0bdfa29862f294d22f7fb</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_options_group</name>
+ <title>Options.</title>
+ <filename>group__tsk__options__group.html</filename>
+ <class kind="struct">tsk_option_s</class>
+ <member kind="typedef">
+ <type>struct tsk_option_s</type>
+ <name>tsk_option_t</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>gaf060ef8c6afe37ae8c10b9814e005e21</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_option_t *</type>
+ <name>tsk_option_create</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>ga15c3f065d1b4ed0894d653460ed7aee8</anchor>
+ <arglist>(int id, const char *value)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_option_t *</type>
+ <name>tsk_option_create_null</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>ga539381ba69534803eec268721f71d734</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tsk_options_have_option</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>ga95cd90fc62a7c94242ef3565e3d29c12</anchor>
+ <arglist>(const tsk_options_L_t *self, int id)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_options_add_option</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>gaf4a7e2b50370d3bacbfb02d6208bde48</anchor>
+ <arglist>(tsk_options_L_t **self, int id, const char *value)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_options_remove_option</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>ga22d21df71d29386129297cf1c1763edb</anchor>
+ <arglist>(tsk_options_L_t *self, int id)</arglist>
+ </member>
+ <member kind="function">
+ <type>const tsk_option_t *</type>
+ <name>tsk_options_get_option_by_id</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>gae91a373b327a62b3a8cc13682d6175c4</anchor>
+ <arglist>(const tsk_options_L_t *self, int id)</arglist>
+ </member>
+ <member kind="function">
+ <type>const char *</type>
+ <name>tsk_options_get_option_value</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>gaf4a3aa09b3c9e20cfad18639ef3b24b6</anchor>
+ <arglist>(const tsk_options_L_t *self, int id)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_options_get_option_value_as_int</name>
+ <anchorfile>group__tsk__options__group.html</anchorfile>
+ <anchor>ga36f6819e19e19ffe6fe0ce8fe639673c</anchor>
+ <arglist>(const tsk_options_L_t *self, int id)</arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_params_group</name>
+ <title>SIP/MSRP/XCAP Parameters parser.</title>
+ <filename>group__tsk__params__group.html</filename>
+ <class kind="struct">tsk_param_s</class>
+ <member kind="typedef">
+ <type>struct tsk_param_s</type>
+ <name>tsk_param_t</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>gaeb6673242bb3fe02f0ed95c99738712a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_param_t *</type>
+ <name>tsk_param_create</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>ga3ce4ef8ec0a30ad5a08d0222ce795a50</anchor>
+ <arglist>(const char *name, const char *value)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_param_t *</type>
+ <name>tsk_param_create_null</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>gac6b69a0d9a82cf63db111614455f4bfa</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_param_t *</type>
+ <name>tsk_params_parse_param</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>gaa8a439408d71b4337898c37ea3d71592</anchor>
+ <arglist>(const char *line, tsk_size_t size)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tsk_params_have_param</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>ga31cbb886619c8d00c1805a5feaed8ce6</anchor>
+ <arglist>(const tsk_params_L_t *self, const char *name)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_params_add_param</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>ga42acaefd481f3af60bd7029b968630d2</anchor>
+ <arglist>(tsk_params_L_t **self, const char *name, const char *value)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_params_remove_param</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>gab0f4f4d272eec7eb8a4cd10027eea260</anchor>
+ <arglist>(tsk_params_L_t *self, const char *name)</arglist>
+ </member>
+ <member kind="function">
+ <type>const tsk_param_t *</type>
+ <name>tsk_params_get_param_by_name</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>gabb53a986f29f1de5a400ae448153d09f</anchor>
+ <arglist>(const tsk_params_L_t *self, const char *name)</arglist>
+ </member>
+ <member kind="function">
+ <type>const char *</type>
+ <name>tsk_params_get_param_value</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>gaa9d1485289ab4f56eb659ba4d2978d2e</anchor>
+ <arglist>(const tsk_params_L_t *self, const char *name)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_params_get_param_value_as_int</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>ga0c24b5d4f9d070109a8ac2ed20233158</anchor>
+ <arglist>(const tsk_params_L_t *self, const char *name)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_params_param_tostring</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>ga0af26eb3c22e24fa0afdf8328633ab05</anchor>
+ <arglist>(const tsk_param_t *param, tsk_buffer_t *output)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_params_tostring</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>ga724a941858f72384e0163be39c550595</anchor>
+ <arglist>(const tsk_params_L_t *self, const char separator, tsk_buffer_t *output)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_params_L_t *</type>
+ <name>tsk_params_fromstring</name>
+ <anchorfile>group__tsk__params__group.html</anchorfile>
+ <anchor>ga90890f00599201b2bd599f3e4d406746</anchor>
+ <arglist>(const char *string, const char *separator, tsk_bool_t trim)</arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_ppfcs16_group</name>
+ <title>PPP in HDLC-like Framing (RFC 1662).</title>
+ <filename>group__tsk__ppfcs16__group.html</filename>
+ <member kind="function">
+ <type>uint16_t</type>
+ <name>tsk_pppfcs16</name>
+ <anchorfile>group__tsk__ppfcs16__group.html</anchorfile>
+ <anchor>ga6aeb4f3b70bd66f68d2d1a9fbebc7582</anchor>
+ <arglist>(register uint16_t fcs, register const uint8_t *cp, register int32_t len)</arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_ppfcs32_group</name>
+ <title>PPP in HDLC-like Framing (RFC 1662).</title>
+ <filename>group__tsk__ppfcs32__group.html</filename>
+ <member kind="function">
+ <type>uint32_t</type>
+ <name>tsk_pppfcs32</name>
+ <anchorfile>group__tsk__ppfcs32__group.html</anchorfile>
+ <anchor>gafd4873e357e96a4455e50b6e55d6d54f</anchor>
+ <arglist>(register uint32_t fcs, register const uint8_t *cp, register int32_t len)</arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_ragel_state_group</name>
+ <title>Ragel state for SIP, HTTP and MSRP parsing.</title>
+ <filename>group__tsk__ragel__state__group.html</filename>
+ <class kind="struct">tsk_ragel_state_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_SCANNER_SET_STRING</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>gab3bad9dd91bf57945d6991881207439b</anchor>
+ <arglist>(string)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PARSER_SET_STRING</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>ga98d459a2c3160b37c175ddb8c1638978</anchor>
+ <arglist>(string)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_SCANNER_SET_INTEGER</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>ga56277e20af043a63529ee517df073888</anchor>
+ <arglist>(integer)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PARSER_SET_INTEGER_EX</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>gae2d97ed7f19e0423888b629d488f01a3</anchor>
+ <arglist>(retval, type, func)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PARSER_SET_INTEGER</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>ga7935f1a48958154d5d872e39ddcdabcc</anchor>
+ <arglist>(retval)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PARSER_SET_INT</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>ga1ed59e238f59ab1f9313e77d6c408df5</anchor>
+ <arglist>(retval)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PARSER_SET_UINT</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>ga3c9a1b51b38ff79992d2592bee6c8a13</anchor>
+ <arglist>(retval)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PARSER_SET_FLOAT</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>ga942dc4c86698c2608553b5e38b817f01</anchor>
+ <arglist>(retval)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PARSER_SET_DOUBLE</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>ga97293ec81862088730764f3224b21783</anchor>
+ <arglist>(retval)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PARSER_ADD_PARAM</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>ga4c8e3289fce1e4da7f252d9a5febbd51</anchor>
+ <arglist>(dest)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_SACANNER_ADD_PARAM</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>ga24044072008fc824d550e2d1f8c93981</anchor>
+ <arglist>(dest)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_PARSER_ADD_STRING</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>ga79bf67f1cf887e50eac9a6c4856bf0eb</anchor>
+ <arglist>(dest)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_ragel_state_s</type>
+ <name>tsk_ragel_state_t</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>gae45218c3eba34c2555e17a117d5cb003</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_ragel_state_init</name>
+ <anchorfile>group__tsk__ragel__state__group.html</anchorfile>
+ <anchor>ga5501b9417f264a8ec197008f084220fb</anchor>
+ <arglist>(tsk_ragel_state_t *state, const char *data, tsk_size_t size)</arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_runnable_group</name>
+ <title>Base class for runnable object.</title>
+ <filename>group__tsk__runnable__group.html</filename>
+ <class kind="struct">tsk_runnable_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_RUNNABLE</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>gac2bef0f74acd9c86f5ab7c4b35801ee4</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_RUNNABLE_RUN_BEGIN</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga626da5c40a90003d1c72d7304bbac5d2</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_RUNNABLE_RUN_END</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga8f92a104a11fdfcd3c701511313a49e8</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_RUNNABLE_ENQUEUE</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga14e034bba99a99ce9076ea5d0660006f</anchor>
+ <arglist>(self,...)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_RUNNABLE_ENQUEUE_OBJECT</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga913f766dbedd4cb2c6509811ef9624b7</anchor>
+ <arglist>(self, object)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_RUNNABLE_POP_FIRST</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>gab0b5f62ddca1b5ae24f37eadcf817298</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_DECLARE_RUNNABLE</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga814229d43b826a259deef2eefa2e0859</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_runnable_s</type>
+ <name>tsk_runnable_t</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga54eb0f526d3315c9e1da776deeb904a8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_runnable_t *</type>
+ <name>tsk_runnable_create</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga5794a5eaeb3523f697cb7c390a81bc0c</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_runnable_start</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga42877c534be2c2898f3fb82529daa5c4</anchor>
+ <arglist>(tsk_runnable_t *self, const tsk_object_def_t *objdef)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_runnable_set_important</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga90e0d8e4a0de86dc183c9124716afd57</anchor>
+ <arglist>(tsk_runnable_t *self, tsk_bool_t important)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_runnable_stop</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga5b9173b4e6b22204f55f97645acd71e6</anchor>
+ <arglist>(tsk_runnable_t *self)</arglist>
+ </member>
+ <member kind="variable">
+ <type>TSK_BEGIN_DECLS typedef void *(*</type>
+ <name>tsk_runnable_func_run</name>
+ <anchorfile>group__tsk__runnable__group.html</anchorfile>
+ <anchor>ga09f91d68dcb46db4ec35fabf4763aca9</anchor>
+ <arglist>)(void *self)</arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_safeobj_group</name>
+ <title>Helper macros to declare thread-safe objects.</title>
+ <filename>group__tsk__safeobj__group.html</filename>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_DECLARE_SAFEOBJ</name>
+ <anchorfile>group__tsk__safeobj__group.html</anchorfile>
+ <anchor>ga5e04a13107724380914fc704debc7ba6</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_safeobj_init</name>
+ <anchorfile>group__tsk__safeobj__group.html</anchorfile>
+ <anchor>gaf3bd528fb9f712b51238f22485b4ea99</anchor>
+ <arglist>(safeobj)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_safeobj_lock</name>
+ <anchorfile>group__tsk__safeobj__group.html</anchorfile>
+ <anchor>gaf0508810ea6d917b271b75cd97ebabae</anchor>
+ <arglist>(safeobj)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_safeobj_unlock</name>
+ <anchorfile>group__tsk__safeobj__group.html</anchorfile>
+ <anchor>ga2cebbf10ab680b2e13877a3a5bbd2c79</anchor>
+ <arglist>(safeobj)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_safeobj_deinit</name>
+ <anchorfile>group__tsk__safeobj__group.html</anchorfile>
+ <anchor>gacb9211884adce27e6a82dbf0e29668d4</anchor>
+ <arglist>(safeobj)</arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_semaphore_group</name>
+ <title>Pthread/Windows Semaphore functions.</title>
+ <filename>group__tsk__semaphore__group.html</filename>
+ <member kind="function">
+ <type>tsk_semaphore_handle_t *</type>
+ <name>tsk_semaphore_create</name>
+ <anchorfile>group__tsk__semaphore__group.html</anchorfile>
+ <anchor>gac7bb53baa18a1c05e591dcd3ce65261b</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_semaphore_increment</name>
+ <anchorfile>group__tsk__semaphore__group.html</anchorfile>
+ <anchor>gad4043d10db2a71dc1fad5b8a2cc1cb01</anchor>
+ <arglist>(tsk_semaphore_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_semaphore_decrement</name>
+ <anchorfile>group__tsk__semaphore__group.html</anchorfile>
+ <anchor>gaa37790ffbc8c8bd48f973992550be608</anchor>
+ <arglist>(tsk_semaphore_handle_t *handle)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_semaphore_destroy</name>
+ <anchorfile>group__tsk__semaphore__group.html</anchorfile>
+ <anchor>ga87e5957481afc5974747cf08e3688aa9</anchor>
+ <arglist>(tsk_semaphore_handle_t **handle)</arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_sha1_group</name>
+ <title>SHA1 (RFC 3174) utility functions.</title>
+ <filename>group__tsk__sha1__group.html</filename>
+ <class kind="struct">tsk_sha1context_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>SHA1CircularShift</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>gac351d89c022d1b36e6e1d6b8ef5a080d</anchor>
+ <arglist>(bits, word)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_SHA1_DIGEST_SIZE</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>gadc925efe2ee6ed28ae917a927881273c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_SHA1_BLOCK_SIZE</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ga13985728d69be839b3873e829c58e885</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_SHA1_STRING_SIZE</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>gac4bd0a2dca1b7466456a46cfb7b8fd42</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_SHA1_DIGEST_CALC</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ga834074aea3007c47f8a13ebc25cb5003</anchor>
+ <arglist>(input, input_size, digest)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>TSK_BEGIN_DECLS enum tsk_sha1_errcode_e</type>
+ <name>tsk_sha1_errcode_t</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ga7e2cdbb9d5d397c1facb9e777b05037a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_sha1context_s</type>
+ <name>tsk_sha1context_t</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>gac28d8dfc7802526782492867b3a3d8cb</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="enumeration">
+ <name>tsk_sha1_errcode_e</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>gac8abdcb08ff7633e4618440c0e7d85c9</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="enumvalue">
+ <name>shaSuccess</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ggac8abdcb08ff7633e4618440c0e7d85c9a581d05c0e86b0ca3a00c6e24ea81b3fa</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="enumvalue">
+ <name>shaNull</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ggac8abdcb08ff7633e4618440c0e7d85c9ae801efd0a808fb77467a5bdf8ad5ee70</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="enumvalue">
+ <name>shaInputTooLong</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ggac8abdcb08ff7633e4618440c0e7d85c9a383493bb8927060f349e11f915cbb636</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="enumvalue">
+ <name>shaStateError</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ggac8abdcb08ff7633e4618440c0e7d85c9af95bed729cc00460585fb8d76f0c384d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_sha1_errcode_t</type>
+ <name>tsk_sha1reset</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ga571a885d5e57b63861936f8f8b89c26f</anchor>
+ <arglist>(tsk_sha1context_t *context)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_sha1_errcode_t</type>
+ <name>tsk_sha1result</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>gabb49e548a020477187b1edacada69287</anchor>
+ <arglist>(tsk_sha1context_t *context, tsk_sha1digest_t Message_Digest)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_sha1_errcode_t</type>
+ <name>tsk_sha1input</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>gaba598c7c2bd12c5e40a5b9f51b64e599</anchor>
+ <arglist>(tsk_sha1context_t *context, const uint8_t *message_array, unsigned length)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>SHA1ProcessMessageBlock</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ga806117aa3f48006f44fe6f5c5d7e5b22</anchor>
+ <arglist>(tsk_sha1context_t *)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>SHA1PadMessage</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ga4fb3a1a10bd34aa315a502a5f2879fe5</anchor>
+ <arglist>(tsk_sha1context_t *)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_sha1final</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ga354a016997a0d24bba246a5fd0174beb</anchor>
+ <arglist>(uint8_t *Message_Digest, tsk_sha1context_t *context)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_sha1_errcode_t</type>
+ <name>tsk_sha1compute</name>
+ <anchorfile>group__tsk__sha1__group.html</anchorfile>
+ <anchor>ga28e5fc9335018d092f374abd63f5eb21</anchor>
+ <arglist>(const char *input, tsk_size_t size, tsk_sha1string_t *result)</arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_string_group</name>
+ <title>String utillity functions.</title>
+ <filename>group__tsk__string__group.html</filename>
+ <class kind="struct">tsk_string_s</class>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_STRING_STR</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga8c7fc07364fb87c06584c3037ffd594b</anchor>
+ <arglist>(self)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_strtrim_both</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga482e4555a6e17ab83c22042b07f6e1b8</anchor>
+ <arglist>(str)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_strempty</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gae9ed5b44ed07ea46a231affdc52fbe41</anchor>
+ <arglist>(s)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_striequals</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga5b2ce06e1383d689d5aef413f37722a2</anchor>
+ <arglist>(s1, s2)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_strniequals</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga61da50505d310538f221794122c602c3</anchor>
+ <arglist>(s1, s2, n)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_strequals</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga7cbbc03bb73b24dd12b5f57ab9d4cdcb</anchor>
+ <arglist>(s1, s2)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_strnequals</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga3f694752bc1c8a061a042e513d9d1c8c</anchor>
+ <arglist>(s1, s2, n)</arglist>
+ </member>
+ <member kind="typedef">
+ <type>struct tsk_string_s</type>
+ <name>tsk_string_t</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga6dc529c45ed7d2ea554ba07de0bf87fc</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_string_t *</type>
+ <name>tsk_string_create</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gacb654b2c66d38d6ce2e357283de39955</anchor>
+ <arglist>(const char *str)</arglist>
+ </member>
+ <member kind="function">
+ <type>char</type>
+ <name>tsk_b10tob16</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga7b23d5e04afdda3d08db1568561a9980</anchor>
+ <arglist>(char c)</arglist>
+ </member>
+ <member kind="function">
+ <type>char</type>
+ <name>tsk_b16tob10</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga68936738389a2f95add8714258053317</anchor>
+ <arglist>(char c)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_stricmp</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga73ba2ee5fdc7914bc770f53ab2c73ac5</anchor>
+ <arglist>(const char *str1, const char *str2)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_strnicmp</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gacecd370153236fcc0c8d15612f14d87f</anchor>
+ <arglist>(const char *str1, const char *str2, tsk_size_t n)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_strcmp</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gae2480bf4fa6f6e4f207d476467c93efb</anchor>
+ <arglist>(const char *str1, const char *str2)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_strncmp</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gacd9d33ff7ec1f6c0605c98c6f7259610</anchor>
+ <arglist>(const char *str1, const char *str2, tsk_size_t n)</arglist>
+ </member>
+ <member kind="function">
+ <type>char *</type>
+ <name>tsk_strdup</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gaddd214bef41ba50555daba97e751cebf</anchor>
+ <arglist>(const char *s1)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_bool_t</type>
+ <name>tsk_strcontains</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga76413189f0bb8ad77c45d790c0c9c27a</anchor>
+ <arglist>(const char *str, tsk_size_t size, const char *substring)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_strindexOf</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga1137a35a92d8c373caec60bdebf62013</anchor>
+ <arglist>(const char *str, tsk_size_t size, const char *substring)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_strLastIndexOf</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gafd2d8ae98f3829567bb06ca2dd8da628</anchor>
+ <arglist>(const char *str, tsk_size_t size, const char *substring)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strcat</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gaf5d322130a46686000f1495201900285</anchor>
+ <arglist>(char **destination, const char *source)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strcat_2</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gaa8baf82bbc92676188500efb083bf91d</anchor>
+ <arglist>(char **destination, const char *format,...)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strncat</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga9818047196872f81e3478ef297c9ba88</anchor>
+ <arglist>(char **destination, const char *source, tsk_size_t n)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_sprintf</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga511a3cffbc2ed0139e875b857168143a</anchor>
+ <arglist>(char **str, const char *format,...)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_sprintf_2</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga77e7241f6955651bf6a1758a5c7b4d45</anchor>
+ <arglist>(char **str, const char *format, va_list *ap)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strupdate</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga3eb59d8370b5e1c393023856b3967b14</anchor>
+ <arglist>(char **str, const char *newval)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strtrim_left</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga66c595dc75c3cb8667b270d676148dd4</anchor>
+ <arglist>(char **str)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strtrim_right</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gad378af9a4b98b799a1ec208cc3961913</anchor>
+ <arglist>(char **str)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strtrim</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gaed7321cf4459dca45ea7000ad9b02df3</anchor>
+ <arglist>(char **str)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strquote</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gae13ac415b2b77aac738aa02c8d4394a7</anchor>
+ <arglist>(char **str)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strquote_2</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga304c5e49f5887284cfd6139781608a0f</anchor>
+ <arglist>(char **str, char lquote, char rquote)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strunquote</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gaf18615bea8031ae123b00d263d67447c</anchor>
+ <arglist>(char **str)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strunquote_2</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gab22896e63325d6f5c90c29611a12f581</anchor>
+ <arglist>(char **str, char lquote, char rquote)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_itoa</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga3cd07b7c25d5679bafa0b713e88ac13e</anchor>
+ <arglist>(int64_t i, tsk_istr_t *result)</arglist>
+ </member>
+ <member kind="function">
+ <type>int64_t</type>
+ <name>tsk_atoll</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga95b50270702b00c5c4eb8209f80266c5</anchor>
+ <arglist>(const char *str)</arglist>
+ </member>
+ <member kind="function">
+ <type>long</type>
+ <name>tsk_atox</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gac826f5cf2a464799101be484a48f3c29</anchor>
+ <arglist>(const char *str)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_strrandom</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gaf2604da73445cfaf349f630b62041eeb</anchor>
+ <arglist>(tsk_istr_t *result)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_str_from_hex</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>gaf36af7e0b8741535145d271d6bdc8edd</anchor>
+ <arglist>(const uint8_t *hex, tsk_size_t size, char *str)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_str_to_hex</name>
+ <anchorfile>group__tsk__string__group.html</anchorfile>
+ <anchor>ga4181f7cbd67e3a6465e3e1ca69f10175</anchor>
+ <arglist>(const char *str, tsk_size_t size, uint8_t *hex)</arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_thread_group</name>
+ <title>Utility functions for threading.</title>
+ <filename>group__tsk__thread__group.html</filename>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_thread_sleep</name>
+ <anchorfile>group__tsk__thread__group.html</anchorfile>
+ <anchor>ga4ac2a1fa762ccea7b2636f946168595c</anchor>
+ <arglist>(uint64_t ms)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_thread_create</name>
+ <anchorfile>group__tsk__thread__group.html</anchorfile>
+ <anchor>ga27d60d0e9f4e1cd4cd75866ddb76d400</anchor>
+ <arglist>(void **tid, void *(*start)(void *), void *arg)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_thread_join</name>
+ <anchorfile>group__tsk__thread__group.html</anchorfile>
+ <anchor>gaef9e89a97f56887ffee9132c54e480bb</anchor>
+ <arglist>(void **tid)</arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_time_group</name>
+ <title>Datetime functions.</title>
+ <filename>group__tsk__time__group.html</filename>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_TIME_S_2_MS</name>
+ <anchorfile>group__tsk__time__group.html</anchorfile>
+ <anchor>ga31aff3abba18fe3ec60ab7d7cc194678</anchor>
+ <arglist>(S)</arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>tsk_time_now</name>
+ <anchorfile>group__tsk__time__group.html</anchorfile>
+ <anchor>ga08190c30f608b1397602ccba62592b09</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_gettimeofday</name>
+ <anchorfile>group__tsk__time__group.html</anchorfile>
+ <anchor>gabad685347be967dcf7fb41ebfb13d634</anchor>
+ <arglist>(struct timeval *tv, struct timezone *tz)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint64_t</type>
+ <name>tsk_time_get_ms</name>
+ <anchorfile>group__tsk__time__group.html</anchorfile>
+ <anchor>ga8a16acf41302b031e38e9e175bc2b671</anchor>
+ <arglist>(struct timeval *tv)</arglist>
+ </member>
+ <member kind="function">
+ <type>uint64_t</type>
+ <name>tsk_time_epoch</name>
+ <anchorfile>group__tsk__time__group.html</anchorfile>
+ <anchor>ga594d612836a2d6c3868d2d4da0db2f66</anchor>
+ <arglist>()</arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_timer_group</name>
+ <title>Timers Management</title>
+ <filename>group__tsk__timer__group.html</filename>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_INVALID_TIMER_ID</name>
+ <anchorfile>group__tsk__timer__group.html</anchorfile>
+ <anchor>ga5468eccb629e7157cc4892da5b7065cd</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>TSK_TIMER_ID_IS_VALID</name>
+ <anchorfile>group__tsk__timer__group.html</anchorfile>
+ <anchor>ga3342e11fde8654aea74ec029eeaef0cc</anchor>
+ <arglist>(id)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_timer_manager_handle_t *</type>
+ <name>tsk_timer_manager_create</name>
+ <anchorfile>group__tsk__timer__group.html</anchorfile>
+ <anchor>ga998cf3d665df9defe5893af6597d6692</anchor>
+ <arglist>()</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_timer_manager_start</name>
+ <anchorfile>group__tsk__timer__group.html</anchorfile>
+ <anchor>ga25b764d9f2e9baa9ec1560a7f9cc3ba6</anchor>
+ <arglist>(tsk_timer_manager_handle_t *self)</arglist>
+ </member>
+ <member kind="function">
+ <type>void</type>
+ <name>tsk_timer_manager_debug</name>
+ <anchorfile>group__tsk__timer__group.html</anchorfile>
+ <anchor>ga4446ee9ed7b402d69c2661e9c9c30556</anchor>
+ <arglist>(tsk_timer_manager_handle_t *self)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_timer_manager_stop</name>
+ <anchorfile>group__tsk__timer__group.html</anchorfile>
+ <anchor>gab9c05eea4e9e539138d67c9cb74dfe27</anchor>
+ <arglist>(tsk_timer_manager_handle_t *self)</arglist>
+ </member>
+ <member kind="function">
+ <type>tsk_timer_id_t</type>
+ <name>tsk_timer_manager_schedule</name>
+ <anchorfile>group__tsk__timer__group.html</anchorfile>
+ <anchor>ga27ad692cb086ce19b2229c949d06a243</anchor>
+ <arglist>(tsk_timer_manager_handle_t *self, uint64_t timeout, tsk_timer_callback_f callback, const void *arg)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_timer_manager_cancel</name>
+ <anchorfile>group__tsk__timer__group.html</anchorfile>
+ <anchor>gade6889f0963fac562b57ec4cd36fd093</anchor>
+ <arglist>(tsk_timer_manager_handle_t *self, tsk_timer_id_t id)</arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_url_group</name>
+ <title>Utility functions to encode/decode urls.</title>
+ <filename>group__tsk__url__group.html</filename>
+ <member kind="function">
+ <type>char *</type>
+ <name>tsk_url_encode</name>
+ <anchorfile>group__tsk__url__group.html</anchorfile>
+ <anchor>gac0f4125aa7a9ff146e15a210fd3662f8</anchor>
+ <arglist>(const char *url)</arglist>
+ </member>
+ <member kind="function">
+ <type>char *</type>
+ <name>tsk_url_decode</name>
+ <anchorfile>group__tsk__url__group.html</anchorfile>
+ <anchor>ga0342c2b49f0df12c3022ede2b4fcde00</anchor>
+ <arglist>(const char *url)</arglist>
+ </member>
+ </compound>
+ <compound kind="group">
+ <name>tsk_uuid_group</name>
+ <title>niversally Unique Identifier (UUID version 5) implementation (RFC 4122).</title>
+ <filename>group__tsk__uuid__group.html</filename>
+ <member kind="function">
+ <type>int</type>
+ <name>tsk_uuidgenerate</name>
+ <anchorfile>group__tsk__uuid__group.html</anchorfile>
+ <anchor>gabeb07ebd52db8d125f9db70f91c225f3</anchor>
+ <arglist>(tsk_uuidstring_t *result)</arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tsk_buffer_s</name>
+ <filename>structtsk__buffer__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtsk__buffer__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>void *</type>
+ <name>data</name>
+ <anchorfile>structtsk__buffer__s.html</anchorfile>
+ <anchor>a735984d41155bc1032e09bece8f8d66d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_size_t</type>
+ <name>size</name>
+ <anchorfile>structtsk__buffer__s.html</anchorfile>
+ <anchor>a2af13611e30c0884ab2e1837c4da8282</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tsk_condwait_s</name>
+ <filename>structtsk__condwait__s.html</filename>
+ <member kind="variable">
+ <type>CONDWAIT_T</type>
+ <name>pcond</name>
+ <anchorfile>structtsk__condwait__s.html</anchorfile>
+ <anchor>a5419c491903fbd5f1174dde0c94d20c7</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_mutex_handle_t *</type>
+ <name>mutex</name>
+ <anchorfile>structtsk__condwait__s.html</anchorfile>
+ <anchor>a75804a8f2578b8cb7ae4a31363046a51</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tsk_fsm_entry_s</name>
+ <filename>structtsk__fsm__entry__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtsk__fsm__entry__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_fsm_state_id</type>
+ <name>from</name>
+ <anchorfile>structtsk__fsm__entry__s.html</anchorfile>
+ <anchor>aecb9dfad8fbe35d3a8f6348766630555</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_fsm_action_id</type>
+ <name>action</name>
+ <anchorfile>structtsk__fsm__entry__s.html</anchorfile>
+ <anchor>a657bc2dc0d86f496490c74deabcd482b</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_fsm_cond</type>
+ <name>cond</name>
+ <anchorfile>structtsk__fsm__entry__s.html</anchorfile>
+ <anchor>ac8fd20965a268c5a241e83ef4144b0ed</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_fsm_state_id</type>
+ <name>to</name>
+ <anchorfile>structtsk__fsm__entry__s.html</anchorfile>
+ <anchor>a6071d04030888591894bf6f0d9b99da1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_fsm_exec</type>
+ <name>exec</name>
+ <anchorfile>structtsk__fsm__entry__s.html</anchorfile>
+ <anchor>a1b5309b503e797f4e7017c5c258f7107</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>const char *</type>
+ <name>desc</name>
+ <anchorfile>structtsk__fsm__entry__s.html</anchorfile>
+ <anchor>a710bce51374aba96ab04912897666c35</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tsk_fsm_s</name>
+ <filename>structtsk__fsm__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtsk__fsm__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>unsigned</type>
+ <name>debug</name>
+ <anchorfile>structtsk__fsm__s.html</anchorfile>
+ <anchor>a594e27967c4107638182cebabf4249b1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_fsm_state_id</type>
+ <name>current</name>
+ <anchorfile>structtsk__fsm__s.html</anchorfile>
+ <anchor>a4b7a1afeb76347fed87156c153196588</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_fsm_state_id</type>
+ <name>term</name>
+ <anchorfile>structtsk__fsm__s.html</anchorfile>
+ <anchor>aa1aded1b526e4c420fa7438c114bba20</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_fsm_entries_L_t *</type>
+ <name>entries</name>
+ <anchorfile>structtsk__fsm__s.html</anchorfile>
+ <anchor>a8a5f72877fefda42e05ba96bc6dd2f72</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_fsm_onterminated_f</type>
+ <name>callback_term</name>
+ <anchorfile>structtsk__fsm__s.html</anchorfile>
+ <anchor>acd217b4cb125852391ae16854eff11a5</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>const void *</type>
+ <name>callback_data</name>
+ <anchorfile>structtsk__fsm__s.html</anchorfile>
+ <anchor>a7322346207ed833d5550334332388ff9</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_SAFEOBJ</name>
+ <anchorfile>structtsk__fsm__s.html</anchorfile>
+ <anchor>a9818e976fd73889027b42c32d628169f</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tsk_list_item_s</name>
+ <filename>structtsk__list__item__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtsk__list__item__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>void *</type>
+ <name>data</name>
+ <anchorfile>structtsk__list__item__s.html</anchorfile>
+ <anchor>a735984d41155bc1032e09bece8f8d66d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>struct tsk_list_item_s *</type>
+ <name>next</name>
+ <anchorfile>structtsk__list__item__s.html</anchorfile>
+ <anchor>a3c3affb8c8024169c319f1cbba474bc8</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tsk_list_s</name>
+ <filename>structtsk__list__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtsk__list__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_list_item_t *</type>
+ <name>head</name>
+ <anchorfile>structtsk__list__s.html</anchorfile>
+ <anchor>a218d928d79886d95b59a95b740aa0e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_list_item_t *</type>
+ <name>tail</name>
+ <anchorfile>structtsk__list__s.html</anchorfile>
+ <anchor>a960af17e3d10446534d32462474e9f35</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_mutex_handle_t *</type>
+ <name>mutex</name>
+ <anchorfile>structtsk__list__s.html</anchorfile>
+ <anchor>a75804a8f2578b8cb7ae4a31363046a51</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tsk_md5context_s</name>
+ <filename>structtsk__md5context__s.html</filename>
+ <member kind="variable">
+ <type>uint32_t</type>
+ <name>buf</name>
+ <anchorfile>structtsk__md5context__s.html</anchorfile>
+ <anchor>a2737f0163c1fbfc3879949db68f6fdee</anchor>
+ <arglist>[4]</arglist>
+ </member>
+ <member kind="variable">
+ <type>uint32_t</type>
+ <name>bytes</name>
+ <anchorfile>structtsk__md5context__s.html</anchorfile>
+ <anchor>abd48ce708149fa5d9de92706af6eea32</anchor>
+ <arglist>[2]</arglist>
+ </member>
+ <member kind="variable">
+ <type>uint32_t</type>
+ <name>in</name>
+ <anchorfile>structtsk__md5context__s.html</anchorfile>
+ <anchor>a3b14dc2db76db33d38949d7a30abf935</anchor>
+ <arglist>[16]</arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tsk_object_def_s</name>
+ <filename>structtsk__object__def__s.html</filename>
+ <member kind="variable">
+ <type>tsk_size_t</type>
+ <name>size</name>
+ <anchorfile>structtsk__object__def__s.html</anchorfile>
+ <anchor>a2af13611e30c0884ab2e1837c4da8282</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_object_t *(*</type>
+ <name>constructor</name>
+ <anchorfile>structtsk__object__def__s.html</anchorfile>
+ <anchor>abcb503a9230afd7767e3c4ab307d3c99</anchor>
+ <arglist>)(tsk_object_t *, va_list *)</arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_object_t *(*</type>
+ <name>destructor</name>
+ <anchorfile>structtsk__object__def__s.html</anchorfile>
+ <anchor>aa4bf0e0658dea6f0e025aaed27b0546e</anchor>
+ <arglist>)(tsk_object_t *)</arglist>
+ </member>
+ <member kind="variable">
+ <type>int(*</type>
+ <name>comparator</name>
+ <anchorfile>structtsk__object__def__s.html</anchorfile>
+ <anchor>a0824a6ffaa1bd6ba839f9a62a145a3d6</anchor>
+ <arglist>)(const tsk_object_t *, const tsk_object_t *)</arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tsk_object_header_s</name>
+ <filename>structtsk__object__header__s.html</filename>
+ <member kind="variable">
+ <type>const void *</type>
+ <name>base</name>
+ <anchorfile>structtsk__object__header__s.html</anchorfile>
+ <anchor>a908126d45ae4ed5e87e37373a74fbef7</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>refCount</name>
+ <anchorfile>structtsk__object__header__s.html</anchorfile>
+ <anchor>a43ab0d8eafd71383b2233bdee65911de</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tsk_option_s</name>
+ <filename>structtsk__option__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtsk__option__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int</type>
+ <name>id</name>
+ <anchorfile>structtsk__option__s.html</anchorfile>
+ <anchor>a7441ef0865bcb3db9b8064dd7375c1ea</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>char *</type>
+ <name>value</name>
+ <anchorfile>structtsk__option__s.html</anchorfile>
+ <anchor>a4e9aec275e566b978a3ccb4e043d8c61</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_bool_t</type>
+ <name>tag</name>
+ <anchorfile>structtsk__option__s.html</anchorfile>
+ <anchor>aaa2611208b8b4033e9d78cdf6c87a299</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tsk_param_s</name>
+ <filename>structtsk__param__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtsk__param__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>char *</type>
+ <name>name</name>
+ <anchorfile>structtsk__param__s.html</anchorfile>
+ <anchor>a5ac083a645d964373f022d03df4849c8</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>char *</type>
+ <name>value</name>
+ <anchorfile>structtsk__param__s.html</anchorfile>
+ <anchor>a4e9aec275e566b978a3ccb4e043d8c61</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_bool_t</type>
+ <name>tag</name>
+ <anchorfile>structtsk__param__s.html</anchorfile>
+ <anchor>aaa2611208b8b4033e9d78cdf6c87a299</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tsk_ragel_state_s</name>
+ <filename>structtsk__ragel__state__s.html</filename>
+ <member kind="variable">
+ <type>int</type>
+ <name>cs</name>
+ <anchorfile>structtsk__ragel__state__s.html</anchorfile>
+ <anchor>ad35c7ed2784f4fb57849237ce534f17e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>const char *</type>
+ <name>p</name>
+ <anchorfile>structtsk__ragel__state__s.html</anchorfile>
+ <anchor>a6bc6b007533335efe02bafff799ec64c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>const char *</type>
+ <name>pe</name>
+ <anchorfile>structtsk__ragel__state__s.html</anchorfile>
+ <anchor>aed4ec7fae8821de2ec6d9f2db5511c20</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>const char *</type>
+ <name>eof</name>
+ <anchorfile>structtsk__ragel__state__s.html</anchorfile>
+ <anchor>a75fb639539041217d3e792d7d64713e9</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>const char *</type>
+ <name>tag_start</name>
+ <anchorfile>structtsk__ragel__state__s.html</anchorfile>
+ <anchor>a8e3477750bf542745956fdc62ff753e2</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>const char *</type>
+ <name>tag_end</name>
+ <anchorfile>structtsk__ragel__state__s.html</anchorfile>
+ <anchor>adc91826402a18d0cc403af28e03d5bde</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tsk_runnable_s</name>
+ <filename>structtsk__runnable__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtsk__runnable__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>const tsk_object_def_t *</type>
+ <name>objdef</name>
+ <anchorfile>structtsk__runnable__s.html</anchorfile>
+ <anchor>adc7efed98b5fe8d22395cfc23bbc170e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>void *</type>
+ <name>tid</name>
+ <anchorfile>structtsk__runnable__s.html</anchorfile>
+ <anchor>ae908d0f51ff36bfdcea4cbee5759a47d</anchor>
+ <arglist>[1]</arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_runnable_func_run</type>
+ <name>run</name>
+ <anchorfile>structtsk__runnable__s.html</anchorfile>
+ <anchor>a5eab70f61ae9b34fa82f804ccda94ce9</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_semaphore_handle_t *</type>
+ <name>semaphore</name>
+ <anchorfile>structtsk__runnable__s.html</anchorfile>
+ <anchor>a498393bec86bea74b3ce678f5022c608</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_bool_t</type>
+ <name>running</name>
+ <anchorfile>structtsk__runnable__s.html</anchorfile>
+ <anchor>aa0199ca7619b90647ac6abcfcd1b2288</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_bool_t</type>
+ <name>started</name>
+ <anchorfile>structtsk__runnable__s.html</anchorfile>
+ <anchor>a3e87319b1ebccbd0529514c298ec4fe2</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_bool_t</type>
+ <name>initialized</name>
+ <anchorfile>structtsk__runnable__s.html</anchorfile>
+ <anchor>adfdbb2f146565c87384f0090dba7a73e</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_bool_t</type>
+ <name>important</name>
+ <anchorfile>structtsk__runnable__s.html</anchorfile>
+ <anchor>abbf5761944a79a6439e4aa8da5770d1d</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_list_t *</type>
+ <name>objects</name>
+ <anchorfile>structtsk__runnable__s.html</anchorfile>
+ <anchor>a731ff42f111e23b8af025e43fbcd017e</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tsk_sha1context_s</name>
+ <filename>structtsk__sha1context__s.html</filename>
+ <member kind="variable">
+ <type>uint32_t</type>
+ <name>Intermediate_Hash</name>
+ <anchorfile>structtsk__sha1context__s.html</anchorfile>
+ <anchor>a8bbeb94025d9184496faac85cdee00a5</anchor>
+ <arglist>[TSK_SHA1_DIGEST_SIZE/4]</arglist>
+ </member>
+ <member kind="variable">
+ <type>uint32_t</type>
+ <name>Length_Low</name>
+ <anchorfile>structtsk__sha1context__s.html</anchorfile>
+ <anchor>a188eef03938236a9a58c9382166aa002</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint32_t</type>
+ <name>Length_High</name>
+ <anchorfile>structtsk__sha1context__s.html</anchorfile>
+ <anchor>a73f82f23d8acae6d67b249511811d654</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int_least16_t</type>
+ <name>Message_Block_Index</name>
+ <anchorfile>structtsk__sha1context__s.html</anchorfile>
+ <anchor>ad7bf01bcc0244679564a37f2c25ffc8c</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint8_t</type>
+ <name>Message_Block</name>
+ <anchorfile>structtsk__sha1context__s.html</anchorfile>
+ <anchor>a33d55b1ff652119922a5edbcba624e57</anchor>
+ <arglist>[64]</arglist>
+ </member>
+ <member kind="variable">
+ <type>int32_t</type>
+ <name>Computed</name>
+ <anchorfile>structtsk__sha1context__s.html</anchorfile>
+ <anchor>afbf8c471e82ae3513869e67dce2b53c3</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>int32_t</type>
+ <name>Corrupted</name>
+ <anchorfile>structtsk__sha1context__s.html</anchorfile>
+ <anchor>aef09368c3204e428aca54ed11fdd82da</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tsk_string_s</name>
+ <filename>structtsk__string__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtsk__string__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>char *</type>
+ <name>value</name>
+ <anchorfile>structtsk__string__s.html</anchorfile>
+ <anchor>a4e9aec275e566b978a3ccb4e043d8c61</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tsk_timer_manager_s</name>
+ <filename>structtsk__timer__manager__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_RUNNABLE</name>
+ <anchorfile>structtsk__timer__manager__s.html</anchorfile>
+ <anchor>ae8fba71ac54cd6376ba9e5ed1cc87cf3</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>void *</type>
+ <name>mainThreadId</name>
+ <anchorfile>structtsk__timer__manager__s.html</anchorfile>
+ <anchor>a6588fc232f5001c84152098b2fe7695a</anchor>
+ <arglist>[1]</arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_condwait_handle_t *</type>
+ <name>condwait</name>
+ <anchorfile>structtsk__timer__manager__s.html</anchorfile>
+ <anchor>a919c4dbf93b96de0106c141b382f26ba</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_mutex_handle_t *</type>
+ <name>mutex</name>
+ <anchorfile>structtsk__timer__manager__s.html</anchorfile>
+ <anchor>a75804a8f2578b8cb7ae4a31363046a51</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_semaphore_handle_t *</type>
+ <name>sem</name>
+ <anchorfile>structtsk__timer__manager__s.html</anchorfile>
+ <anchor>a94083a7242c72c0c595d2a448927b4bc</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_timers_L_t *</type>
+ <name>timers</name>
+ <anchorfile>structtsk__timer__manager__s.html</anchorfile>
+ <anchor>aa5b6a51d70bb0efbd6515c3c7b002607</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
+ <name>tsk_timer_s</name>
+ <filename>structtsk__timer__s.html</filename>
+ <member kind="variable">
+ <type></type>
+ <name>TSK_DECLARE_OBJECT</name>
+ <anchorfile>structtsk__timer__s.html</anchorfile>
+ <anchor>a6cb2c811d40d14ceb34bd3b2e7dc5e6a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_timer_id_t</type>
+ <name>id</name>
+ <anchorfile>structtsk__timer__s.html</anchorfile>
+ <anchor>a0c07338b31dffeba7935747bbeb7626a</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>const void *</type>
+ <name>arg</name>
+ <anchorfile>structtsk__timer__s.html</anchorfile>
+ <anchor>a9b61c541ca9c2bf26364570c4d0cb2a6</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>uint64_t</type>
+ <name>timeout</name>
+ <anchorfile>structtsk__timer__s.html</anchorfile>
+ <anchor>a053cdea1d85795444fe1aaa6b277a0ec</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>tsk_timer_callback_f</type>
+ <name>callback</name>
+ <anchorfile>structtsk__timer__s.html</anchorfile>
+ <anchor>abedab38285c6411265cd8fcee7ae9f86</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>unsigned</type>
+ <name>canceled</name>
+ <anchorfile>structtsk__timer__s.html</anchorfile>
+ <anchor>a867d2252cbe37e717dfa59b4a510946f</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+</tagfile>
diff --git a/tinySAK/tinySAK.vcproj b/tinySAK/tinySAK.vcproj
new file mode 100644
index 0000000..7ce47c7
--- /dev/null
+++ b/tinySAK/tinySAK.vcproj
@@ -0,0 +1,888 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="tinySAK"
+ ProjectGUID="{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}"
+ RootNamespace="tinySAK"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;..\thirdparties\win32\include&quot;"
+ PreprocessorDefinitions="DEBUG_LEVEL=DEBUG_LEVEL_INFO;WIN32;_DEBUG;_WINDOWS;_USRDLL;TINYSAK_EXPORTS;_WIN32_WINNT=0x0501"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ DisableLanguageExtensions="false"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ WarnAsError="true"
+ DebugInformationFormat="4"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Winmm.lib $(NOINHERIT)"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+ OutputDirectory="&quot;$(SolutionDir)$(ConfigurationName)\wce&quot;"
+ IntermediateDirectory="&quot;$(SolutionDir)$(ConfigurationName)&quot;"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="1"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ ExecutionBucket="7"
+ AdditionalIncludeDirectories="$(DOUBANGO_HOME)\thirdparties\wince\include"
+ PreprocessorDefinitions="DEBUG_LEVEL=DEBUG_LEVEL_INFO;TINYSAK_EXPORTS;_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_)"
+ MinimalRebuild="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ WarnAsError="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
+ AdditionalDependencies="ws2.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="8"
+ TargetMachine="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCCodeSignTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <DeploymentTool
+ ForceDirty="-1"
+ RemoteDirectory="%CSIDL_PROGRAM_FILES%\test"
+ RegisterOutput="0"
+ AdditionalFiles=""
+ />
+ <DebuggerTool
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="false"
+ AdditionalIncludeDirectories="&quot;..\thirdparties\win32\include&quot;"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_WIN32_WINNT=0x0501;TINYSAK_EXPORTS"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="false"
+ DisableLanguageExtensions="false"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ WarnAsError="true"
+ DebugInformationFormat="0"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Winmm.lib $(NOINHERIT)"
+ LinkIncremental="1"
+ IgnoreDefaultLibraryNames="MSVCRTD"
+ GenerateDebugInformation="false"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+ OutputDirectory="&quot;$(SolutionDir)$(ConfigurationName)\wce&quot;"
+ IntermediateDirectory="&quot;$(SolutionDir)$(ConfigurationName)&quot;"
+ ConfigurationType="2"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="1"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ ExecutionBucket="7"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;TINYSAK_EXPORTS"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ WarnAsError="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="8"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCCodeSignTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <DeploymentTool
+ ForceDirty="-1"
+ RemoteDirectory=""
+ RegisterOutput="0"
+ AdditionalFiles=""
+ />
+ <DebuggerTool
+ />
+ </Configuration>
+ <Configuration
+ Name="Static_Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;..\thirdparties\win32\include&quot;"
+ PreprocessorDefinitions="DEBUG_LEVEL=DEBUG_LEVEL_INFO;WIN32;_DEBUG;_WINDOWS;_USRDLL;TINYSAK_EXPORTS;_WIN32_WINNT=0x0501"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ DisableLanguageExtensions="false"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ WarnAsError="true"
+ DebugInformationFormat="4"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="$(NOINHERIT)"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+ OutputDirectory="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\$(ConfigurationName)"
+ IntermediateDirectory="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="1"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ ExecutionBucket="7"
+ AdditionalIncludeDirectories="$(DOUBANGO_HOME)\thirdparties\wince\include"
+ PreprocessorDefinitions="DEBUG_LEVEL=DEBUG_LEVEL_INFO;TINYSAK_EXPORTS;_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_)"
+ MinimalRebuild="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ WarnAsError="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
+ AdditionalDependencies="ws2.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="8"
+ TargetMachine="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCCodeSignTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <DeploymentTool
+ ForceDirty="-1"
+ RemoteDirectory=""
+ RegisterOutput="0"
+ AdditionalFiles=""
+ />
+ <DebuggerTool
+ />
+ </Configuration>
+ <Configuration
+ Name="Static_Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+ ConfigurationType="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ ExecutionBucket="7"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCCodeSignTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ <DeploymentTool
+ ForceDirty="-1"
+ RemoteDirectory=""
+ RegisterOutput="0"
+ AdditionalFiles=""
+ />
+ <DebuggerTool
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="include(*.h)"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\src\tinysak_config.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_base64.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_binaryutils.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_buffer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_common.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_condwait.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_debug.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_errno.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_fsm.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_heap.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_hmac.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_list.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_md5.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_memory.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_mutex.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_object.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_options.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_params.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_ppfcs16.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_ppfcs32.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_ragel_state.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_runnable.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_safeobj.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_semaphore.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_sha1.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_string.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_thread.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_time.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_timer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_url.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_uuid.h"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_xml.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="source(*.c)"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ <File
+ RelativePath=".\src\tsk.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_base64.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_binaryutils.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_buffer.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_condwait.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_debug.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_fsm.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_hmac.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_list.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_md5.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_memory.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_mutex.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_object.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_options.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_params.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_ppfcs16.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_ppfcs32.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_ragel_state.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_runnable.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_safeobj.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_semaphore.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_sha1.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_string.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_thread.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_time.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_timer.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_url.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_uuid.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\tsk_xml.c"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
OpenPOWER on IntegriCloud