equal
deleted
inserted
replaced
|
1 // string_utils.cpp |
|
2 // |
|
3 // Copyright (c) 2006 - 2010 Accenture. All rights reserved. |
|
4 // This component and the accompanying materials are made available |
|
5 // under the terms of the "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 // Accenture - Initial contribution |
|
11 // |
|
12 |
|
13 #include "string_utils.h" |
|
14 |
|
15 #define CASE_RETURN_LIT(XXX) case XXX: { _LIT(_KLit, #XXX); return &_KLit; } |
|
16 #define CASE_RETURN_LIT2(XXX, YYY) case XXX: { _LIT(_KLit, YYY); return &_KLit; } |
|
17 #define DEFAULT_RETURN_LIT(XXX) default: { _LIT(_KLit, XXX); return &_KLit; } |
|
18 |
|
19 const TDesC* ShStringify::JobStatus(CJob::TStatus aStatus) |
|
20 { |
|
21 switch (aStatus) |
|
22 { |
|
23 CASE_RETURN_LIT2(CJob::EPending, "Pending"); |
|
24 CASE_RETURN_LIT2(CJob::ERunning, "Running"); |
|
25 CASE_RETURN_LIT2(CJob::EStopped, "Stopped"); |
|
26 CASE_RETURN_LIT2(CJob::EComplete, "Complete"); |
|
27 DEFAULT_RETURN_LIT("*** STATUS UNKNOWN ***"); |
|
28 } |
|
29 } |