equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2003-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 <e32base.h> |
|
19 #include <usbman.h> |
|
20 |
|
21 static void MainL() |
|
22 { |
|
23 RUsb usb; |
|
24 User::LeaveIfError(usb.Connect()); |
|
25 usb.Stop(); |
|
26 usb.Close(); |
|
27 } |
|
28 |
|
29 GLDEF_C TInt E32Main() |
|
30 { |
|
31 CTrapCleanup* cleanup = CTrapCleanup::New(); |
|
32 if(cleanup == NULL) |
|
33 { |
|
34 return KErrNoMemory; |
|
35 } |
|
36 TRAPD(err,MainL()); |
|
37 |
|
38 if (err != KErrNone) |
|
39 User::Panic(_L("StopUsb::E32Main - Panic"), err); |
|
40 |
|
41 delete cleanup; |
|
42 return KErrNone; |
|
43 } |
|
44 /////////////////////// |