]> git.ipfire.org Git - people/ms/libloc.git/blame - src/loc/network-list.h
network-list: Include network header
[people/ms/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
8ebf1d39
MT
20#include <loc/network.h>
21
e0b9ff5f
MT
22struct loc_network_list;
23int loc_network_list_new(struct loc_ctx* ctx, struct loc_network_list** list);
24struct loc_network_list* loc_network_list_ref(struct loc_network_list* list);
25struct loc_network_list* loc_network_list_unref(struct loc_network_list* list);
26size_t loc_network_list_size(struct loc_network_list* list);
27int loc_network_list_empty(struct loc_network_list* list);
28void loc_network_list_clear(struct loc_network_list* list);
29void loc_network_list_dump(struct loc_network_list* list);
30struct loc_network* loc_network_list_get(struct loc_network_list* list, size_t index);
31int loc_network_list_push(struct loc_network_list* list, struct loc_network* network);
32struct loc_network* loc_network_list_pop(struct loc_network_list* list);
33struct loc_network* loc_network_list_pop_first(struct loc_network_list* list);
34int loc_network_list_contains(struct loc_network_list* list, struct loc_network* network);
e0b9ff5f
MT
35int loc_network_list_merge(struct loc_network_list* self, struct loc_network_list* other);
36
37#endif