libpaf 1.1.13
Loading...
Searching...
No Matches
Typedefs | Enumerations
paf_match.h File Reference

Pathfinder Client Library's Subscription Match-related Data Structure. More...

#include <stdint.h>
#include <sys/types.h>
#include <paf_props.h>

Go to the source code of this file.

Typedefs

typedef void(* paf_match_cb) (enum paf_match_type match_type, int64_t service_id, const struct paf_props *props, void *user)
 

Enumerations

enum  paf_match_type { paf_match_type_appeared , paf_match_type_modified , paf_match_type_disappeared }
 

Detailed Description

Pathfinder Client Library's Subscription Match-related Data Structure.

Typedef Documentation

◆ paf_match_cb

typedef void(* paf_match_cb) (enum paf_match_type match_type, int64_t service_id, const struct paf_props *props, void *user)

Callback to notify the application of matching services.

A subscription callback may not call back into any paf.h core API functions taking the current context as it's input (e.g. paf_subscribe(), paf_unsubscribe() etc). Such calls must be defered to after the callback has returned. Calls to other Pathfinder API functions, for example functions in paf_props.h or paf_value.h may be made.

Parameters
[in]service_idThe service id of the matching service.
[in]propsThe properties of the matching service. NULL for disappeared type matches.
[in]match_typeThe type of match.
[in]userAn application-supplied pointer (see paf_subscribe()).

Enumeration Type Documentation

◆ paf_match_type

Type of subscription match.

Enumerator
paf_match_type_appeared 

A service matched that was previously unseen in this subscription, either because it's newly published, because it had its properties changed in such a way they begun to match this subscriptions's search filter, or because the information about the service's existence hadn't propagated so far as to this context.

paf_match_type_modified 

A service previously seen in this subscription, which have had its properties modified, but in such a way they still matching the subscription filter.

paf_match_type_disappeared 

A service previously seen in this subscription was either unpublished or had its properties changed in such a way it no longer matched the subscription filter.