#include <outboxjob.h>
Inheritance diagram for HBCI::OutboxJob:
Public Methods | |
OutboxJob (Pointer< Customer > c) | |
virtual | ~OutboxJob () |
Manage Customer | |
Pointer< Customer > | customer () const |
void | addSigner (Pointer< Customer > c) |
Status Information | |
OutboxJob_Status | status () const |
OutboxJob_Result | result () const |
int | id () const |
virtual string | description () const=0 |
virtual list< int > | resultCodes () const=0 |
const MessageReference & | messageReference () const |
virtual int | segmentForStatusReport () const |
virtual JobProgressType | type () const=0 |
Protected Methods | |
void | addSignersToQueue (Pointer< MessageQueue > q) const |
virtual int | messages () const |
Manipulation from HBCIAPI | |
void | setId (int i) |
void | setMessageReference (const MessageReference &ref) |
void | setStatus (OutboxJob_Status s) |
virtual bool | createHBCIJobs (Pointer< MessageQueue > mbox, int n=0)=0 |
virtual bool | evaluate ()=0 |
virtual bool | commit (int msgNumber=HBCI_COMMIT_WHOLE_JOB)=0 |
Information for HBCIAPI | |
virtual bool | isDialogJob () const |
virtual bool | stillMessagesToSend (int nextMsg) const |
Static Protected Methods | |
list< int > | resultCodesFromJob (const Job &job) |
Protected Attributes | |
Pointer< Customer > | _cust |
Pointer< Bank > | _bank |
OutboxJob_Result | _result |
Friends | |
class | API |
class | Outbox |
class | customerQueue |
This is an abstract base class for the jobs of the OpenHBCI-Wrapper API. Every job to be used in the Outbox is derived from this.
If you plan to add a new job, just code your own derivation. But note that in order to provide the ProgressMonitor with the information that *this* job is being started, you would need to add an appropriate enum value to JobProgressType in progressmonitor.h . Apart from that, you don't need to take care of anything else except to derive from OutboxJob.
|
Default Constructor. |
|
Default Destructor. |
|
Adds a signer. Here you can add a signer. In most cases you don't need this method, since the first signer is already given in the constructor. But you need this method if this job needs multiple signers for your bank.
|
|
Helper function to copy the stored signers to the given message queue. |
|
Call this method to commit changes to the system. Since Jobs do not change the system you may call this method to commit the changes. A job for getting the balance for example may decide to store the retrieved balance in the corresponding account.
Implemented in HBCI::OutboxJobGetBalance, HBCI::OutboxJobGetTransactions, HBCI::OutboxJobTransfer, HBCI::OutboxJobDebitNote, HBCI::OutboxJobKeys, HBCI::OutboxJobDisableKeys, HBCI::OutboxJobChangeKeys, HBCI::OutboxJobGetAccounts, HBCI::OutboxJobSynchronize, HBCI::OutboxJobGetStatusReports, HBCI::OutboxJobGetStandingOrders, HBCI::OutboxJobNewStandingOrder, and HBCI::OutboxJobDeleteStandingOrder. |
|
Let the job create the "real" jobs and add them to the message queue given.
Implemented in HBCI::OutboxJobGetBalance, HBCI::OutboxJobGetTransactions, HBCI::OutboxJobTransfer, HBCI::OutboxJobDebitNote, HBCI::OutboxJobKeys, HBCI::OutboxJobDisableKeys, HBCI::OutboxJobDisableLostKeys, HBCI::OutboxJobChangeKeys, HBCI::OutboxJobGetAccounts, HBCI::OutboxJobSynchronize, HBCI::OutboxJobGetStatusReports, HBCI::OutboxJobGetStandingOrders, HBCI::OutboxJobNewStandingOrder, and HBCI::OutboxJobDeleteStandingOrder. |
|
Returns a pointer to the Customer owning this job.
|
|
Return a short description of what the job is supposed to do.
Implemented in HBCI::OutboxJobGetBalance, HBCI::OutboxJobGetTransactions, HBCI::OutboxJobTransfer, HBCI::OutboxJobDebitNote, HBCI::OutboxJobKeys, HBCI::OutboxJobGetKeys, HBCI::OutboxJobSendKeys, HBCI::OutboxJobDisableKeys, HBCI::OutboxJobChangeKeys, HBCI::OutboxJobGetAccounts, HBCI::OutboxJobSynchronize, HBCI::OutboxJobGetSystemId, HBCI::OutboxJobGetStatusReports, HBCI::OutboxJobGetStandingOrders, HBCI::OutboxJobNewStandingOrder, and HBCI::OutboxJobDeleteStandingOrder. |
|
Let the job check the result and set the flags. Let the job check the result. This means checking the results of all Jobs involved (which otherwise is not done automatically). This method sets its status and result accordingly -- otherwise the status and result flags might not be up-to-date.
Implemented in HBCI::OutboxJobGetBalance, HBCI::OutboxJobGetTransactions, HBCI::OutboxJobTransfer, HBCI::OutboxJobDebitNote, HBCI::OutboxJobKeys, HBCI::OutboxJobGetAccounts, HBCI::OutboxJobSynchronize, HBCI::OutboxJobGetStatusReports, HBCI::OutboxJobGetStandingOrders, HBCI::OutboxJobNewStandingOrder, and HBCI::OutboxJobDeleteStandingOrder. |
|
Return the id of this job. Return the id of this job. Each enqueued job has a unique id. This can be used from an application to identify specific jobs after they have been added to the outbox queue.
|
|
Return true if this OutboxJob is a dialog job. A dialog job is one that handles the opening and closing of a dialog itself. Such are OutboxJobGetKeys, OutboxJobSendKeys etc.
Reimplemented in HBCI::OutboxJobKeys, and HBCI::OutboxJobSynchronize. |
|
Returns the message reference of this job. This is later used for status reports, StatusReport::messageReference(). FIXME: This is not set in the beginning, but it is only set after that job has been executed, or did I get something wrong? |
|
Returns the number of messages this job needs. This method is used to calculate the return value of OutboxJob::stillMessagesToSend, and it is used by API::_handleJobQueue to determine the number of actions that are going to be started. If this is a dialog job, then it consists of at least two messages:
Reimplemented in HBCI::OutboxJobKeys, HBCI::OutboxJobDisableKeys, HBCI::OutboxJobDisableLostKeys, HBCI::OutboxJobChangeKeys, and HBCI::OutboxJobSynchronize. |
|
Return the result code of the job. Return the result code of the job. This of course is only usefull AFTER the job has been performed ;-) The result can be one of these:
|
|
Returns a list of result codes of this job. This can be used to get more detailed information if the result of this job was HBCI_JOB_RESULT_FAILED. In that case, you can traverse this list, checking for resultcodes >= 9000. Each of those can be the source of the job failure, so you can react accordingly. HBCI spec suggests that the most important of them can be found at the front() already, but that depends on your bank. Note: A resultcode >= 9000 does not automatically mean an error, see MessageQueue::getResult().
Implemented in HBCI::OutboxAccountJob, HBCI::OutboxJobGetBalance, HBCI::OutboxJobGetTransactions, HBCI::OutboxJobTransfer, HBCI::OutboxJobDebitNote, HBCI::OutboxJobKeys, HBCI::OutboxJobGetAccounts, HBCI::OutboxJobSynchronize, HBCI::OutboxJobGetStatusReports, HBCI::OutboxJobGetStandingOrders, HBCI::OutboxJobNewStandingOrder, and HBCI::OutboxJobDeleteStandingOrder. |
|
Helper function to extract a list of result codes from a Job. |
|
Returns the number of the segment to be used for status reports, i.e. the number that shows up in StatusReport::segment() (FIXME: is this correct?) FIXME: This is not set in the beginning, but it is only set after that job has been executed, or did I get something wrong? By default this is "-1", meaning no segment number (NOTE: In this case the corresponding field in HKPRO will be left out). This can be overriden by a derived OutboxJob. Reimplemented in HBCI::OutboxJobTransfer, and HBCI::OutboxJobDebitNote. |
|
Set id. This is called by the Outbox to assign a unique id to all enqueued jobs.
|
|
Sets the reference of this message, used for status reports later.
|
|
Set status of this job. |
|
Returns the status of this job. Returns the status of this job. It can be one of the following:
|
|
Returns true if there are still messages to be sent. Checks if there are still messages to be sent. This is needed because some jobs don't know the number of messages they consist of, until they are executed.
Reimplemented in HBCI::OutboxJobGetTransactions, HBCI::OutboxJobGetStatusReports, HBCI::OutboxJobGetStandingOrders, HBCI::OutboxJobNewStandingOrder, and HBCI::OutboxJobDeleteStandingOrder. |
|
Return the JobProgressType of this job.
Implemented in HBCI::OutboxJobGetBalance, HBCI::OutboxJobGetTransactions, HBCI::OutboxJobTransfer, HBCI::OutboxJobDebitNote, HBCI::OutboxJobGetKeys, HBCI::OutboxJobSendKeys, HBCI::OutboxJobDisableKeys, HBCI::OutboxJobChangeKeys, HBCI::OutboxJobGetAccounts, HBCI::OutboxJobGetSystemId, HBCI::OutboxJobGetStatusReports, HBCI::OutboxJobGetStandingOrders, HBCI::OutboxJobNewStandingOrder, and HBCI::OutboxJobDeleteStandingOrder. |
|
|
|
|
|
|
|
|
|
|
|
|