equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2010 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 the License "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 * swiutils.cpp |
|
16 */ |
|
17 |
|
18 #include <e32def.h> |
|
19 #include <e32cmn.h> |
|
20 #include <e32property.h> |
|
21 #include <sacls.h> |
|
22 #include "swiutils.h" |
|
23 #include "log.h" |
|
24 |
|
25 namespace Swi{ |
|
26 |
|
27 EXPORT_C TInt GetAllUids(RArray<TUid>& aUidList) |
|
28 { |
|
29 aUidList.Close(); |
|
30 |
|
31 TBuf<KMaxUidCount*sizeof(TUid)> buf; |
|
32 TInt err = RProperty::Get(KUidSystemCategory, KSWIUidsCurrentlyBeingProcessed, buf); |
|
33 if(err != KErrNone) |
|
34 { |
|
35 DEBUG_PRINTF2(_L("RProperty::Get returned with err %d."), err); |
|
36 return err; |
|
37 } |
|
38 |
|
39 TInt count = 0; |
|
40 TInt *bufPtr = (TInt*) buf.Ptr(); |
|
41 count = *bufPtr++; |
|
42 |
|
43 TUid uid; |
|
44 for(TInt i = 0; i < count; ++i) |
|
45 { |
|
46 uid.iUid = *bufPtr++; |
|
47 aUidList.Append(uid); |
|
48 } |
|
49 |
|
50 return KErrNone; |
|
51 } |
|
52 } |