#include <stdlib.h>
#include <pthread.h>
#include "ss_subscribe.h"
#include "structures.h"
#include "utils/check_func.h"
#include "kpi_low.h"
#include "ss_func.h"
#include "utils/util_func.h"
#include "utils/kp_debug.h"
#include "classes.h"
#include <string.h>
#include <bits/waitstatus.h>
#include <unistd.h>
Functions | |
subscription_container_t * | new_subscription_container () |
New subscription container. | |
void | free_subscription_container (subscription_container_t *container) |
Free subscription container. | |
void | set_subscription_container_callback (subscription_container_t *container, void(*func)(subscription_container_t *, list_t *)) |
Sets callback function for subscription. | |
int | add_individual_to_subscription_container (subscription_container_t *container, individual_t *ind, list_t *properties) |
Add individual to subscription. | |
int | wait_subscribe (subscription_container_t *container) |
Wait data from SS for container and update it. | |
int | ss_subscribe_container (subscription_container_t *container, bool is_asynchronous) |
Subscribe container. | |
int | ss_unsubscribe_container (subscription_container_t *container) |
Unsubscribe given container. | |
void | stop_all_subscriptions () |
Stop asynchronous subscribe. Unsubscribe all asynchronous containers and remove all containers from list. |
Lomov A. Alexandr <lomov@cs.karelia.ru>
PetrSU KP Library 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 PetrSU KP Library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
int add_individual_to_subscription_container | ( | subscription_container_t * | container, | |
individual_t * | ind, | |||
list_t * | properties | |||
) |
Add individual to subscription.
ind | individual. | |
properties | list of properties for subscribe or NULL for all properties. |
void free_subscription_container | ( | subscription_container_t * | container | ) |
Free subscription container.
Free subscription container structure. Also free subscription's data structures, individual and properties not freed, only list structure of properties.
container | subscription container for free. |
subscription_container_t* new_subscription_container | ( | ) |
New subscription container.
void set_subscription_container_callback | ( | subscription_container_t * | container, | |
void(*)(subscription_container_t *, list_t *) | func | |||
) |
Sets callback function for subscription.
This functions call then some properties changed in container.
container | subscription container. | |
reference | to callback function. |
int ss_subscribe_container | ( | subscription_container_t * | container, | |
bool | is_asynchronous | |||
) |
Subscribe container.
container | subscription container for subscribe. | |
is_asynchronous | sibscription mode (true - async, false - sync). |
int ss_unsubscribe_container | ( | subscription_container_t * | container | ) |
Unsubscribe given container.
container | subscription container for unsubscribe. |
void stop_all_subscriptions | ( | ) |
Stop asynchronous subscribe. Unsubscribe all asynchronous containers and remove all containers from list.
int wait_subscribe | ( | subscription_container_t * | container | ) |
Wait data from SS for container and update it.
container | subscription container. |