Oliver Smith | 2bdcc8e | 2019-11-20 10:56:35 +0100 | [diff] [blame^] | 1 | /* Copyright 2019 by sysmocom s.f.m.c. GmbH <info@sysmocom.de> |
| 2 | * |
| 3 | * All Rights Reserved |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License along |
| 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
| 19 | #pragma once |
| 20 | |
| 21 | /*! MS lookup fake API for testing purposes. */ |
| 22 | #include <osmocom/mslookup/mslookup_client.h> |
| 23 | |
| 24 | struct osmo_mslookup_fake_response { |
| 25 | struct timeval time_to_reply; |
| 26 | struct osmo_mslookup_id for_id; |
| 27 | const char *for_service; |
| 28 | struct osmo_mslookup_result result; |
| 29 | bool sent; |
| 30 | }; |
| 31 | |
| 32 | struct osmo_mslookup_client_method *osmo_mslookup_client_add_fake(struct osmo_mslookup_client *client, |
| 33 | struct osmo_mslookup_fake_response *responses, |
| 34 | size_t responses_len); |