Buteo Synchronization Framework
ProfileEngineDefs.h
1 /*
2  * This file is part of buteo-syncfw package
3  *
4  * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
5  * Copyright (C) 2014-2019 Jolla Ltd.
6  * Copyright (C) 2020 Open Mobile Platform LLC.
7  *
8  * Contact: Sateesh Kavuri <sateesh.kavuri@nokia.com>
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public License
12  * version 2.1 as published by the Free Software Foundation.
13  *
14  * This library is distributed in the hope that it will be useful, but
15  * WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22  * 02110-1301 USA
23  *
24  */
25 #ifndef COMMONDEFS_H
26 #define COMMONDEFS_H
27 
28 #include <QString>
29 // Define string constants for different XML elements.
30 
31 namespace Buteo {
32 
33 const QString ATTR_NAME("name");
34 const QString ATTR_TYPE("type");
35 const QString ATTR_VALUE("value");
36 const QString ATTR_DEFAULT("default");
37 const QString ATTR_LABEL("label");
38 const QString ATTR_VISIBLE("visible");
39 const QString ATTR_READONLY("readonly");
40 const QString ATTR_ADDED("added");
41 const QString ATTR_DELETED("deleted");
42 const QString ATTR_MODIFIED("modified");
43 const QString ATTR_UID("uid");
44 const QString ATTR_STATUS("status");
45 const QString ATTR_TIME("time");
46 const QString ATTR_INTERVAL("interval");
47 const QString ATTR_BEGIN("begin");
48 const QString ATTR_END("end");
49 const QString ATTR_DAYS("days");
50 const QString ATTR_MAJOR_CODE("majorcode");
51 const QString ATTR_MINOR_CODE("minorcode");
52 const QString ATTR_ENABLED("enabled");
53 const QString ATTR_SYNC_CONFIGURE("syncconfiguredtime");
54 const QString ATTR_EXTERNAL_SYNC("externalsync");
55 
56 const QString TAG_FIELD("field");
57 const QString TAG_PROFILE("profile");
58 const QString TAG_KEY("key");
59 const QString TAG_OPTION("option");
60 const QString TAG_TARGET_RESULTS("target");
61 const QString TAG_SYNC_RESULTS("syncresults");
62 const QString TAG_SYNC_LOG("synclog");
63 const QString TAG_LOCAL("local");
64 const QString TAG_REMOTE("remote");
65 const QString TAG_ADDED_ITEM("addedItem");
66 const QString TAG_DELETED_ITEM("deletedItem");
67 const QString TAG_MODIFIED_ITEM("modifiedItem");
68 const QString TAG_SCHEDULE("schedule");
69 const QString TAG_RUSH("rush");
70 const QString TAG_ERROR_ATTEMPTS("attempts");
71 const QString TAG_ATTEMPT_DELAY("attemptdelay");
72 
73 const QString KEY_ENABLED("enabled");
74 const QString KEY_DISPLAY_NAME("displayname");
75 const QString KEY_ACTIVE("active");
76 const QString KEY_USE_ACCOUNTS("use_accounts");
77 const QString KEY_SYNC_SCHEDULED("scheduled");
78 const QString KEY_PLUGIN("plugin");
79 const QString KEY_BACKEND("backend");
80 const QString KEY_ACCOUNT_ID("accountid");
81 const QString KEY_USERNAME("Username");
82 const QString KEY_PASSWORD("Password");
83 const QString KEY_HIDDEN("hidden");
84 const QString KEY_PROTECTED("protected");
85 const QString KEY_DESTINATION_TYPE("destinationtype");
86 const QString KEY_SYNC_DIRECTION("Sync Direction");
87 const QString KEY_FORCE_SLOW_SYNC("force_slow_sync");
88 const QString KEY_CONFLICT_RESOLUTION_POLICY("conflictpolicy");
89 const QString KEY_BT_ADDRESS("bt_address");
90 const QString KEY_REMOTE_ID("remote_id");
91 const QString KEY_REMOTE_DATABASE("Remote database");
92 const QString KEY_BT_NAME("bt_name");
93 const QString KEY_BT_TRANSPORT("bt_transport");
94 const QString KEY_USB_TRANSPORT("usb_transport");
95 const QString KEY_INTERNET_TRANSPORT("internet_transport");
96 const QString KEY_LOAD_WITHOUT_TRANSPORT("load_without_transport");
97 const QString KEY_CAPS_MODIFIED("caps_modified");
98 const QString KEY_SYNC_SINCE_DAYS_PAST("sync_since_days_past"); // sync from this many days before the current date
99 const QString KEY_SYNC_ALWAYS_UP_TO_DATE("sync_always_up_to_date");
100 const QString KEY_SYNC_EXTERNALLY("sync_externally");
101 const QString KEY_SOC("sync_on_change");
102 const QString KEY_SOC_AFTER("sync_on_change_after");
103 const QString KEY_LOCAL_URI("Local URI");
104 const QString KEY_ALWAYS_ON_ENABLED("always_on_enabled");
105 const QString KEY_REMOTE_NAME("remote_name");
106 const QString KEY_UUID("uuid");
107 const QString KEY_NOTES_UUID("notes_uuid");
108 const QString KEY_STORAGE_UPDATED("storage_updated");
109 const QString KEY_HTTP_PROXY_HOST("http_proxy_host");
110 const QString KEY_HTTP_PROXY_PORT("http_proxy_port");
111 const QString KEY_PROFILE_ID("profile_id");
112 const QString KEY_INTERNET_CONNECTION_TYPES("internet_connection_types");
113 
114 const QString BOOLEAN_TRUE("true");
115 const QString BOOLEAN_FALSE("false");
116 
117 const QString VALUE_ONLINE("online");
118 const QString VALUE_DEVICE("device");
119 const QString VALUE_TWO_WAY("two-way");
120 const QString VALUE_FROM_REMOTE("from-remote");
121 const QString VALUE_TO_REMOTE("to-remote");
122 const QString VALUE_PREFER_REMOTE("prefer remote");
123 const QString VALUE_PREFER_LOCAL("prefer local");
124 
125 // Indent size for profile XML output.
126 const int PROFILE_INDENT = 4;
127 
128 const QString PC_SYNC("PC-SYNC");
129 
130 //For account online_template
131 const QString SYNC_ONLINE_TEMPLATE("online_template");
132 }
133 
134 #endif // COMMONDEFS_H