• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

AbiCollabSaveInterceptor.h

Go to the documentation of this file.
00001 /* Copyright (C) 2008-2009 AbiSource Corporation B.V.
00002  *
00003  * This program is free software; you can redistribute it and/or
00004  * modify it under the terms of the GNU General Public License
00005  * as published by the Free Software Foundation; either version 2
00006  * of the License, or (at your option) any later version.
00007  *
00008  * This program is distributed in the hope that it will be useful,
00009  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011  * GNU General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU General Public License
00014  * along with this program; if not, write to the Free Software
00015  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00016  * 02110-1301 USA.
00017  */
00018 
00019 #ifndef __ABICOLLAB_SAVE_INTERCEPTOR__
00020 #define __ABICOLLAB_SAVE_INTERCEPTOR__
00021 
00022 #include "ev_EditMethod.h"
00023 #include "RealmConnection.h"
00024 
00025 class AV_View;
00026 class EV_EditMethodCallData;
00027 class EV_EditMethod;
00028 class PD_Document;
00029 class ServiceAccountHandler;
00030 
00031 class AbiCollabSaveInterceptor
00032 {
00033 public:
00034     AbiCollabSaveInterceptor();
00035 
00036     bool intercept(AV_View * v, EV_EditMethodCallData * d);
00037     bool save(PD_Document * pDoc);
00038 
00039 private:
00040     bool _save(std::string uri, bool verify_webapp_host, std::string ssl_ca_file,
00041             soa::function_call_ptr fc_ptr, boost::shared_ptr<std::string> result_ptr);
00042     void _save_cb(bool success, ServiceAccountHandler* pAccount,
00043             AbiCollab* pSession, ConnectionPtr connection_ptr,
00044             soa::function_call_ptr fc_ptr, boost::shared_ptr<std::string> result_ptr);
00045     void _saveFailed(AbiCollab* pSession);
00046 
00047     EV_EditMethod* m_pOldSaveEM;
00048 };
00049 
00050 #endif /* __ABICOLLAB_SAVE_INTERCEPTOR__ */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1