X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcarddav%2Fcarddav.h;h=d4ac957a5cf896e6d4d3f6731be9d85e02b8dcfb;hb=ff65774611d82f2bdbb6cb5c34829cc2e922cf68;hp=dbbcc9b064c3c2fc9333b7de9280dd9471c8480f;hpb=911611528b36f56f7de9b6bf027b4c2a1a54df00;p=xestiaab%2F.git diff --git a/source/carddav/carddav.h b/source/carddav/carddav.h index dbbcc9b..d4ac957 100644 --- a/source/carddav/carddav.h +++ b/source/carddav/carddav.h @@ -1,16 +1,43 @@ +// carddav.h - CardDAV Object header file. +// +// (c) 2012-2015 Xestia Software Development. +// +// This file is part of Xestia Address Book. +// +// Xestia Address Book is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by the +// Free Software Foundation, version 3 of the license. +// +// Xestia Address Book is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with Xestia Address Book. If not, see + +#ifndef CALDAV_CALDAV_H +#define CALDAV_CALDAV_H + #include #include #include #include #include #include +#if defined(__WIN32__) +#include +#include +#include +#include +#include +#include +#include +#endif #include "../vcard/vcard.h" -#include "../frmActivityMgr.h" +#include "../actmgr/frmActivityMgr.h" #include "../common/sslcertstructs.h" -#ifndef CALDAV_CALDAV_H -#define CALDAV_CALDAV_H - struct FileSyncData{ unsigned int DataFlag:2; wxString ETagData; @@ -85,10 +112,22 @@ class CardDAV wxString GetDefaultAddressBookURL(); void GetSSLResults(); SSLCertCollection GetCertificateData(); - static SSLCertCollection BuildSSLCollection(CURL *conn); + static SSLCertCollection BuildSSLCollection(CURL *conn); wxString ETagValueResult(); wxString GetErrorMessage(); - + static size_t WritebackFunc(char *ptr, size_t size, size_t nmemb, wxString *stream); +#if defined(__APPLE__) || defined(__WIN32__) + static CURL* GetConnectionObject(); + static void SetConnectionObject(CURL *ConnectionObject); +#endif + +#if defined(__APPLE__) + SecTrustRef GetTrustObject(); +#elif defined(__WIN32__) + PCCERT_CONTEXT GetCertificateContextPointer(); + CERT_CONTEXT GetCertificateContext(); +#endif + // SSL Verification tests when connecting. static CURLcode SSLVerifyTest(); @@ -96,6 +135,15 @@ class CardDAV //size_t WritebackFunc(char *ptr, size_t size, size_t nmemb, FILE *userdata); private: +#if defined(__APPLE__) || defined(__WIN32__) + static CURL* ConnectionObject; +#endif +#if defined(__APPLE__) + static SSLContext *SSLContextPointer; + static SecTrustRef SecTrustObject; +#elif defined(__WIN32__) + static PCCERT_CONTEXT CertificateData; +#endif static wxString ServerAddress; static int ServerPort; static wxString ServerUser;