localconnectivityservice/dun/atext/inc/DunAtCmdPusher.h
branchRCL_3
changeset 38 3dcb815346df
parent 19 2702348f1fe7
equal deleted inserted replaced
37:7e0ecb5b116a 38:3dcb815346df
    26 
    26 
    27 /**
    27 /**
    28  *  Notification interface class for data pushing status changes
    28  *  Notification interface class for data pushing status changes
    29  *
    29  *
    30  *  @lib dunatext.lib
    30  *  @lib dunatext.lib
    31  *  @since S60 v5.0
    31  *  @since TB9.2
    32  */
    32  */
    33 NONSHARABLE_CLASS( MDunAtCmdPusher )
    33 NONSHARABLE_CLASS( MDunAtCmdPusher )
    34     {
    34     {
    35 
    35 
    36 public:
    36 public:
    38     /**
    38     /**
    39      * Notifies about end of AT command processing.
    39      * Notifies about end of AT command processing.
    40      * This is after all reply data for an AT command is multiplexed to the
    40      * This is after all reply data for an AT command is multiplexed to the
    41      * downstream.
    41      * downstream.
    42      *
    42      *
    43      * @since S60 5.0
    43      * @since TB9.2
    44      * @param aError Error code of command processing completion
    44      * @param aError Error code of command processing completion
    45      * @return Symbian error code on error, KErrNone otherwise
    45      * @return Symbian error code on error, KErrNone otherwise
    46      */
    46      */
    47     virtual TInt NotifyEndOfProcessing( TInt aError ) = 0;
    47     virtual TInt NotifyEndOfProcessing( TInt aError ) = 0;
    48 
    48 
    49     /**
    49     /**
    50      * Notifies about request to stop AT command handling for the rest of the
    50      * Notifies about request to stop AT command handling for the rest of the
    51      * command line data
    51      * command line data
    52      *
    52      *
    53      * @since S60 5.0
    53      * @since TB9.2
    54      * @return Symbian error code on error, KErrNone otherwise
    54      * @return Symbian error code on error, KErrNone otherwise
    55      */
    55      */
    56     virtual TInt NotifyEndOfCmdLineProcessing() = 0;
    56     virtual void NotifyEndOfCmdLineProcessing() = 0;
    57 
    57 
    58     /**
    58     /**
    59      * Notifies about request to peek for the next command
    59      * Notifies about request to peek for the next command
    60      *
    60      *
    61      * @since S60 5.0
    61      * @since TB9.2
    62      * @return ETrue if next command exists, EFalse otherwise
    62      * @return ETrue if next command exists, EFalse otherwise
    63      */
    63      */
    64     virtual TBool NotifyNextCommandPeekRequest() = 0;
    64     virtual TBool NotifyNextCommandPeekRequest() = 0;
    65 
    65 
    66     /**
    66     /**
    75 
    75 
    76 /**
    76 /**
    77  *  Class for AT command URC handler
    77  *  Class for AT command URC handler
    78  *
    78  *
    79  *  @lib dunatext.lib
    79  *  @lib dunatext.lib
    80  *  @since S60 v5.0
    80  *  @since TB9.2
    81  */
    81  */
    82 NONSHARABLE_CLASS( CDunAtCmdPusher ) : public CActive,
    82 NONSHARABLE_CLASS( CDunAtCmdPusher ) : public CActive,
    83                                        public MDunCompletionReporter
    83                                        public MDunCompletionReporter
    84     {
    84     {
    85 
    85 
   117     virtual ~CDunAtCmdPusher();
   117     virtual ~CDunAtCmdPusher();
   118 
   118 
   119     /**
   119     /**
   120      * Resets data to initial values
   120      * Resets data to initial values
   121      *
   121      *
   122      * @since S60 5.0
   122      * @since TB9.2
   123      * @return None
   123      * @return None
   124      */
   124      */
   125     void ResetData();
   125     void ResetData();
   126 
   126 
   127     /**
   127     /**
   128      * Starts AT command handling
   128      * Starts AT command handling
   129      *
   129      *
   130      * @since S60 5.0
   130      * @since TB9.2
   131      * @param aCommand AT command or editor mode input to handle
   131      * @param aInput AT command or editor mode input to handle
   132      * @param aNormalMode ETrue if request issue for normal mode
   132      * @param aNormalMode ETrue if request issue for normal mode
   133      * @return Symbian error code on error, KErrNone otherwise
   133      * @return Symbian error code on error, KErrNone otherwise
   134      */
   134      */
   135     TInt IssueRequest( TDesC8& aCommand, TBool aNormalMode=ETrue );
   135     TInt IssueRequest( TDesC8& aInput, TBool aNormalMode=ETrue );
   136 
   136 
   137     /**
   137     /**
   138      * Stops AT command handling
   138      * Stops AT command handling
   139      *
   139      *
   140      * @since S60 5.0
   140      * @since TB9.2
   141      * @return Symbian error code on error, KErrNone otherwise
   141      * @return Symbian error code on error, KErrNone otherwise
   142      */
   142      */
   143     TInt Stop();
   143     TInt Stop();
   144 
   144 
   145     /**
   145     /**
   146      * Manages request to abort command handling
   146      * Manages request to abort command handling
   147      *
   147      *
   148      * @since S60 5.0
   148      * @since TB9.2
   149      * @return Symbian error code on error, KErrNone otherwise
   149      * @return Symbian error code on error, KErrNone otherwise
   150      */
   150      */
   151     TInt ManageAbortRequest();
   151     TInt ManageAbortRequest();
   152 
   152 
   153     /**
   153     /**
   154      * Sets end of command line marker on for the possible series of AT
   154      * Sets end of command line marker on for the possible series of AT
   155      * commands.
   155      * commands.
   156      *
   156      *
   157      * @since S60 5.0
   157      * @since TB9.2
   158      * @param aPushLast ETrue to push last reply, EFalse otherwise
   158      * @param aPushLast ETrue to push last reply, EFalse otherwise
   159      * @return None
   159      * @return None
   160      */
   160      */
   161     void SetEndOfCmdLine();
   161     void SetEndOfCmdLine();
   162 
   162 
   178     void ConstructL();
   178     void ConstructL();
   179 
   179 
   180     /**
   180     /**
   181      * Initializes this class
   181      * Initializes this class
   182      *
   182      *
   183      * @since S60 5.0
   183      * @since TB9.2
   184      * @return None
   184      * @return None
   185      */
   185      */
   186     void Initialize();
   186     void Initialize();
   187 
   187 
   188     /**
   188     /**
   189      * Sets state to idle and notifies about subcommand handling completion
   189      * Sets state to idle and notifies about subcommand handling completion
   190      *
   190      *
   191      * @since S60 5.0
   191      * @since TB9.2
   192      * @param aError Error code for completion
   192      * @param aError Error code for completion
   193      * @return None
   193      * @return None
   194      */
   194      */
   195     void SetToIdleAndNotifyEnd( TInt aError );
   195     void SetToIdleAndNotifyEnd( TInt aError );
   196 
   196 
   197     /**
   197     /**
   198      * Checks if "OK" (verbose) or "0" (numeric) string or exists at the end of
   198      * Checks if "OK" (verbose) or "0" (numeric) string or exists at the end of
   199      * buffer and removes it
   199      * buffer and removes it
   200      *
   200      *
   201      * @since S60 5.0
   201      * @since TB9.2
   202      * @return Symbian error code on error, KErrNone otherwise
   202      * @return Symbian error code on error, KErrNone otherwise
   203      */
   203      */
   204     TInt CheckAndRemoveOkString();
   204     TInt CheckAndRemoveOkString();
   205 
   205 
   206     /**
   206     /**
   207      * Sends reply data to downstream
   207      * Sends reply data to downstream
   208      *
   208      *
   209      * @since S60 5.0
   209      * @since TB9.2
   210      * @param aRecvBuffer ETrue if using receive buffer
   210      * @param aRecvBuffer ETrue if using receive buffer
   211      *                    EFalse if using "OK" buffer
   211      *                    EFalse if using "OK" buffer
   212      * @return None
   212      * @return None
   213      */
   213      */
   214     void SendReplyData( TBool aRecvBuffer=ETrue );
   214     void SendReplyData( TBool aRecvBuffer=ETrue );
   246     void ManageReplyTypeChangeToEditor();
   246     void ManageReplyTypeChangeToEditor();
   247 
   247 
   248     /**
   248     /**
   249      * Manages change in reply type
   249      * Manages change in reply type
   250      *
   250      *
   251      * @since S60 5.0
   251      * @since TB9.2
   252      * @return None
   252      * @return None
   253      */
   253      */
   254     void ManageReplyTypeChange();
   254     void ManageReplyTypeChange();
   255 
   255 
   256 // from base class CActive
   256 // from base class CActive
   257 
   257 
   258     /**
   258     /**
   259      * From CActive.
   259      * From CActive.
   260      * Gets called when AT command handled
   260      * Gets called when AT command handled
   261      *
   261      *
   262      * @since S60 5.0
   262      * @since TB9.2
   263      * @return None
   263      * @return None
   264      */
   264      */
   265     void RunL();
   265     void RunL();
   266 
   266 
   267     /**
   267     /**
   268      * From CActive.
   268      * From CActive.
   269      * Gets called on cancel
   269      * Gets called on cancel
   270      *
   270      *
   271      * @since S60 5.0
   271      * @since TB9.2
   272      * @return None
   272      * @return None
   273      */
   273      */
   274     void DoCancel();
   274     void DoCancel();
   275 
   275 
   276 // from base class MDunCompletionReporter
   276 // from base class MDunCompletionReporter
   277 
   277 
   278     /**
   278     /**
   279      * From MDunCompletionReporter.
   279      * From MDunCompletionReporter.
   280      * Gets called when data push is complete
   280      * Gets called when data push is complete
   281      *
   281      *
   282      * @since S60 5.0
   282      * @since TB9.2
   283      * @param aAllPushed ETrue if all in the queue were pushed, EFalse otherwise
   283      * @param aAllPushed ETrue if all in the queue were pushed, EFalse otherwise
   284      * @return None
   284      * @return None
   285      */
   285      */
   286     void NotifyDataPushComplete( TBool aAllPushed );
   286     void NotifyDataPushComplete( TBool aAllPushed );
   287 
   287