1 // CalDAV.cpp - CalDAV Connection Object.
3 // (c) 2016 Xestia Software Development.
5 // This file is part of Xestia Calendar.
7 // Xestia Address Book is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by the
9 // Free Software Foundation, version 3 of the license.
11 // Xestia Address Book is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License along
17 // with Xestia Calendar. If not, see <http://www.gnu.org/licenses/>
21 bool CalDAVObjectValidSettings(CalDAVConnectionData *ConnData){
23 // Check if the passed CalDAV Connection Data is has
24 // an address set. Return false if nullptr is used.
26 if (ConnData == nullptr){
32 // Check the server hostname. Return false
33 // if no value has been set.
35 if (ConnData->Hostname.size() == 0){
41 // Check the server port. Return false if
42 // no value has been set or the port number
43 // is less than 1 or higher than 65535.
45 if (ConnData->Port < 1 || ConnData->Port > 65535){
51 // Check the server username. Return false
52 // if no value has been set.
54 if (ConnData->Username.size() == 0){
60 // Check the server password. Return false
61 // if no value has been set.
63 if (ConnData->Password.size() == 0){
69 // Cannot check UseSSL: It is either true
72 // Cannot check Prefix: The prefix may need
73 // to be worked out first.
75 // No errors were found whilst checking so