Class implementing TCL interpreter callbacks.
More...
#include <tclCallbacks.h>
|
| TclCallbacks (Model &aModel, MController &aController) |
|
| ~TclCallbacks () |
|
int | getBinaryFileCmdImpl (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 More...
|
|
int | getProfileCommentCmdImpl (ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[]) |
|
int | getClassifiedAdCmdImpl (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 | listItemsCmdImpl (ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[]) |
|
int | publishItemCmdImpl (ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[]) |
|
int | storeTCLProgLocalDataImpl (ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[]) |
|
int | retrieveTCLProgLocalDataImpl (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 | saveFileImpl (ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[]) |
|
int | openFileImpl (ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[]) |
|
|
int | publishProfileCommentCmdImpl (ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[]) |
|
int | publishFileCmdImpl (ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[]) |
|
int | publishProfileCmdImpl (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 | publishDbRecordCmdImpl (ClientData aCData, Tcl_Interp *aInterp, int aObjc, Tcl_Obj *const aObjv[]) |
|
Class implementing TCL interpreter callbacks.
This class is closely coupled with TclWrapper class and the TCL interpreter instantiated by TclWrapper will use command-callbacks implemented by this class.
◆ TclCallbacks()
◆ ~TclCallbacks()
TclCallbacks::~TclCallbacks |
( |
| ) |
|
◆ error
◆ getBinaryFileCmdImpl()
int TclCallbacks::getBinaryFileCmdImpl |
( |
ClientData |
aCData, |
|
|
Tcl_Interp * |
aInterp, |
|
|
int |
aObjc, |
|
|
Tcl_Obj *const |
aObjv[] |
|
) |
| |
non-static method for getting binary file
◆ getClassifiedAdCmdImpl()
int TclCallbacks::getClassifiedAdCmdImpl |
( |
ClientData |
aCData, |
|
|
Tcl_Interp * |
aInterp, |
|
|
int |
aObjc, |
|
|
Tcl_Obj *const |
aObjv[] |
|
) |
| |
non-static method for getting classified ad
◆ getDbRecordCmdImpl()
int TclCallbacks::getDbRecordCmdImpl |
( |
ClientData |
aCData, |
|
|
Tcl_Interp * |
aInterp, |
|
|
int |
aObjc, |
|
|
Tcl_Obj *const |
aObjv[] |
|
) |
| |
non-static method for db record
- Parameters
-
aObjv | should contain dictionary expressing the search conditions. Same dictionary keys are used that are in use when db record is published from TCL app. |
- Returns
- If db records satisfying the conditions were found from local storage, they're returned synchronously as return value to this call, using Tcl_SetObjResult mechanism. Search is sent to remote nodes also and as remote nodes return search results, new db records may be added to database and TCL app running may receive notifications later concerning db records originally queries but arriving later.
- Parameters
-
return | TCL_OK if ok, the actual TCL object returned is a TCL dictionary. |
◆ getProfileCmdImpl()
int TclCallbacks::getProfileCmdImpl |
( |
ClientData |
aCData, |
|
|
Tcl_Interp * |
aInterp, |
|
|
int |
aObjc, |
|
|
Tcl_Obj *const |
aObjv[] |
|
) |
| |
non-static method for getting profile details
◆ getProfileCommentCmdImpl()
int TclCallbacks::getProfileCommentCmdImpl |
( |
ClientData |
aCData, |
|
|
Tcl_Interp * |
aInterp, |
|
|
int |
aObjc, |
|
|
Tcl_Obj *const |
aObjv[] |
|
) |
| |
non-static method for getting profile comment
◆ isProfileTrustedImpl()
int TclCallbacks::isProfileTrustedImpl |
( |
ClientData |
aCData, |
|
|
Tcl_Interp * |
aInterp, |
|
|
int |
aObjc, |
|
|
Tcl_Obj *const |
aObjv[] |
|
) |
| |
Tcl extension method for checking operator from trust-tree
- Parameters
-
aCData | clientdata from tcl interpreter. Not used. |
aInterp | pointer to calling TCL interpreter |
aObjc | number of items in array aObjv |
aObjv | command arguments. |
- Returns
- TCL_OK on success.
◆ listItemsCmdImpl()
int TclCallbacks::listItemsCmdImpl |
( |
ClientData |
aCData, |
|
|
Tcl_Interp * |
aInterp, |
|
|
int |
aObjc, |
|
|
Tcl_Obj *const |
aObjv[] |
|
) |
| |
Non-static Tcl extension method: when TCL scripts asks for list of profiles, it invokes this method. See where this method is added into TCL interpreters repertoire. Called from listItemsCmd method.
◆ openFileImpl()
int TclCallbacks::openFileImpl |
( |
ClientData |
aCData, |
|
|
Tcl_Interp * |
aInterp, |
|
|
int |
aObjc, |
|
|
Tcl_Obj *const |
aObjv[] |
|
) |
| |
Tcl extension method for returning contents of a file system file to interpreter. User gets to choose which file to read.
- Parameters
-
aCData | clientdata from tcl interpreter. Not used. |
aInterp | pointer to calling TCL interpreter |
aObjc | number of items in array aObjv |
aObjv | command arguments. |
- Returns
- TCL_OK on success.
◆ publishClassifiedAdCmdImpl()
int TclCallbacks::publishClassifiedAdCmdImpl |
( |
ClientData |
aCData, |
|
|
Tcl_Interp * |
aInterp, |
|
|
int |
aObjc, |
|
|
Tcl_Obj *const |
aObjv[] |
|
) |
| |
|
private |
non-static method for publishing a classified ad
◆ publishDbRecordCmdImpl()
int TclCallbacks::publishDbRecordCmdImpl |
( |
ClientData |
aCData, |
|
|
Tcl_Interp * |
aInterp, |
|
|
int |
aObjc, |
|
|
Tcl_Obj *const |
aObjv[] |
|
) |
| |
|
private |
non-static method for publishing a db record
◆ publishFileCmdImpl()
int TclCallbacks::publishFileCmdImpl |
( |
ClientData |
aCData, |
|
|
Tcl_Interp * |
aInterp, |
|
|
int |
aObjc, |
|
|
Tcl_Obj *const |
aObjv[] |
|
) |
| |
|
private |
work-horse method for publishing a binary file. See method publishItemCmdImpl that calls this.
◆ publishItemCmdImpl()
int TclCallbacks::publishItemCmdImpl |
( |
ClientData |
aCData, |
|
|
Tcl_Interp * |
aInterp, |
|
|
int |
aObjc, |
|
|
Tcl_Obj *const |
aObjv[] |
|
) |
| |
Tcl extension method for publishing an item. This will be called by several in-TCL commands, for instance "publishFile", "publishComment" or "publishProfile". The TCL command will be in aObjv[0] and aObjv[1] will contain the actual object to be published.
This is the non-static-version, see also TclWrapper::publishItemCmd.
- Parameters
-
aCData | clientdata from tcl interpreter. Not used. |
aInterp | pointer to calling TCL interpreter |
aObjc | number of items in array aObjv |
aObjv | command arguments. First is name of the command itself, like "publishFile", 2nd is actual object |
- Returns
- TCL_OK on success.
◆ publishProfileCmdImpl()
int TclCallbacks::publishProfileCmdImpl |
( |
ClientData |
aCData, |
|
|
Tcl_Interp * |
aInterp, |
|
|
int |
aObjc, |
|
|
Tcl_Obj *const |
aObjv[] |
|
) |
| |
|
private |
non-static method for publishing a profile
◆ publishProfileCommentCmdImpl()
int TclCallbacks::publishProfileCommentCmdImpl |
( |
ClientData |
aCData, |
|
|
Tcl_Interp * |
aInterp, |
|
|
int |
aObjc, |
|
|
Tcl_Obj *const |
aObjv[] |
|
) |
| |
|
private |
work-horse method for publishing a profile comment. See method publishItemCmdImpl that calls this.
◆ retrieveTCLProgLocalDataImpl()
int TclCallbacks::retrieveTCLProgLocalDataImpl |
( |
ClientData |
aCData, |
|
|
Tcl_Interp * |
aInterp, |
|
|
int |
aObjc, |
|
|
Tcl_Obj *const |
aObjv[] |
|
) |
| |
◆ saveFileImpl()
int TclCallbacks::saveFileImpl |
( |
ClientData |
aCData, |
|
|
Tcl_Interp * |
aInterp, |
|
|
int |
aObjc, |
|
|
Tcl_Obj *const |
aObjv[] |
|
) |
| |
Tcl extension method for saving a file into filesystem. User gets to choose file name
- Parameters
-
aCData | clientdata from tcl interpreter. Not used. |
aInterp | pointer to calling TCL interpreter |
aObjc | number of items in array aObjv |
aObjv | command arguments. |
- Returns
- TCL_OK on success.
◆ storeTCLProgLocalDataImpl()
int TclCallbacks::storeTCLProgLocalDataImpl |
( |
ClientData |
aCData, |
|
|
Tcl_Interp * |
aInterp, |
|
|
int |
aObjc, |
|
|
Tcl_Obj *const |
aObjv[] |
|
) |
| |
Tcl extension method for storing a blob of data in local storage
This is the non-static-version, see also TclWrapper::storeTCLProgLocalDataCmd. In practice this calls TclModel::storeTCLProgLocalData.
- Parameters
-
aCData | clientdata from tcl interpreter. Not used. |
aInterp | pointer to calling TCL interpreter |
aObjc | number of items in array aObjv |
aObjv | command arguments. First is name of the command itself, 2nd is the data to be stored |
- Returns
- TCL_OK on success.
◆ iController
◆ iModel
Model& TclCallbacks::iModel |
|
private |
The documentation for this class was generated from the following file: