123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- /*
- * Copyright 2005 - 2016 Zarafa and its licensors
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
- #include <kopano/platform.h>
- #include "ECNotification.h"
- #include "ECMAPI.h"
- #include "SOAPUtils.h"
- namespace KC {
- ECNotification::ECNotification()
- {
- Init();
- }
- ECNotification::~ECNotification()
- {
- FreeNotificationStruct(m_lpsNotification, true);
- }
- ECNotification::ECNotification(const ECNotification &x)
- {
- Init();
- *this = x;
- }
- ECNotification::ECNotification(notification ¬ification)
- {
- Init();
- *this = notification;
- }
- void ECNotification::Init()
- {
- this->m_lpsNotification = s_alloc<notification>(nullptr);
- memset(m_lpsNotification, 0, sizeof(notification));
- }
- ECNotification& ECNotification::operator=(const ECNotification &x)
- {
- if(this != &x)
- CopyNotificationStruct(NULL, x.m_lpsNotification, *this->m_lpsNotification);
- return *this;
- }
- ECNotification& ECNotification::operator=(const notification &srcNotification)
- {
- CopyNotificationStruct(NULL, (notification *)&srcNotification, *this->m_lpsNotification);
- return *this;
- }
- void ECNotification::SetConnection(unsigned int ulConnection)
- {
- m_lpsNotification->ulConnection = ulConnection;
- }
- void ECNotification::GetCopy(struct soap *soap, notification ¬ification) const
- {
- CopyNotificationStruct(soap, this->m_lpsNotification, notification);
- }
- /**
- * Get object size
- *
- * @return Object size in bytes
- */
- size_t ECNotification::GetObjectSize(void) const
- {
- return NotificationStructSize(m_lpsNotification);
- }
- } /* namespace */
|