webengine/wrtharvester/inc/wrtusbhandler.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 12 Mar 2010 15:48:51 +0200
branchRCL_3
changeset 58 220a17280356
parent 46 ea4b2e4f7cac
permissions -rw-r--r--
Revision: 201006 Kit: 201008
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     1
/*
58
220a17280356 Revision: 201006
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 46
diff changeset
     2
* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
220a17280356 Revision: 201006
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 46
diff changeset
     3
* All rights reserved.
220a17280356 Revision: 201006
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 46
diff changeset
     4
* This component and the accompanying materials are made available
220a17280356 Revision: 201006
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 46
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
220a17280356 Revision: 201006
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 46
diff changeset
     6
* which accompanies this distribution, and is available
220a17280356 Revision: 201006
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 46
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
17
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     8
*
58
220a17280356 Revision: 201006
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 46
diff changeset
     9
* Initial Contributors:
220a17280356 Revision: 201006
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 46
diff changeset
    10
* Nokia Corporation - initial contribution.
220a17280356 Revision: 201006
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 46
diff changeset
    11
*
220a17280356 Revision: 201006
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 46
diff changeset
    12
* Contributors:
220a17280356 Revision: 201006
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 46
diff changeset
    13
*
220a17280356 Revision: 201006
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 46
diff changeset
    14
* Description:  
220a17280356 Revision: 201006
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 46
diff changeset
    15
*
17
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    16
*/
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    18
#ifndef WIDGETMMCHANDLER_H
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    19
#define WIDGETMMCHANDLER_H
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    20
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    21
// INCLUDES
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    22
#include <e32std.h>
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    23
#include <e32base.h>
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    24
#include <f32file.h>
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    25
#include "wrtharvester.h"
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    26
//hb
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    27
#include "wrtharvesterpsnotifier.h"
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    28
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    29
// FORWARD DECLARATION
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    30
class CWrtHarvester;
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    31
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    32
/*
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    33
 * Inherited CActive, performs a asynchronous conversion operation
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    34
 *
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    35
 * @since 3.1
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    36
 */
27
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
    37
class CWrtUsbHandler : public CActive
17
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    38
    {
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    39
public:
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    40
27
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
    41
    static CWrtUsbHandler* NewL( CWrtHarvester* aHarvester, RFs& aFs );
17
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    42
27
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
    43
    virtual ~CWrtUsbHandler();
17
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    44
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    45
    void Start();
37
cb62a4f66ebe Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 36
diff changeset
    46
    void DoScanAndUpdate();   
17
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    47
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    48
protected:
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    49
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    50
    void RunL();
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    51
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    52
    TInt RunError( TInt aError );
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    53
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    54
    void DoCancel();
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    55
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    56
private:
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    57
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    58
    // no copy constructor
27
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
    59
    CWrtUsbHandler( const CWrtUsbHandler& );
17
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    60
    // no assignment
27
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
    61
    CWrtUsbHandler& operator=( const CWrtUsbHandler& );
17
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    62
27
60c5402cb945 Revision: 200941
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
    63
    CWrtUsbHandler( CWrtHarvester* aHarvester, RFs& aFs );
17
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    64
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    65
    void ConstructL();
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    66
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    67
    TInt ScanDrives( TInt& aDriveFlags );
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    68
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    69
   // CWidgetRegistry* iRegistry; // not owned
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    70
    
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    71
    CWrtHarvester* iHarvester;
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    72
    RFs iFs;
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    73
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    74
    TInt iDriveFlags;
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    75
    };
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    76
c8a366e56285 Revision: 200937
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    77
#endif // #ifndef WIDGETMMCHANDLER_H