Pechkin is a universal lightweight messaging library
Message exchange in the understanding of Pechkin is a convenient way to exchange data between different units of code: functions, objects (if you work in C++), etc. Initially, I decided to write Pechkin because I was not satisfied with the number of user arguments that can be passed to callback functions in GTK, but you can use sending messages for more prosaic purposes.
Pechkin is a very simple library it consists of a very small set of functions:
-
void pl_send(char *name, void *value, size_t size)
- allows you to send a messagename
- message namevalue
- message contentsize
- message content size
-
void *pl_read(char *msg_name)
- accept messagemsg_name
- message name
-
void pl_free()
- delete all messages -
void pl_remove(char *msg_name)
- delete a messagemsg_name
- message name
-
pl_is_exist(char *msg_name)
- check if such a message existsmsg_name
- message name
-
pl_get_msg_list()
- get a pointer to a list of messages -
pl_set_msg_list(list *new_msg_list)
- change the pointer to the message list
- To start, run the following command:
git clone --recursive https://github.com/Centrix14/pechkin.git
- Next, include the header file in the project:
#include "pechkin/pl.h"
- After that, add the
pechkin/pl.c
file to the source list - That's it, enjoy the library!
by Centrix14 30.10.2021