Skip to content
forked from 42ity/fty-common

core shared code for all fty projects

License

Notifications You must be signed in to change notification settings

boricj/fty-common

 
 

Repository files navigation

fty-common

This is a library providing :

  • Mutual methods and functions that can be used by any fty-agent

How to build

To build the fty-common project run:

./autogen.sh [clean]
./configure
make
make check # to run self-test

How to use Common functions

For agent coded with C++ :

In the main .h file add

#include \<fty_common.h\>

For agents coded with C :

In the main .h file add

#include \<fty_common_base.h\>

List of Available Headers

  • fty_common_agents.h - defines for agent names
  • fty_common_asset_types.h - asset types, subtypes and related functions
  • fty_common_base.h - streq, STR definitions
  • fty_common_filesystem.h - functions for creating directory, checking content of dir, ...
  • fty_common.h - collection of all headers
  • fty_common_json.h - basic JSON parser
  • fty_common_macros.h - contains shared macros
  • fty_common_str_defs.h - definition of strings constants
  • fty_commom_utf8.h - functions for UTF-8 and multiple languages support

How to compile and test projects using fty-common by 42ITy standards

project.xml

Add this block in the project.xml file :

<use project = "fty-common" libname = "libfty_common" header = "fty_common.h"
    repository = "https://github.com/42ity/fty-common.git"
    release = "master"
    test = "fty_commmon_selftest" >

    <use project = "fty-common-logging" libname = "libfty_common_logging" header = "fty_log.h"
        repository = "https://github.com/42ity/fty-common-logging.git"
        release = "master"
        test = "fty_common_logging_selftest" >

        <use project = "log4cplus" header = "log4cplus/logger.h" test = "appender_test"
            repository = "https://github.com/42ity/log4cplus.git"
            release = "1.1.2-FTY-master"
            />
    </use>
</use>

NOTE: The header value must be changed from fty_common.h to fty_common_base.h for a C project.

About

core shared code for all fty projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 52.7%
  • M4 19.7%
  • Shell 13.4%
  • C 11.4%
  • Makefile 2.8%