btobexprofiles/obexsendservices/obexservicesendutils/inc/BTSOPPController.h
branchRCL_3
changeset 56 9386f31cc85b
parent 55 613943a21004
child 61 269724087bed
equal deleted inserted replaced
55:613943a21004 56:9386f31cc85b
     1 /*
       
     2 * Copyright (c) 2002 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:  Object push controller
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef BT_OPP_CONTROLLER_H
       
    21 #define BT_OPP_CONTROLLER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include "BTServiceClient.h"
       
    25 #include "BTServiceStarter.h"
       
    26 #include "BTSController.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *  Control class for the Object sending
       
    34 */
       
    35 NONSHARABLE_CLASS (CBTSOPPController) : public CBTSController, 
       
    36                                         public MBTServiceClientObserver                                        
       
    37 
       
    38     {
       
    39     public:  // Constructors and destructor
       
    40         
       
    41         /**
       
    42         * Two-phased constructor.
       
    43         */
       
    44         static CBTSOPPController* NewL( MBTServiceObserver* aObserver,
       
    45             const TUint aRemotePort,
       
    46             const TBTDevAddr& aRemoteDevice,
       
    47             CBTServiceParameterList* aList  );
       
    48         
       
    49         /**
       
    50         * Destructor.
       
    51         */
       
    52         virtual ~CBTSOPPController();
       
    53 
       
    54     private: // Functions from base classes
       
    55 
       
    56         /**
       
    57         * From MBTServiceClientObserver A Connect operation has been completed.
       
    58         * @param aStatus The status of the operation.
       
    59         * @return None.
       
    60         */
       
    61         void ConnectCompleted( TInt aStatus );
       
    62 
       
    63         /**
       
    64         * From MBTServiceClientObserver The client connection has been closed.
       
    65         * @param None.
       
    66         * @return None.
       
    67         */
       
    68         void ClientConnectionClosed();
       
    69 
       
    70         /**
       
    71         * From MBTServiceClientObserver A Put operation has been completed. 
       
    72         * @param aStatus The status of the operation.
       
    73         * @param aPutResponse Response packet from remote device.
       
    74         * @return None.
       
    75         */
       
    76         void PutCompleted( TInt aStatus, const CObexHeaderSet* aPutResponse );
       
    77         
       
    78         /**
       
    79         * From MBTServiceClientObserver A Get operation has been completed. 
       
    80         * @param aStatus The status of the operation.
       
    81         * @param aGetResponse Response packet from remote device.
       
    82         * @return None.
       
    83         */
       
    84         void GetCompleted( TInt aStatus, CObexBufObject* aGetResponse );
       
    85         
       
    86         /**
       
    87         * From MBTServiceClientObserver A Connect operation is timed out.
       
    88         * @return None.
       
    89         */
       
    90         void ConnectTimedOut();
       
    91         
       
    92   
       
    93     private:
       
    94 
       
    95         /**
       
    96         * C++ default constructor.
       
    97         */
       
    98         CBTSOPPController( MBTServiceObserver* aObserver,
       
    99                            CBTServiceParameterList* aList );
       
   100 
       
   101         /**
       
   102         * By default Symbian 2nd phase constructor is private.
       
   103         */
       
   104         void ConstructL( const TUint aRemotePort,
       
   105                          const TBTDevAddr& aRemoteDeviceAddr );
       
   106     
       
   107     private:
       
   108 
       
   109         /**
       
   110         * Send file 
       
   111         * @param None.
       
   112         * @return None.
       
   113         */
       
   114         void Send();
       
   115 
       
   116         /**
       
   117         * Handle Connection indication 
       
   118         * @param None.
       
   119         * @return None.
       
   120         */
       
   121         void HandleConnectCompleteIndicationL();
       
   122         
       
   123         void UpdateProgressNoteL();
       
   124 
       
   125     private:    // Data
       
   126         
       
   127         TInt                        iFileIndex;
       
   128         // Not owned
       
   129         //        
       
   130         CBTServiceParameterList*    iListPtr;
       
   131         MBTServiceObserver*         iObserverPtr;
       
   132     };
       
   133 
       
   134 #endif      // BT_OPP_CONTROLLER_H
       
   135             
       
   136 // End of File