|
MagicSmoke
$VERSION$
|
the MagicSmoke specific interface class - enhances the basic interface by some functionality needed in the MagicSmoke context More...
#include <msinterface.h>
Public Slots | |
| bool | login (QString username, QString passwd) |
| logs into the server, returns true on success More... | |
| bool | loginSession (QString username, QString sessionid) |
| initializes with a known session ID, returns true on success More... | |
| void | logout () |
| logs out of the server More... | |
| bool | relogin () |
| refreshes the login More... | |
| void | setSessionId (QString sid) |
| sets the session id to be transmitted More... | |
| virtual void | sslErrors (QNetworkReply *, const QList< QSslError > &) |
| handles SSL errors More... | |
| void | updateTemplates () |
| force template store to update its templates More... | |
Signals | |
| void | needRelogin () |
| emitted when a re-login would be necessary More... | |
Public Member Functions | |
| MSInterface (QString) | |
| creates the interface object, expects the profile ID as parameter More... | |
| ~MSInterface () | |
| deletes the interface More... | |
| QStringList | allFlags () const |
| return all flags of the current user More... | |
| QList< Right > | allRights () const |
| return all rights of the current user More... | |
| QStringList | allRoles () const |
| return all roles of the current user More... | |
| bool | autoLogout () const |
| returns whether this instance automatically logs out on closure More... | |
| Q_INVOKABLE bool | checkFlags (const QStringList &) const |
| checks the flags in the string list and returns true if all of them match More... | |
| Q_INVOKABLE bool | checkFlags (const QString &s) const |
| checks the space separeted flags in the string and returns true if all of them match More... | |
| bool | checkServer () |
| checks the server for compatibility More... | |
| Q_INVOKABLE QString | configSettingsGroup () const |
| returns the group where central profile settings are stored, this group is read-only for anything but the configuration dialog More... | |
| Q_INVOKABLE QString | currentUser () const |
| returns the name of the current user More... | |
| Q_INVOKABLE QString | dataDir () const |
| returns the directory where to store data retrieved from the server More... | |
| Q_INVOKABLE bool | hasFlag (QString f) const |
| returns whether the user has a particular flag More... | |
| Q_INVOKABLE bool | hasRight (Right) const |
| returns whether the user has a particular right More... | |
| Q_INVOKABLE bool | hasRole (QString s) const |
| returns whether the user is part of this role More... | |
| virtual QMap< QString, QString > | headers (QString) const |
| returns default headers, ie. More... | |
| Q_INVOKABLE QString | hostName () const |
| returns the name used for the host in this session More... | |
| void | initialize () |
| initializes the interface, ie. More... | |
| QUrl | parentUrl () const |
| return the parent directory of the base URL More... | |
| QString | profileId () const |
| returns the profile ID of this session More... | |
| QString | profileName () const |
| returns the human readable name of the profile More... | |
| Q_INVOKABLE QString | sessionId () const |
| returns the current session ID More... | |
| void | setAutoLogout (bool a) |
| sets whether this instance automatically logs out on closure More... | |
| Q_INVOKABLE QString | settingsGroup () const |
| returns the group in which to find settings in QSettings, this group can be used by any class that accesses the profile More... | |
| QString | statusBarText () const |
| returns the status bar text More... | |
| Q_INVOKABLE MTemplateStore * | templateStore () |
| returns a pointer to the template storage engine More... | |
Public Member Functions inherited from MInterface | |
| MInterface (QString name="MagicSmoke") | |
| MTBackup | queryBackup () |
| convenience call to query MTBackup synchronously More... | |
| MTBackupExplore | queryBackupExplore () |
| convenience call to query MTBackupExplore synchronously More... | |
| MTBackupTable | queryBackupTable (const QString &atable, const qint64 &aminkey, const qint64 &amaxkey, const QList< QString > &akeylist) |
| convenience call to query MTBackupTable synchronously More... | |
| MTCancelEvent | queryCancelEvent (const qint64 &aeventid, const QString &areason) |
| convenience call to query MTCancelEvent synchronously More... | |
| MTCancelOrder | queryCancelOrder (const qint64 &aorderid) |
| convenience call to query MTCancelOrder synchronously More... | |
| MTChangeCoupon | queryChangeCoupon (const MOCoupon &acoupon) |
| convenience call to query MTChangeCoupon synchronously More... | |
| MTChangeCustomer | queryChangeCustomer (const MOCustomer &acustomer) |
| convenience call to query MTChangeCustomer synchronously More... | |
| MTChangeCustomerMail | queryChangeCustomerMail (const qint64 &acustomerid, const QString &aemail) |
| convenience call to query MTChangeCustomerMail synchronously More... | |
| MTChangeEvent | queryChangeEvent (const MOEvent &aevent) |
| convenience call to query MTChangeEvent synchronously More... | |
| MTChangeMyPassword | queryChangeMyPassword (const QString &aoldpassword, const QString &anewpassword) |
| convenience call to query MTChangeMyPassword synchronously More... | |
| MTChangeOrderAddress | queryChangeOrderAddress (const qint64 &aorderid, const bool &asetinvoiceaddr, const qint64 &ainvoiceaddr, const bool &asetdeliveryaddr, const qint64 &adeliveryaddr) |
| convenience call to query MTChangeOrderAddress synchronously More... | |
| MTChangePassword | queryChangePassword (const QString &ausername, const QString &apassword) |
| convenience call to query MTChangePassword synchronously More... | |
| MTChangePriceCategory | queryChangePriceCategory (const MOPriceCategory &apricecategory) |
| convenience call to query MTChangePriceCategory synchronously More... | |
| MTChangeShipping | queryChangeShipping (const MOShipping &ashipping) |
| convenience call to query MTChangeShipping synchronously More... | |
| MTChangeTicketPrice | queryChangeTicketPrice (const QString &abarcode, const qint64 &aprice) |
| convenience call to query MTChangeTicketPrice synchronously More... | |
| MTChangeTicketPriceCategory | queryChangeTicketPriceCategory (const QString &abarcode, const qint64 &apricecategoryid) |
| convenience call to query MTChangeTicketPriceCategory synchronously More... | |
| MTChangeVoucherValidity | queryChangeVoucherValidity (const QString &avoucherid, const bool &avalidforever, const qint64 &avalidtime, const QString &acomment) |
| convenience call to query MTChangeVoucherValidity synchronously More... | |
| MTCreateArtist | queryCreateArtist (const QString &aname, const QString &adescription, const QString &acomment) |
| convenience call to query MTCreateArtist synchronously More... | |
| MTCreateContactType | queryCreateContactType (const QString &atypename, const QString &auriprefix) |
| convenience call to query MTCreateContactType synchronously More... | |
| MTCreateCountry | queryCreateCountry (const QString &aabbrev, const QString &aname) |
| convenience call to query MTCreateCountry synchronously More... | |
| MTCreateCoupon | queryCreateCoupon (const MOCoupon &acoupon) |
| convenience call to query MTCreateCoupon synchronously More... | |
| MTCreateCustomer | queryCreateCustomer (const MOCustomer &acustomer) |
| convenience call to query MTCreateCustomer synchronously More... | |
| MTCreateEvent | queryCreateEvent (const MOEvent &aevent) |
| convenience call to query MTCreateEvent synchronously More... | |
| MTCreateOrder | queryCreateOrder (const MOCartOrder &acart, const bool &aissale, const QList< QString > &avouchers) |
| convenience call to query MTCreateOrder synchronously More... | |
| MTCreatePriceCategory | queryCreatePriceCategory (const MOPriceCategory &apricecategory) |
| convenience call to query MTCreatePriceCategory synchronously More... | |
| MTCreateReservation | queryCreateReservation (const MOCartOrder &acart) |
| convenience call to query MTCreateReservation synchronously More... | |
| MTCreateRole | queryCreateRole (const QString &arole) |
| convenience call to query MTCreateRole synchronously More... | |
| MTCreateRoom | queryCreateRoom (const QString &aroomid, const qint64 &acapacity, const QString &adescription) |
| convenience call to query MTCreateRoom synchronously More... | |
| MTCreateSeatPlan | queryCreateSeatPlan (const MOSeatPlanInfo &aplan) |
| convenience call to query MTCreateSeatPlan synchronously More... | |
| MTCreateShipping | queryCreateShipping (const MOShipping &ashipping) |
| convenience call to query MTCreateShipping synchronously More... | |
| MTCreateUser | queryCreateUser (const QString &ausername, const QString &apassword, const QString &adescription) |
| convenience call to query MTCreateUser synchronously More... | |
| MTDeductVoucher | queryDeductVoucher (const QString &avoucherid, const qint64 &aamount, const QString &acomment) |
| convenience call to query MTDeductVoucher synchronously More... | |
| MTDeleteCustomer | queryDeleteCustomer (const qint64 &acustomerid, const qint64 &amergewithid) |
| convenience call to query MTDeleteCustomer synchronously More... | |
| MTDeleteFlag | queryDeleteFlag (const QString &aflag) |
| convenience call to query MTDeleteFlag synchronously More... | |
| MTDeleteHost | queryDeleteHost (const QString &aname) |
| convenience call to query MTDeleteHost synchronously More... | |
| MTDeleteOrderDocument | queryDeleteOrderDocument (const qint64 &aorderid, const QString &afilename) |
| convenience call to query MTDeleteOrderDocument synchronously More... | |
| MTDeletePaymentType | queryDeletePaymentType (const QString &apaytype) |
| convenience call to query MTDeletePaymentType synchronously More... | |
| MTDeleteRole | queryDeleteRole (const QString &arole) |
| convenience call to query MTDeleteRole synchronously More... | |
| MTDeleteShipping | queryDeleteShipping (const qint64 &ashipid) |
| convenience call to query MTDeleteShipping synchronously More... | |
| MTDeleteTemplate | queryDeleteTemplate (const QString &afilename) |
| convenience call to query MTDeleteTemplate synchronously More... | |
| MTDeleteUser | queryDeleteUser (const QString &ausername, const QString &amergewithuser) |
| convenience call to query MTDeleteUser synchronously More... | |
| MTEmptyVoucher | queryEmptyVoucher (const QString &avoucherid, const QString &acomment) |
| convenience call to query MTEmptyVoucher synchronously More... | |
| MTGetAddress | queryGetAddress (const qint64 &aaddressid) |
| convenience call to query MTGetAddress synchronously More... | |
| MTGetAllArtists | queryGetAllArtists () |
| convenience call to query MTGetAllArtists synchronously More... | |
| MTGetAllContactTypes | queryGetAllContactTypes () |
| convenience call to query MTGetAllContactTypes synchronously More... | |
| MTGetAllCountries | queryGetAllCountries () |
| convenience call to query MTGetAllCountries synchronously More... | |
| MTGetAllCustomerNames | queryGetAllCustomerNames () |
| convenience call to query MTGetAllCustomerNames synchronously More... | |
| MTGetAllEvents | queryGetAllEvents () |
| convenience call to query MTGetAllEvents synchronously More... | |
| MTGetAllHostNames | queryGetAllHostNames () |
| convenience call to query MTGetAllHostNames synchronously More... | |
| MTGetAllHosts | queryGetAllHosts () |
| convenience call to query MTGetAllHosts synchronously More... | |
| MTGetAllPriceCategories | queryGetAllPriceCategories () |
| convenience call to query MTGetAllPriceCategories synchronously More... | |
| MTGetAllRightNames | queryGetAllRightNames () |
| convenience call to query MTGetAllRightNames synchronously More... | |
| MTGetAllRoles | queryGetAllRoles () |
| convenience call to query MTGetAllRoles synchronously More... | |
| MTGetAllRooms | queryGetAllRooms () |
| convenience call to query MTGetAllRooms synchronously More... | |
| MTGetAllSeatPlans | queryGetAllSeatPlans () |
| convenience call to query MTGetAllSeatPlans synchronously More... | |
| MTGetAllShipping | queryGetAllShipping () |
| convenience call to query MTGetAllShipping synchronously More... | |
| MTGetAllUsers | queryGetAllUsers () |
| convenience call to query MTGetAllUsers synchronously More... | |
| MTGetCoupon | queryGetCoupon (const QString &acouponid) |
| convenience call to query MTGetCoupon synchronously More... | |
| MTGetCouponList | queryGetCouponList (const QString &acouponid) |
| convenience call to query MTGetCouponList synchronously More... | |
| MTGetCreateCustomerHints | queryGetCreateCustomerHints () |
| convenience call to query MTGetCreateCustomerHints synchronously More... | |
| MTGetCustomer | queryGetCustomer (const qint64 &acustomerid) |
| convenience call to query MTGetCustomer synchronously More... | |
| MTGetEntranceEvents | queryGetEntranceEvents (const qint64 &amaxbeforestart, const qint64 &amaxafterend) |
| convenience call to query MTGetEntranceEvents synchronously More... | |
| MTGetEvent | queryGetEvent (const qint64 &aeventid) |
| convenience call to query MTGetEvent synchronously More... | |
| MTGetEventList | queryGetEventList (const QList< qint64 > &aeventids) |
| convenience call to query MTGetEventList synchronously More... | |
| MTGetEventSaleInfo | queryGetEventSaleInfo (const qint64 &aeventid) |
| convenience call to query MTGetEventSaleInfo synchronously More... | |
| MTGetEventSummary | queryGetEventSummary (const qint64 &aeventid) |
| convenience call to query MTGetEventSummary synchronously More... | |
| MTGetLanguage | queryGetLanguage (const QString &alanguage, const QString &aformat) |
| convenience call to query MTGetLanguage synchronously More... | |
| MTGetMyOrders | queryGetMyOrders (const qint64 &aoldest, const bool &aincludeall) |
| convenience call to query MTGetMyOrders synchronously More... | |
| MTGetMyRights | queryGetMyRights () |
| convenience call to query MTGetMyRights synchronously More... | |
| MTGetMyRoles | queryGetMyRoles () |
| convenience call to query MTGetMyRoles synchronously More... | |
| MTGetOrder | queryGetOrder (const qint64 &aorderid) |
| convenience call to query MTGetOrder synchronously More... | |
| MTGetOrderAudit | queryGetOrderAudit (const qint64 &aorderid) |
| convenience call to query MTGetOrderAudit synchronously More... | |
| MTGetOrderByBarcode | queryGetOrderByBarcode (const QString &abarcode) |
| convenience call to query MTGetOrderByBarcode synchronously More... | |
| MTGetOrderDocument | queryGetOrderDocument (const qint64 &aorderid, const QString &afilename) |
| convenience call to query MTGetOrderDocument synchronously More... | |
| MTGetOrderDocumentNames | queryGetOrderDocumentNames (const qint64 &aorderid) |
| convenience call to query MTGetOrderDocumentNames synchronously More... | |
| MTGetOrderList | queryGetOrderList (const qint64 &aoldest) |
| convenience call to query MTGetOrderList synchronously More... | |
| MTGetOrdersByCoupon | queryGetOrdersByCoupon (const qint64 &aoldest, const QString &acouponid) |
| convenience call to query MTGetOrdersByCoupon synchronously More... | |
| MTGetOrdersByCustomer | queryGetOrdersByCustomer (const qint64 &acustomerid, const qint64 &aoldest) |
| convenience call to query MTGetOrdersByCustomer synchronously More... | |
| MTGetOrdersByEvents | queryGetOrdersByEvents (const QList< qint64 > &aevents, const qint64 &aoldest) |
| convenience call to query MTGetOrdersByEvents synchronously More... | |
| MTGetOrdersByUser | queryGetOrdersByUser (const qint64 &aoldest, const bool &aincludeall, const QString &ausername) |
| convenience call to query MTGetOrdersByUser synchronously More... | |
| MTGetPaymentTypes | queryGetPaymentTypes () |
| convenience call to query MTGetPaymentTypes synchronously More... | |
| MTGetPrintAtHomeSettings | queryGetPrintAtHomeSettings () |
| convenience call to query MTGetPrintAtHomeSettings synchronously More... | |
| MTGetRole | queryGetRole (const QString &arole) |
| convenience call to query MTGetRole synchronously More... | |
| MTGetTemplate | queryGetTemplate (const QString &afilename) |
| convenience call to query MTGetTemplate synchronously More... | |
| MTGetTemplateList | queryGetTemplateList () |
| convenience call to query MTGetTemplateList synchronously More... | |
| MTGetTicket | queryGetTicket (const QString &aticketid) |
| convenience call to query MTGetTicket synchronously More... | |
| MTGetTicketAudit | queryGetTicketAudit (const QString &aticketid) |
| convenience call to query MTGetTicketAudit synchronously More... | |
| MTGetUser | queryGetUser (const QString &auname) |
| convenience call to query MTGetUser synchronously More... | |
| MTGetUserAudit | queryGetUserAudit (const QString &auname, const qint64 &aoldest) |
| convenience call to query MTGetUserAudit synchronously More... | |
| MTGetUserHosts | queryGetUserHosts (const QString &ausername) |
| convenience call to query MTGetUserHosts synchronously More... | |
| MTGetUserRoles | queryGetUserRoles (const QString &ausername) |
| convenience call to query MTGetUserRoles synchronously More... | |
| MTGetValidFlags | queryGetValidFlags () |
| convenience call to query MTGetValidFlags synchronously More... | |
| MTGetValidVoucherPrices | queryGetValidVoucherPrices () |
| convenience call to query MTGetValidVoucherPrices synchronously More... | |
| MTGetVoucher | queryGetVoucher (const QString &avoucherid) |
| convenience call to query MTGetVoucher synchronously More... | |
| MTGetVoucherAudit | queryGetVoucherAudit (const QString &avoucherid) |
| convenience call to query MTGetVoucherAudit synchronously More... | |
| MTLogin | queryLogin (const QString &ausername, const QString &apassword, const QString &ahostname, const QString &ahostkey) |
| convenience call to query MTLogin synchronously More... | |
| MTLogout | queryLogout () |
| convenience call to query MTLogout synchronously More... | |
| MTOrderAddComment | queryOrderAddComment (const qint64 &aorderid, const QString &acomment) |
| convenience call to query MTOrderAddComment synchronously More... | |
| MTOrderChangeComments | queryOrderChangeComments (const qint64 &aorderid, const QString &acomments) |
| convenience call to query MTOrderChangeComments synchronously More... | |
| MTOrderChangeShipping | queryOrderChangeShipping (const qint64 &aorderid, const qint64 &ashippingid, const qint64 &ashippingcosts) |
| convenience call to query MTOrderChangeShipping synchronously More... | |
| MTOrderMarkShipped | queryOrderMarkShipped (const qint64 &aorderid, const qint64 &ashiptime) |
| convenience call to query MTOrderMarkShipped synchronously More... | |
| MTOrderPay | queryOrderPay (const qint64 &aorderid, const qint64 &aamount, const QString &apaytype, const QString &apaydata) |
| convenience call to query MTOrderPay synchronously More... | |
| MTOrderRefund | queryOrderRefund (const qint64 &aorderid, const qint64 &aamount) |
| convenience call to query MTOrderRefund synchronously More... | |
| MTReservationToOrder | queryReservationToOrder (const qint64 &aorderid) |
| convenience call to query MTReservationToOrder synchronously More... | |
| MTResetCustomerPassword | queryResetCustomerPassword (const qint64 &acustomerid) |
| convenience call to query MTResetCustomerPassword synchronously More... | |
| MTRestoreBackup | queryRestoreBackup (const QString &abackup, const bool &aupdate) |
| convenience call to query MTRestoreBackup synchronously More... | |
| MTReturnTicketVoucher | queryReturnTicketVoucher (const QString &abarcode) |
| convenience call to query MTReturnTicketVoucher synchronously More... | |
| MTSendCustomerMail | querySendCustomerMail (const qint64 &acustomerid, const QString &acontent) |
| convenience call to query MTSendCustomerMail synchronously More... | |
| MTServerInfo | queryServerInfo () |
| convenience call to query MTServerInfo synchronously More... | |
| MTSetDefaultPaymentType | querySetDefaultPaymentType (const QString &adefaultpaytype) |
| convenience call to query MTSetDefaultPaymentType synchronously More... | |
| MTSetFlag | querySetFlag (const MOFlag &aflag) |
| convenience call to query MTSetFlag synchronously More... | |
| MTSetHost | querySetHost (const QString &aname, const QString &akey) |
| convenience call to query MTSetHost synchronously More... | |
| MTSetOrderDocument | querySetOrderDocument (const MOOrderDocument &adocument) |
| convenience call to query MTSetOrderDocument synchronously More... | |
| MTSetPaymentType | querySetPaymentType (const MOPaymentType &apaytype) |
| convenience call to query MTSetPaymentType synchronously More... | |
| MTSetPrintAtHomeSettings | querySetPrintAtHomeSettings (const QList< MOKeyValuePair > &asettings) |
| convenience call to query MTSetPrintAtHomeSettings synchronously More... | |
| MTSetRoleDescription | querySetRoleDescription (const QString &arole, const QString &adescription) |
| convenience call to query MTSetRoleDescription synchronously More... | |
| MTSetRoleFlags | querySetRoleFlags (const QString &arole, const QList< QString > &aflags) |
| convenience call to query MTSetRoleFlags synchronously More... | |
| MTSetRoleRights | querySetRoleRights (const QString &arole, const QList< QString > &arights) |
| convenience call to query MTSetRoleRights synchronously More... | |
| MTSetTemplate | querySetTemplate (const QString &afilename, const QByteArray &atemplatedata, const QString &adescription) |
| convenience call to query MTSetTemplate synchronously More... | |
| MTSetTemplateDescription | querySetTemplateDescription (const QString &afilename, const QString &adescription) |
| convenience call to query MTSetTemplateDescription synchronously More... | |
| MTSetTemplateFlags | querySetTemplateFlags (const QString &afilename, const QString &aflags) |
| convenience call to query MTSetTemplateFlags synchronously More... | |
| MTSetUserDescription | querySetUserDescription (const QString &ausername, const QString &adescription) |
| convenience call to query MTSetUserDescription synchronously More... | |
| MTSetUserFlags | querySetUserFlags (const QString &ausername, const QList< QString > &aflags) |
| convenience call to query MTSetUserFlags synchronously More... | |
| MTSetUserHosts | querySetUserHosts (const QString &ausername, const QList< QString > &ahosts) |
| convenience call to query MTSetUserHosts synchronously More... | |
| MTSetUserRoles | querySetUserRoles (const QString &ausername, const QList< QString > &aroles) |
| convenience call to query MTSetUserRoles synchronously More... | |
| MTUpdateSeatPlan | queryUpdateSeatPlan (const MOSeatPlanInfo &aplan) |
| convenience call to query MTUpdateSeatPlan synchronously More... | |
| MTUseTicket | queryUseTicket (const QString &aticketid, const qint64 &aeventid) |
| convenience call to query MTUseTicket synchronously More... | |
| MTUseVoucher | queryUseVoucher (const qint64 &aorderid, const QString &avoucherid) |
| convenience call to query MTUseVoucher synchronously More... | |
| MTWebCartAddCoupon | queryWebCartAddCoupon (const QString &acartid, const QString &acouponid) |
| convenience call to query MTWebCartAddCoupon synchronously More... | |
| MTWebCartAddTicket | queryWebCartAddTicket (const QString &acartid, const qint64 &aeventid, const qint64 &apricecategoryid, const qint64 &aamount) |
| convenience call to query MTWebCartAddTicket synchronously More... | |
| MTWebCartAddVoucher | queryWebCartAddVoucher (const QString &acartid, const qint64 &aprice) |
| convenience call to query MTWebCartAddVoucher synchronously More... | |
| MTWebCartRemoveTicket | queryWebCartRemoveTicket (const QString &acartid, const qint64 &aeventid, const qint64 &apricecategoryid) |
| convenience call to query MTWebCartRemoveTicket synchronously More... | |
| MTWebCartRemoveVoucher | queryWebCartRemoveVoucher (const QString &acartid, const qint64 &alineid) |
| convenience call to query MTWebCartRemoveVoucher synchronously More... | |
| Q_INVOKABLE QString | versionInfo (WOb::VersionInfo) const |
| returns version information of this interface More... | |
| Q_INVOKABLE QString | wocVersionInfo (WOb::VersionInfo) const |
| returns version information about the WOC that created the interface class More... | |
Static Public Member Functions | |
| static QString | appDataDir () |
| return application main data directory More... | |
| static MSInterface * | instance () |
| returns the singleton instance of the interface More... | |
| static QString | resolveDir (const QString &dir) |
| helper function to resolve directory names with patterns the string $BASE is resolved as the content of the environment variable Unix: $HOME or Windows: APPDIR% the string $APP is resolved as the directory the application is installed in any other component starting with $ resolves to the environment variable of the same name More... | |
| static void | setAppDataDir (QString) |
| override the application main data directory More... | |
Static Public Member Functions inherited from MInterface | |
| static Q_INVOKABLE MInterface::RightList | allKnownRights () |
| returns a list of all known rights/transactions More... | |
| static Q_INVOKABLE QStringList | allKnownRightsString () |
| converts a localized string to a matching right enum, returns NoRight if the string does not match More... | |
| static MInterface * | instance (QString name="MagicSmoke") |
| convenience override: returns a pointer to an instance with the given name if it is of the correct type, otherwise nullptr More... | |
| static Q_INVOKABLE QString | rightToLocalString (Right) |
| converts a right enum to its localized string representation More... | |
| static Q_INVOKABLE QString | rightToString (Right) |
| converts a right enum to its string representation More... | |
| static Q_INVOKABLE QString | staticVersionInfo (WOb::VersionInfo) |
| returns version information of this interface More... | |
| static Q_INVOKABLE QString | staticWocVersionInfo (WOb::VersionInfo) |
| returns version information about the WOC that created the interface class More... | |
| static Q_INVOKABLE Right | stringToRight (QString) |
| converts a string to a matching right enum, returns NoRight if the string does not match More... | |
the MagicSmoke specific interface class - enhances the basic interface by some functionality needed in the MagicSmoke context
| MSInterface::MSInterface | ( | QString | pid | ) |
creates the interface object, expects the profile ID as parameter
References dataDir().
| MSInterface::~MSInterface | ( | ) |
deletes the interface
References logout().
|
inline |
return all flags of the current user
|
inline |
return all rights of the current user
|
inline |
return all roles of the current user
|
static |
|
inline |
returns whether this instance automatically logs out on closure
| bool MSInterface::checkFlags | ( | const QStringList & | fl | ) | const |
checks the flags in the string list and returns true if all of them match
Referenced by MTemplateStore::getTemplate(), MShippingChange::MShippingChange(), and MCartTab::updateShipping().
|
inline |
checks the space separeted flags in the string and returns true if all of them match
References checkFlags().
Referenced by checkFlags().
| bool MSInterface::checkServer | ( | ) |
checks the server for compatibility
References MTServerInfo::getMinimumProtocolVersion(), MTServerInfo::getServerProtocolVersion(), MTServerInfo::query(), and MBoxWrapper::warning().
Referenced by MLogin::startLogin().
| QString MSInterface::configSettingsGroup | ( | ) | const |
returns the group where central profile settings are stored, this group is read-only for anything but the configuration dialog
|
inline |
returns the name of the current user
| Q_INVOKABLE QString MSInterface::dataDir | ( | ) | const |
returns the directory where to store data retrieved from the server
Referenced by MSInterface(), and setAppDataDir().
|
inline |
returns whether the user has a particular flag
| bool MSInterface::hasRight | ( | Right | r | ) | const |
returns whether the user has a particular right
|
inline |
returns whether the user is part of this role
|
virtual |
returns default headers, ie.
session ID
|
inline |
returns the name used for the host in this session
| void MSInterface::initialize | ( | ) |
initializes the interface, ie.
retrieves language and scripts
References MTGetLanguage::getfile(), MTGetLanguage::getformats(), MTGetLanguage::getstatusBarText(), MTGetLanguage::query(), and MLocalFormat::setDefaultFormat().
Referenced by main(), and MagicSmokeMain::realmain().
|
inlinestatic |
returns the singleton instance of the interface
References MInterface::instance().
Referenced by MApplication::aboutMS(), MOverview::editTemplates(), MTemplateStore::getTemplate(), MSessionManager::hasSession(), MOEvent::MOEvent(), MShippingChange::MShippingChange(), MSessionManager::profile(), MSessionManager::profileName(), MLogin::relogin(), MSessionManager::sessionId(), MCartTab::updateShipping(), MSessionManager::username(), and MSessionManager::~MSessionManager().
|
slot |
logs into the server, returns true on success
References MTLogin::getsessionid(), MTLogin::getvalidtill(), loginSession(), needRelogin(), MTLogin::query(), and MBoxWrapper::warning().
Referenced by relogin(), and MLogin::startLogin().
|
slot |
initializes with a known session ID, returns true on success
References MTGetMyRights::asyncQuery(), MTGetMyRoles::asyncQuery(), MTGetMyRights::getflag(), MTGetMyRights::getright(), MInterface::NoRight, setSessionId(), and MInterface::stringToRight().
Referenced by login(), main(), and MagicSmokeMain::realmain().
|
slot |
logs out of the server
References MInterface::queryLogout().
Referenced by relogin(), MSessionManager::~MSessionManager(), and ~MSInterface().
|
signal |
emitted when a re-login would be necessary
Referenced by login().
| QUrl MSInterface::parentUrl | ( | ) | const |
return the parent directory of the base URL
|
inline |
returns the profile ID of this session
| QString MSInterface::profileName | ( | ) | const |
returns the human readable name of the profile
Referenced by MSessionManager::profileName().
|
slot |
|
static |
helper function to resolve directory names with patterns the string $BASE is resolved as the content of the environment variable Unix: $HOME or Windows: APPDIR% the string $APP is resolved as the directory the application is installed in any other component starting with $ resolves to the environment variable of the same name
References BASEDIRVAR.
Referenced by setAppDataDir(), and MApplication::setConfigDir().
|
inline |
returns the current session ID
|
static |
override the application main data directory
References dataDir(), and resolveDir().
Referenced by MApplication::setDataDir().
|
inline |
sets whether this instance automatically logs out on closure
Referenced by MLogin::startLogin().
|
inlineslot |
sets the session id to be transmitted
Referenced by loginSession().
| Q_INVOKABLE QString MSInterface::settingsGroup | ( | ) | const |
returns the group in which to find settings in QSettings, this group can be used by any class that accesses the profile
|
virtualslot |
handles SSL errors
References MSslExceptions::checksslexcept(), and MBoxWrapper::warning().
|
inline |
returns the status bar text
|
inline |
returns a pointer to the template storage engine
|
slot |
force template store to update its templates
References MTemplateStore::updateTemplates().