Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added the CalDAVObjectValidSettings subroutine.
[xestiacalendar/.git] / source / objects / CalDAV / CalDAV.cpp
1 #include "CalDAV.h"
3 bool CalDAVObjectValidSettings(CalDAVConnectionData *ConnData){
5         // Check if the passed CalDAV Connection Data is has
6         // an address set. Return false if nullptr is used.
8         if (ConnData == nullptr){
9         
10                 return false;
11         
12         }
13         
14         // Check the server hostname. Return false
15         // if no value has been set.
16         
17         if (ConnData->Hostname.size() > 0){
18         
19                 return false;
20         
21         }
22         
23         // Check the server port. Return false if
24         // no value has been set or the port number
25         // is less than 1 or higher than 65535.
26         
27         if (ConnData->Port < 1 || ConnData->Port > 65535){
28         
29                 return false;
30         
31         }
32         
33         // Check the server username. Return false
34         // if no value has been set.
36         if (ConnData->Username.size() > 0){
37                 return false;
38         }
40         // Check the server password. Return false
41         // if no value has been set.
43         if (ConnData->Password.size() > 0){
44                 return false;
45         }
47         // Cannot check UseSSL: It is either true
48         // or false.
49         
50         // Cannot check Prefix: The prefix may need
51         // to be worked out first.
53         // No errors were found whilst checking so
54         // return true.
55         
56         return true;
58 }
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy