2
* @file geis_backend_token.c
3
* @brief internal GEIS back end token implementation
5
* Copyright 2011 Canonical Ltd.
7
* This library is free software; you can redistribute it and/or modify it under
8
* the terms of the GNU Lesser General Public License as published by the Free
9
* Software Foundation; either version 3 of the License, or (at your option) any
12
* This library is distributed in the hope that it will be useful, but WITHOUT
13
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
#include "geis_backend_token.h"
22
#include "geis_backend_protected.h"
23
#include "geis_logging.h"
27
* Clones a new backend token.
30
geis_backend_token_clone(GeisBackendToken token)
32
return token->vtbl->clone(token);
37
* Destroys a backend token.
40
geis_backend_token_delete(GeisBackendToken token)
42
token->vtbl->finalize(token);
47
* Composes two backend tokens into a new backend token.
50
geis_backend_token_compose(GeisBackendToken lhs,
53
lhs->vtbl->compose(lhs, rhs);
58
* Activates a token in the back end.
61
geis_backend_token_activate(GeisBackendToken token,
62
GeisSubscription subscription)
65
return token->vtbl->activate(token, subscription);
70
* Deactivates a token in the back end.
73
geis_backend_token_deactivate(GeisBackendToken token,
74
GeisSubscription subscription)
77
return token->vtbl->deactivate(token, subscription);