Not Logged In
|
Login
|
Register
Home
|
News
|
Projects
|
Releases
Bugs
|
RFE
|
Repositories
|
Help
projects
/
xestiacalendar
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added code for getting ServerData and ServerHeader in CalDAV::Connect()
[xestiacalendar/.git]
/
source
/
objects
/
CalDAV
/
CalDAV.cpp
diff --git
a/source/objects/CalDAV/CalDAV.cpp
b/source/objects/CalDAV/CalDAV.cpp
index
f0f8dc8
..
545c108
100644
(file)
--- a/
source/objects/CalDAV/CalDAV.cpp
+++ b/
source/objects/CalDAV/CalDAV.cpp
@@
-77,6
+77,8
@@
CalDAVServerResult CalDAV::Connect(){
string ServerAddress = "";
string ServerUserPass = "";
string ServerAddress = "";
string ServerUserPass = "";
+ string ServerData = "";
+ string ServerHeader = "";
// Setup the server address.
// Setup the server address.
@@
-108,11
+110,14
@@
CalDAVServerResult CalDAV::Connect(){
curl_easy_setopt(ConnectionHandle, CURLOPT_USERPWD, ServerUserPass.c_str());
curl_easy_setopt(ConnectionHandle, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
curl_easy_setopt(ConnectionHandle, CURLOPT_FAILONERROR, 1L);
curl_easy_setopt(ConnectionHandle, CURLOPT_USERPWD, ServerUserPass.c_str());
curl_easy_setopt(ConnectionHandle, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
curl_easy_setopt(ConnectionHandle, CURLOPT_FAILONERROR, 1L);
-
+ curl_easy_setopt(ConnectionHandle, CURLOPT_WRITEFUNCTION, CalDAVOutput);
+ curl_easy_setopt(ConnectionHandle, CURLOPT_WRITEDATA, &ServerData);
+ curl_easy_setopt(ConnectionHandle, CURLOPT_WRITEHEADER, &ServerHeader);
+
// Connect to the CalDAV server.
ServerResult.Code = curl_easy_perform(ConnectionHandle);
// Connect to the CalDAV server.
ServerResult.Code = curl_easy_perform(ConnectionHandle);
-
+
// Process the result received from the server.
if (ServerResult.Code != CURLE_OK){
// Process the result received from the server.
if (ServerResult.Code != CURLE_OK){
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software
Xestia Address Book
Xestia Calendar
Development
Xestia Gelforn
Everything else
About
News
Privacy Policy