Classified ads
tclCallbacks.h
Go to the documentation of this file.
1 /* -*-C++-*- -*-coding: utf-8-unix;-*-
2  Classified Ads is Copyright (c) Antti Järvinen 2013-2017.
3 
4  This file is part of Classified Ads.
5 
6  Classified Ads is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) any later version.
10 
11  Classified Ads is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public
17  License along with Classified Ads; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20 
21 
22 #ifndef TCLCALLBACKPROCEDURES_H
23 #define TCLCALLBACKPROCEDURES_H
24 #include <QObject>
25 #include "../mcontroller.h"
26 #include <tcl.h>
27 
28 class Model ;
29 class MController ;
30 
38 class TclCallbacks : public QObject {
39  Q_OBJECT
40 public:
41  TclCallbacks(Model& aModel,
42  MController& aController);
43 
47  ~TclCallbacks() ;
48 
49 signals:
51  const QString& aExplanation) ;
52 
53 
54 public: // methods, called from tclWrapper.h static methods
58  int getBinaryFileCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[]) ;
59 
75  int getDbRecordCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[]) ;
76 
80  int getProfileCommentCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[]) ;
81 
85  int getClassifiedAdCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[]) ;
86 
90  int getProfileCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[]) ;
91 
98  int listItemsCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[]) ;
99 
115  int publishItemCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj* const aObjv[]) ;
116 
130  int storeTCLProgLocalDataImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj* const aObjv[]) ;
144  int retrieveTCLProgLocalDataImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj* const aObjv[]) ;
145 
155  int isProfileTrustedImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj* const aObjv[]) ;
156 
167  int saveFileImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj* const aObjv[]) ;
168 
179  int openFileImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj* const aObjv[]) ;
180 
181 private: // methods
186  int publishProfileCommentCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[]) ;
191  int publishFileCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[]) ;
192 
196  int publishProfileCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[]) ;
197 
201  int publishClassifiedAdCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[]) ;
205  int publishDbRecordCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[]) ;
206 
207 private: // variables
210 } ;
211 #endif
int publishProfileCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[])
int isProfileTrustedImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[])
int listItemsCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[])
int publishClassifiedAdCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[])
int getProfileCommentCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[])
int publishFileCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[])
TclCallbacks(Model &aModel, MController &aController)
CAErrorSituation
Definition: mcontroller.h:57
Class implementing TCL interpreter callbacks.
Definition: tclCallbacks.h:38
int publishDbRecordCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[])
int saveFileImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[])
Pure-virtual interface class for controller. This is spammed across parties needing access to applica...
Definition: mcontroller.h:48
MController & iController
Definition: tclCallbacks.h:209
int openFileImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[])
M of the MVC pattern. Handles permanent storage.
Definition: model.h:50
int storeTCLProgLocalDataImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[])
int getDbRecordCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[])
non-static method for db record
int publishProfileCommentCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[])
Model & iModel
Definition: tclCallbacks.h:208
int getClassifiedAdCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[])
int retrieveTCLProgLocalDataImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[])
void error(MController::CAErrorSituation aError, const QString &aExplanation)
int getBinaryFileCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[])
int getProfileCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[])
int publishItemCmdImpl(ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[])