From 3cbad51aaef744ac11af7521d79a06bfbe0b8312 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Thu, 3 Mar 2016 03:38:46 +0000 Subject: [PATCH] Added the CalDAVSend subroutine which is used when uploading data. --- source/objects/CalDAV/CalDAV.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/source/objects/CalDAV/CalDAV.cpp b/source/objects/CalDAV/CalDAV.cpp index 256bc25..d9d81e4 100644 --- a/source/objects/CalDAV/CalDAV.cpp +++ b/source/objects/CalDAV/CalDAV.cpp @@ -32,6 +32,29 @@ size_t CalDAVReceive(char *ReceivedBuffer, size_t Size, size_t NewMemoryBytes, s } +size_t CalDAVSend(char *SendBuffer, size_t Size, size_t NewMemoryBytes, void *DataStruct){ + + struct CalDAVSendData *UploadPtr = (struct CalDAVSendData *)DataStruct; + + if (UploadPtr->sizeleft){ + + UploadPtr->sizeleft--; + char CharSend; + + CharSend = (*UploadPtr->readptr)[UploadPtr->seek]; + + *SendBuffer = CharSend; + + UploadPtr->seek++; + + return 1; + + } + + return 0; + +} + CalDAV::CalDAV(){ // Setup the objects within the CalDAV connection -- 2.39.5