<commit_before>## Libskypekit

Libskypekit is thread-safe C library that provides *synchronous* SkypeKit API for *asynchronous* C++ SkypeKit SDK.

## Description

The goal of Libskypekit is catch all asynchronous callbacks of SkypeKit SDK and push they as events into one queue.

Then regular synchronous application can pull queue, retrieve each event and do own business logic.

Currently implemented events:

* Account status changed
* Chat message received

## Memory management

For each new event Libskypekit dynamically allocates memory for event structure and for event data and then push event into internal events queue. The queue size is only limited by size of operating system available memory.
So after processing certain event you are responsible to free event memory otherwise you will have memory leak. See corresponding API call.

## Dependencies

* SkypeKit SDK 4.x.x

## Building

**Note.** Before build libskypekit you must obtain, unpack and compile SkypeKit SDK first!

    $ git clone <EMAIL>:railsware/libskypekit.git
    $ cd libskypekit   
    $ DEBUG=1 SKYPEKIT_SDK=path/to/compliled/sdk ./build.sh

`DEBUG=1` is optional but gives your opportunity to see what is going in library.

## Issues on x86_64

When you have error like:

    relocation R_X86_64_32S against `vtable for SEClientSession' can not be used when making a shared object; recompile with -fPIC

Try to recompile SDK with `-fPIC` :

    export CC="gcc -fPIC"
    export CXX="g++ -fPIC"
    ./BuildWithCmake.sh

## Installation

To install bin, include, lib files into `/usr/local` just type:

    $ sudo ./install.sh

Probably it's better to create package for your OS and install it via package manager.

## API

See [skypekit.h](https://github.com/railsware/libskypekit/blob/oop/include/skypekit.h).

## Examples

In `examples` directory you may find out how you may use libevent.

Build it with:

    $ ./build_examples.sh

Run ping_pong example:<commit_msg>Fixed README<commit_after>## Libskypekit

Libskypekit is thread-safe C library that provides *synchronous* SkypeKit API for *asynchronous* C++ SkypeKit SDK.

## Description

The goal of Libskypekit is catch all asynchronous callbacks of SkypeKit SDK and push they as events into one queue.

Then regular synchronous application can pull queue, retrieve each event and do own business logic.

Currently implemented events:

* Account status changed
* Chat message received

## Memory management

For each new event Libskypekit dynamically allocates memory for event structure and for event data and then push event into internal events queue. The queue size is only limited by size of operating system available memory.
So after processing certain event you are responsible to free event memory otherwise you will have memory leak. See corresponding API call.

## Dependencies

* SkypeKit SDK 4.x.x

## Building

**Note.** Before build libskypekit you must obtain, unpack and compile SkypeKit SDK first!

    $ git clone <EMAIL>:railsware/libskypekit.git
    $ cd libskypekit   
    $ DEBUG=1 SKYPEKIT_SDK=path/to/compliled/sdk ./build.sh

`DEBUG=1` is optional but gives your opportunity to see what is going in library.

## Issues on x86_64

When you have error like:

    relocation R_X86_64_32S against `vtable for SEClientSession' can not be used when making a shared object; recompile with -fPIC

Try to recompile SDK with `-fPIC` :

    export CC="gcc -fPIC"
    export CXX="g++ -fPIC"
    ./BuildWithCmake.sh

## Installation

To install bin, include, lib files into `/usr/local` just type:

    $ sudo ./install.sh

Probably it's better to create package for your OS and install it via package manager.

## API

See [skypekit.h](https://github.com/railsware/libskypekit/blob/master/include/skypekit.h)

## Examples

In `examples` directory you may find out how you may use libevent.

Build it with:

    $ ./build_examples.sh

Run ping_pong example:
{'fraction_non_alphanumeric': 0.06618962432915922, 'fraction_numerical': 0.006644518272425249, 'mean_word_length': 4.063389391979301, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4750710', 'n_tokens_mistral': 1181, 'n_tokens_neox': 1096, 'n_words': 504}