libnm: add NMUtilsPredicateStr typedef

This will be used for nm_setting_option_clear_by_name(), to
filter based on a name. But it is a general purpose typedef
for a predicate, not tied to NMSetting or option.
This commit is contained in:
Thomas Haller
2020-05-20 15:20:21 +02:00
parent 332cf1ad9d
commit c48bfdf584
2 changed files with 17 additions and 0 deletions

View File

@@ -65,4 +65,7 @@ typedef struct _NMSettingWirelessSecurity NMSettingWirelessSecurity;
typedef struct _NMSettingWpan NMSettingWpan;
typedef struct _NMSimpleConnection NMSimpleConnection;
NM_AVAILABLE_IN_1_26
typedef gboolean (*NMUtilsPredicateStr) (const char *str);
#endif /* __NM_CORE_TYPES_H__ */

View File

@@ -48,6 +48,20 @@
/*****************************************************************************/
/**
* NMUtilsPredicateStr:
* @str: the name to check.
*
* This function takes a string argument and returns either %TRUE or %FALSE.
* It is a general purpose predicate, for example used by nm_setting_option_clear_by_name().
*
* Returns: %TRUE if the predicate function matches.
*
* Since: 1.26
*/
/*****************************************************************************/
struct _NMSockAddrEndpoint {
const char *host;
guint16 port;