| 1 | /* |
| 2 | * This file is part of OnlineAccountsDaemon |
| 3 | * |
| 4 | * Copyright (C) 2015-2016 Canonical Ltd. |
| 5 | * |
| 6 | * Contact: Alberto Mardegan <[email protected]> |
| 7 | * |
| 8 | * This program is free software: you can redistribute it and/or modify it |
| 9 | * under the terms of the GNU Lesser General Public License version 3, as |
| 10 | * published by the Free Software Foundation. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranties of |
| 14 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
| 15 | * PURPOSE. See the GNU Lesser General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU Lesser General Public License |
| 18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 19 | */ |
| 20 | |
| 21 | #ifndef ONLINE_ACCOUNTS_DBUS_CONSTANTS_P_H |
| 22 | #define ONLINE_ACCOUNTS_DBUS_CONSTANTS_P_H |
| 23 | |
| 24 | /* Manager service, object path and interface name */ |
| 25 | #define ONLINE_ACCOUNTS_MANAGER_SERVICE_NAME \ |
| 26 | "com.lomiri.OnlineAccounts.Manager" |
| 27 | #define ONLINE_ACCOUNTS_MANAGER_PATH "/com/lomiri/OnlineAccounts/Manager" |
| 28 | #define ONLINE_ACCOUNTS_MANAGER_INTERFACE ONLINE_ACCOUNTS_MANAGER_SERVICE_NAME |
| 29 | |
| 30 | /* Keys for the account info dictionary */ |
| 31 | #define ONLINE_ACCOUNTS_INFO_KEY_DISPLAY_NAME "displayName" |
| 32 | #define ONLINE_ACCOUNTS_INFO_KEY_SERVICE_ID "serviceId" |
| 33 | #define ONLINE_ACCOUNTS_INFO_KEY_AUTH_METHOD "authMethod" |
| 34 | # define ONLINE_ACCOUNTS_AUTH_METHOD_UNKNOWN 0 |
| 35 | # define ONLINE_ACCOUNTS_AUTH_METHOD_OAUTH1 1 |
| 36 | # define ONLINE_ACCOUNTS_AUTH_METHOD_OAUTH2 2 |
| 37 | # define ONLINE_ACCOUNTS_AUTH_METHOD_PASSWORD 3 |
| 38 | # define ONLINE_ACCOUNTS_AUTH_METHOD_SASL 4 |
| 39 | #define ONLINE_ACCOUNTS_INFO_KEY_SETTINGS "settings/" |
| 40 | #define ONLINE_ACCOUNTS_INFO_KEY_CHANGE_TYPE "changeType" |
| 41 | # define ONLINE_ACCOUNTS_INFO_CHANGE_ENABLED 0 |
| 42 | # define ONLINE_ACCOUNTS_INFO_CHANGE_DISABLED 1 |
| 43 | # define ONLINE_ACCOUNTS_INFO_CHANGE_UPDATED 2 |
| 44 | |
| 45 | /* Keys for the service info dictionary */ |
| 46 | #define ONLINE_ACCOUNTS_INFO_KEY_ICON_SOURCE "iconSource" |
| 47 | |
| 48 | /* Error codes */ |
| 49 | #define ONLINE_ACCOUNTS_ERROR_PREFIX "com.lomiri.OnlineAccounts.Error." |
| 50 | #define ONLINE_ACCOUNTS_ERROR_NO_ACCOUNT \ |
| 51 | ONLINE_ACCOUNTS_ERROR_PREFIX "NoAccount" |
| 52 | #define ONLINE_ACCOUNTS_ERROR_USER_CANCELED \ |
| 53 | ONLINE_ACCOUNTS_ERROR_PREFIX "UserCanceled" |
| 54 | #define ONLINE_ACCOUNTS_ERROR_PERMISSION_DENIED \ |
| 55 | ONLINE_ACCOUNTS_ERROR_PREFIX "PermissionDenied" |
| 56 | #define ONLINE_ACCOUNTS_ERROR_INTERACTION_REQUIRED \ |
| 57 | ONLINE_ACCOUNTS_ERROR_PREFIX "InteractionRequired" |
| 58 | |
| 59 | /* Keys for the authentication data dictionaries */ |
| 60 | #define ONLINE_ACCOUNTS_AUTH_KEY_CLIENT_ID "ClientId" |
| 61 | #define ONLINE_ACCOUNTS_AUTH_KEY_CLIENT_SECRET "ClientSecret" |
| 62 | #define ONLINE_ACCOUNTS_AUTH_KEY_SCOPES "Scopes" |
| 63 | #define ONLINE_ACCOUNTS_AUTH_KEY_ACCESS_TOKEN "AccessToken" |
| 64 | #define ONLINE_ACCOUNTS_AUTH_KEY_EXPIRES_IN "ExpiresIn" |
| 65 | #define ONLINE_ACCOUNTS_AUTH_KEY_GRANTED_SCOPES "GrantedScopes" |
| 66 | |
| 67 | #define ONLINE_ACCOUNTS_AUTH_KEY_CONSUMER_KEY "ConsumerKey" |
| 68 | #define ONLINE_ACCOUNTS_AUTH_KEY_CONSUMER_SECRET "ConsumerSecret" |
| 69 | #define ONLINE_ACCOUNTS_AUTH_KEY_TOKEN "Token" |
| 70 | #define ONLINE_ACCOUNTS_AUTH_KEY_TOKEN_SECRET "TokenSecret" |
| 71 | #define ONLINE_ACCOUNTS_AUTH_KEY_SIGNATURE_METHOD "SignatureMethod" |
| 72 | |
| 73 | #define ONLINE_ACCOUNTS_AUTH_KEY_SERVICE "Service" |
| 74 | #define ONLINE_ACCOUNTS_AUTH_KEY_MECHANISMS "MechList" |
| 75 | #define ONLINE_ACCOUNTS_AUTH_KEY_FQDN "Fqdn" |
| 76 | #define ONLINE_ACCOUNTS_AUTH_KEY_LOCAL_IP "IpLocal" |
| 77 | #define ONLINE_ACCOUNTS_AUTH_KEY_REMOTE_IP "IpRemote" |
| 78 | #define ONLINE_ACCOUNTS_AUTH_KEY_CHALLENGE "Challenge" |
| 79 | #define ONLINE_ACCOUNTS_AUTH_KEY_CHOSEN_MECHANISM "ChosenMechanism" |
| 80 | #define ONLINE_ACCOUNTS_AUTH_KEY_RESPONSE "Response" |
| 81 | #define ONLINE_ACCOUNTS_AUTH_KEY_STATE "state" |
| 82 | # define ONLINE_ACCOUNTS_AUTH_SASL_STATE_FINISHED 0 |
| 83 | # define ONLINE_ACCOUNTS_AUTH_SASL_STATE_CONTINUE 1 |
| 84 | |
| 85 | #define ONLINE_ACCOUNTS_AUTH_KEY_USERNAME "Username" |
| 86 | #define ONLINE_ACCOUNTS_AUTH_KEY_PASSWORD "Password" |
| 87 | |
| 88 | |
| 89 | #endif // ONLINE_ACCOUNTS_DBUS_CONSTANTS_P_H |