equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2009 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 * |
|
16 */ |
|
17 |
|
18 #include "fmoperationformat.h" |
|
19 #include "fmcommon.h" |
|
20 #include "fmoperationbase.h" |
|
21 #include "fmutils.h" |
|
22 |
|
23 #include <QString> |
|
24 |
|
25 FmOperationFormat::FmOperationFormat( QObject *parent, QString mDriverName ) : FmOperationBase( parent, FmOperationService::EOperationTypeFormat ), |
|
26 mDriverName( mDriverName ) |
|
27 { |
|
28 } |
|
29 FmOperationFormat::~FmOperationFormat() |
|
30 { |
|
31 } |
|
32 |
|
33 QString FmOperationFormat::driverName() |
|
34 { |
|
35 return mDriverName; |
|
36 } |
|
37 |
|
38 int FmOperationFormat::start() |
|
39 { |
|
40 QString logString = "FmOperationFormat::start"; |
|
41 FmLogger::log( logString ); |
|
42 |
|
43 if( mDriverName.isEmpty() ) { |
|
44 return FmErrWrongParam; |
|
45 } |
|
46 int totalCount( 100 ); |
|
47 emit notifyStart( totalCount, false ); |
|
48 for( int i = 0; i < totalCount; i++ ) { |
|
49 emit notifyProgress( i ); |
|
50 } |
|
51 |
|
52 return FmErrNone; |
|
53 |
|
54 } |