]> git.ipfire.org Git - location/libloc.git/blame - src/loc/network-list.h
network: Remove deprecated sort call
[location/libloc.git] / src / loc / network-list.h
CommitLineData
e0b9ff5f
MT
1/*
2 libloc - A library to determine the location of someone on the Internet
3
4 Copyright (C) 2020 IPFire Development Team <info@ipfire.org>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15*/
16
17#ifndef LIBLOC_NETWORK_LIST_H
18#define LIBLOC_NETWORK_LIST_H
19
20struct loc_network_list;
21int loc_network_list_new(struct loc_ctx* ctx, struct loc_network_list** list);
22struct loc_network_list* loc_network_list_ref(struct loc_network_list* list);
23struct loc_network_list* loc_network_list_unref(struct loc_network_list* list);
24size_t loc_network_list_size(struct loc_network_list* list);
25int loc_network_list_empty(struct loc_network_list* list);
26void loc_network_list_clear(struct loc_network_list* list);
27void loc_network_list_dump(struct loc_network_list* list);
28struct loc_network* loc_network_list_get(struct loc_network_list* list, size_t index);
29int loc_network_list_push(struct loc_network_list* list, struct loc_network* network);
30struct loc_network* loc_network_list_pop(struct loc_network_list* list);
31struct loc_network* loc_network_list_pop_first(struct loc_network_list* list);
32int loc_network_list_contains(struct loc_network_list* list, struct loc_network* network);
e0b9ff5f
MT
33int loc_network_list_merge(struct loc_network_list* self, struct loc_network_list* other);
34
35#endif