diff options
Diffstat (limited to 'src/internal/gnunet_chat_accounts.h')
-rw-r--r-- | src/internal/gnunet_chat_accounts.h | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/src/internal/gnunet_chat_accounts.h b/src/internal/gnunet_chat_accounts.h new file mode 100644 index 0000000..65f877a --- /dev/null +++ b/src/internal/gnunet_chat_accounts.h | |||
@@ -0,0 +1,71 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet. | ||
3 | Copyright (C) 2024 GNUnet e.V. | ||
4 | |||
5 | GNUnet is free software: you can redistribute it and/or modify it | ||
6 | under the terms of the GNU Affero General Public License as published | ||
7 | by the Free Software Foundation, either version 3 of the License, | ||
8 | or (at your option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | Affero General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU Affero General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | |||
18 | SPDX-License-Identifier: AGPL3.0-or-later | ||
19 | */ | ||
20 | /* | ||
21 | * @author Tobias Frisch | ||
22 | * @file gnunet_chat_accounts.h | ||
23 | */ | ||
24 | |||
25 | #ifndef GNUNET_CHAT_INTERNAL_ACCOUNTS_H_ | ||
26 | #define GNUNET_CHAT_INTERNAL_ACCOUNTS_H_ | ||
27 | |||
28 | #include <gnunet/gnunet_identity_service.h> | ||
29 | |||
30 | enum GNUNET_CHAT_AccountMethod | ||
31 | { | ||
32 | GNUNET_CHAT_ACCOUNT_CREATION = 1, | ||
33 | GNUNET_CHAT_ACCOUNT_DELETION = 2, | ||
34 | GNUNET_CHAT_ACCOUNT_RENAMING = 3, | ||
35 | GNUNET_CHAT_ACCOUNT_UPDATING = 4, | ||
36 | |||
37 | GNUNET_CHAT_ACCOUNT_NONE = 0 | ||
38 | }; | ||
39 | |||
40 | struct GNUNET_CHAT_Handle; | ||
41 | struct GNUNET_CHAT_Account; | ||
42 | |||
43 | struct GNUNET_CHAT_InternalAccounts | ||
44 | { | ||
45 | struct GNUNET_CHAT_Handle *handle; | ||
46 | struct GNUNET_CHAT_Account *account; | ||
47 | |||
48 | char *identifier; | ||
49 | struct GNUNET_IDENTITY_Operation *op; | ||
50 | enum GNUNET_CHAT_AccountMethod method; | ||
51 | |||
52 | struct GNUNET_CHAT_InternalAccounts *next; | ||
53 | struct GNUNET_CHAT_InternalAccounts *prev; | ||
54 | }; | ||
55 | |||
56 | struct GNUNET_CHAT_InternalAccounts* | ||
57 | internal_accounts_create(struct GNUNET_CHAT_Handle *handle, | ||
58 | struct GNUNET_CHAT_Account *account); | ||
59 | |||
60 | void | ||
61 | internal_accounts_destroy(struct GNUNET_CHAT_InternalAccounts *accounts); | ||
62 | |||
63 | void | ||
64 | internal_accounts_start_method(struct GNUNET_CHAT_InternalAccounts *accounts, | ||
65 | enum GNUNET_CHAT_AccountMethod method, | ||
66 | const char *identifier); | ||
67 | |||
68 | void | ||
69 | internal_accounts_stop_method(struct GNUNET_CHAT_InternalAccounts *accounts); | ||
70 | |||
71 | #endif /* GNUNET_CHAT_ACCOUNTS_H_ */ | ||