]> git.ipfire.org Git - thirdparty/strongswan.git/blame - src/libcharon/plugins/stroke/stroke_config.h
Update copyright headers after acquisition by secunet
[thirdparty/strongswan.git] / src / libcharon / plugins / stroke / stroke_config.h
CommitLineData
0b14fdb9 1/*
9f1b303a 2 * Copyright (C) 2012 Tobias Brunner
0b14fdb9 3 * Copyright (C) 2008 Martin Willi
19ef2aec
TB
4 *
5 * Copyright (C) secunet Security Networks AG
0b14fdb9
MW
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * for more details.
0b14fdb9
MW
16 */
17
18/**
19 * @defgroup stroke_config stroke_config
20 * @{ @ingroup stroke
21 */
22
23#ifndef STROKE_CONFIG_H_
24#define STROKE_CONFIG_H_
25
26#include <config/backend.h>
27#include <stroke_msg.h>
6439267a 28#include "stroke_ca.h"
0b14fdb9 29#include "stroke_cred.h"
96c2b3cf 30#include "stroke_attribute.h"
0b14fdb9
MW
31
32typedef struct stroke_config_t stroke_config_t;
33
34/**
35 * Stroke in-memory configuration backend
36 */
37struct stroke_config_t {
38
39 /**
40 * Implements the backend_t interface
41 */
42 backend_t backend;
7daf5226 43
0b14fdb9
MW
44 /**
45 * Add a configuration to the backend.
46 *
47 * @param msg received stroke message containing config
48 */
49 void (*add)(stroke_config_t *this, stroke_msg_t *msg);
7daf5226 50
0b14fdb9
MW
51 /**
52 * Remove a configuration from the backend.
53 *
54 * @param msg received stroke message containing config name
55 */
56 void (*del)(stroke_config_t *this, stroke_msg_t *msg);
7daf5226 57
9f1b303a
TB
58 /**
59 * Set the username and password for a connection in this backend.
60 *
61 * @param msg received stroke message
62 * @param prompt I/O channel to prompt for the password
63 */
64 void (*set_user_credentials)(stroke_config_t *this, stroke_msg_t *msg,
65 FILE *prompt);
66
0b14fdb9 67 /**
323f9f99
MW
68 * Destroy a stroke_config instance.
69 */
70 void (*destroy)(stroke_config_t *this);
0b14fdb9
MW
71};
72
73/**
74 * Create a stroke_config instance.
75 */
96c2b3cf
MW
76stroke_config_t *stroke_config_create(stroke_ca_t *ca, stroke_cred_t *cred,
77 stroke_attribute_t *attributes);
0b14fdb9 78
1490ff4d 79#endif /** STROKE_CONFIG_H_ @}*/