diff options
| author | Michael Biebl <biebl@debian.org> | 2017-11-07 00:14:39 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2017-11-07 00:14:39 +0100 |
| commit | 90e8691111889a7b5f3c812f5a41f15a8a058913 (patch) | |
| tree | f101a879eca27c34a9bfa5f3da52266b22539a36 /src/nm-multi-index.h | |
| parent | bdb6eeb0670658255c2a4c3c501c0a27fa8cfe55 (diff) | |
New upstream version 1.9.90 upstream/1.9.90
Diffstat (limited to 'src/nm-multi-index.h')
| -rw-r--r-- | src/nm-multi-index.h | 105 |
1 files changed, 0 insertions, 105 deletions
diff --git a/src/nm-multi-index.h b/src/nm-multi-index.h deleted file mode 100644 index fb102574..00000000 --- a/src/nm-multi-index.h +++ /dev/null @@ -1,105 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* NetworkManager -- Network link manager - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Copyright (C) 2015 Red Hat, Inc. - */ - -#ifndef __NM_MULTI_INDEX__ -#define __NM_MULTI_INDEX__ - -typedef struct { - char _dummy; -} NMMultiIndexId; - -typedef struct NMMultiIndex NMMultiIndex; - -typedef struct { - GHashTableIter _iter; - const NMMultiIndex *_index; - gconstpointer _value; -} NMMultiIndexIter; - -typedef struct { - union { - GHashTableIter _iter; - gpointer _value; - }; - guint _state; -} NMMultiIndexIdIter; - -typedef gboolean (*NMMultiIndexFuncEqual) (const NMMultiIndexId *id_a, const NMMultiIndexId *id_b); -typedef guint (*NMMultiIndexFuncHash) (const NMMultiIndexId *id); -typedef NMMultiIndexId *(*NMMultiIndexFuncClone) (const NMMultiIndexId *id); -typedef void (*NMMultiIndexFuncDestroy) (NMMultiIndexId *id); - -typedef gboolean (*NMMultiIndexFuncForeach) (const NMMultiIndexId *id, void *const* values, guint len, gpointer user_data); - - -NMMultiIndex *nm_multi_index_new (NMMultiIndexFuncHash hash_fcn, - NMMultiIndexFuncEqual equal_fcn, - NMMultiIndexFuncClone clone_fcn, - NMMultiIndexFuncDestroy destroy_fcn); - -void nm_multi_index_free (NMMultiIndex *index); - -gboolean nm_multi_index_add (NMMultiIndex *index, - const NMMultiIndexId *id, - gconstpointer value); - -gboolean nm_multi_index_remove (NMMultiIndex *index, - const NMMultiIndexId *id, - gconstpointer value); - -gboolean nm_multi_index_move (NMMultiIndex *index, - const NMMultiIndexId *id_old, - const NMMultiIndexId *id_new, - gconstpointer value); - -guint nm_multi_index_get_num_groups (const NMMultiIndex *index); - -void *const*nm_multi_index_lookup (const NMMultiIndex *index, - const NMMultiIndexId *id, - guint *out_len); - -gboolean nm_multi_index_contains (const NMMultiIndex *index, - const NMMultiIndexId *id, - gconstpointer value); - -const NMMultiIndexId *nm_multi_index_lookup_first_by_value (const NMMultiIndex *index, - gconstpointer value); - -void nm_multi_index_foreach (const NMMultiIndex *index, - gconstpointer value, - NMMultiIndexFuncForeach foreach_func, - gpointer user_data); - -void nm_multi_index_iter_init (NMMultiIndexIter *iter, - const NMMultiIndex *index, - gconstpointer value); -gboolean nm_multi_index_iter_next (NMMultiIndexIter *iter, - const NMMultiIndexId **out_id, - void *const**out_values, - guint *out_len); - -void nm_multi_index_id_iter_init (NMMultiIndexIdIter *iter, - const NMMultiIndex *index, - const NMMultiIndexId *id); -gboolean nm_multi_index_id_iter_next (NMMultiIndexIdIter *iter, - void **out_value); - -#endif /* __NM_MULTI_INDEX__ */ - |