mmsengine/mmsserver/inc/mmsdeleteoperation.h
changeset 31 ebfee66fde93
child 47 5b14749788d7
equal deleted inserted replaced
30:6a20128ce557 31:ebfee66fde93
       
     1 /*
       
     2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *     State machine for sending a delete request to network
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef MMSDELETEOPERATION_H
       
    22 #define MMSDELETEOPERATION_H
       
    23 
       
    24 //  INCLUDES
       
    25 
       
    26 #include "mmsbaseoperation.h"
       
    27 
       
    28 // CONSTANTS
       
    29 
       
    30 // MACROS
       
    31 
       
    32 // DATA TYPES
       
    33 
       
    34 // FUNCTION PROTOTYPES
       
    35 
       
    36 // FORWARD DECLARATIONS
       
    37 class CMmsHeaders;
       
    38 class CMmsEncode;
       
    39 class CMmsDecode;
       
    40 class CLogClient;
       
    41 class CLogViewEvent;
       
    42 class CLogEvent;
       
    43 class CMmsLog;
       
    44 
       
    45 // CLASS DECLARATION
       
    46 
       
    47 /**
       
    48 *  State machine for sending forward request
       
    49 */
       
    50 class CMmsDeleteOperation :public CMmsBaseOperation
       
    51     {
       
    52     public:  // Constructors and destructor
       
    53         
       
    54         /**
       
    55         * Two-phased constructor.
       
    56         * @param aFs file system session
       
    57         * @param aLogClient log client for writing into log
       
    58         * @param aLogEvent log event for writing entries into log
       
    59         */
       
    60         static CMmsDeleteOperation* NewL( RFs& aFs,  CMmsSettings* aMmsSettings );
       
    61         
       
    62         /**
       
    63         * Destructor.
       
    64         */
       
    65         virtual ~CMmsDeleteOperation();
       
    66 
       
    67     public: // New functions
       
    68                 
       
    69         /**
       
    70         * Start the state machine.
       
    71         * @param aDeleteType specifies the scope of the notification delete
       
    72         * @param aSelection list of message entry ids to be handled.
       
    73         * @param aServerEntry CMsvServerEntry pointer from CMmsServer
       
    74         * @param aSettings MMSC settings (entry points)
       
    75         * @param aService current MMS service id
       
    76         * @param aStatus TRequestStatus of the calling active object
       
    77         */
       
    78         void StartL(
       
    79             TMmsDeleteOperationType aDeleteType,
       
    80             CMsvEntrySelection& aSelection,
       
    81             CMsvServerEntry& aServerEntry,
       
    82             TMsvId aService,
       
    83             TRequestStatus& aStatus );
       
    84 
       
    85     public: // Functions from base classes
       
    86 
       
    87         /**
       
    88         * Overriding the StartL of the base operation
       
    89         * This should not be called with DeleteOperation.
       
    90         * Leaves with Not implemented
       
    91         */
       
    92         void StartL(
       
    93             CMsvEntrySelection& aSelection,
       
    94             CMsvServerEntry& aServerEntry,
       
    95             TMsvId aService,
       
    96             TRequestStatus& aStatus );
       
    97 
       
    98     protected:  // New functions
       
    99         
       
   100     protected:  // Functions from base classes
       
   101 
       
   102         /**
       
   103         * DoCancel
       
   104         */
       
   105         virtual void DoCancel();
       
   106         
       
   107     private:
       
   108 
       
   109         /**
       
   110         * Default constructor
       
   111         */
       
   112         CMmsDeleteOperation( RFs& aFs );
       
   113 
       
   114         /**
       
   115         * By default Symbian OS constructor is private.
       
   116         */
       
   117         void ConstructL( CMmsSettings* aMmsSettings );
       
   118 
       
   119         // We don't need to prohibit copy & assignment constructors here,
       
   120         // as they are in CBase already
       
   121 
       
   122     private: // Methods representing states that are overridden
       
   123 
       
   124         /**
       
   125         * Encode one message
       
   126         */
       
   127         void EncodePDUL();
       
   128 
       
   129         /**
       
   130         * Connect to GPRS AP
       
   131         */
       
   132         void ConnectToIAPL();
       
   133 
       
   134         /**
       
   135         * Initialize the session
       
   136         */
       
   137         void InitializeSessionL();
       
   138 
       
   139         /**
       
   140         * Submit transaction
       
   141         */
       
   142         void SubmitTransactionL();
       
   143 
       
   144         /**
       
   145         * Decode Response
       
   146         */
       
   147         void DecodeResponseL();
       
   148 
       
   149         /**
       
   150         * Update the trigger entry status
       
   151         */
       
   152         void UpdateEntryStatusL();
       
   153 
       
   154     private: // Other private methods
       
   155 
       
   156         /**
       
   157         * DeleteNotificationEntryL deletes the entry
       
   158         */
       
   159         void DeleteNotificationEntryL();
       
   160 
       
   161         /**
       
   162         * MarkSelectionAsFailed clears the flags of all the entries in iSelection
       
   163         */
       
   164         void MarkSelectionAsFailed();
       
   165 
       
   166     public:     // Data
       
   167     
       
   168     protected:  // Data
       
   169 
       
   170     private:    // Data
       
   171         TMmsDeleteOperationType iDeleteType; // specifies the type of the delete operation
       
   172         CMmsHeaders* iMmsRequestHeaders; // request PDU
       
   173 
       
   174     public:     // Friend classes
       
   175     protected:  // Friend classes
       
   176     private:    // Friend classes
       
   177     };
       
   178 
       
   179 #endif      // MMSDELETEOPERATION_H   
       
   180             
       
   181 // End of File