added
[strongswan.git] / src / libstrongswan / utils / fetcher.c
1 /**
2 * @file fetcher.c
3 *
4 * @brief Implementation of fetcher_t.
5 *
6 */
7
8 /*
9 * Copyright (C) 2007 Andreas Steffen
10 * Hochschule fuer Technik Rapperswil
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version. See <fetcher://www.fsf.org/copyleft/gpl.txt>.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 * for more details.
21 */
22
23 #include "fetcher.h"
24
25 typedef struct private_fetcher_t private_fetcher_t;
26
27 /**
28 * @brief Private Data of a h object.
29 */
30 struct private_fetcher_t {
31 /**
32 * Public data
33 */
34 fetcher_t public;
35
36 };
37
38 /**
39 * Implements fetcher_t.get
40 */
41 static chunk_t get(private_fetcher_t *this, chunk_t uri)
42 {
43
44 }
45
46 /**
47 * Implements fetcher_t.destroy
48 */
49 static void destroy(private_fetcher_t *this)
50 {
51 free(this);
52 }
53
54 /*
55 * Described in header.
56 */
57 fetcher_t *fetcher_create(void)
58 {
59 private_fetcher_t *this = malloc_thing(private_fetcher_t);
60
61 /* initialize */
62
63 /* public functions */
64 this->public.get = (chunk_t (*) (fetcher_t*,chunk_t))get;
65 this->public.destroy = (void (*) (fetcher_t*))destroy;
66
67 return &this->public;
68 }