Update contrib.
1 // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // f32\sfile\sf_amh.cpp
20 EXPORT_C CAsyncNotifier* CAsyncNotifier::New()
25 CAsyncNotifier* async=new CAsyncNotifier;
29 CAsyncNotifier::CAsyncNotifier()
31 // Create an asynchronous notifier
37 EXPORT_C CAsyncNotifier::~CAsyncNotifier()
46 EXPORT_C TInt CAsyncNotifier::Notify(const TDesC& aLine1,const TDesC& aLine2,const TDesC& aButton1,const TDesC& aButton2,TInt& aButtonVal)
48 // Launch the notifier and set the active flag
49 // iStatus will be signaled when the user presses ok or cancel and this will stop the nested active scheduler
52 __PRINT(_L("> CAsyncNotifier::Notify"));
54 // Mark the drive as "hung" until the request completes
55 FsThreadManager::SetDriveHung(iMount->Drive().DriveNumber(), ETrue);
61 aButtonVal=KErrGeneral;
62 TRequestStatus status;
63 iNotifier.Notify(aLine1,aLine2,aButton2,aButton1,aButtonVal,status);
64 User::WaitForRequest(status);
67 __PRINT1(_L("< CAsyncNotifier::Notify r=%d"),r);
71 TInt CAsyncNotifier::Connect()
73 // connect to RNotifier
76 __PRINT(_L("CAsyncNotifier::Connect"));
77 return iNotifier.Connect();