videofeeds/utils/src/TIptvDriveMonitorEvent.cpp
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2007 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 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDE FILES
       
    22 #include "TIptvDriveMonitorEvent.h"
       
    23 #include "IptvDebug.h"
       
    24 
       
    25 #if IPTV_LOGGING_METHOD != 0 
       
    26 _LIT(KIptvDmeMediaRemovedDes, "EMediaRemoved");
       
    27 _LIT(KIptvDmeMediaInsertedDes, "EMediaInserted");
       
    28 _LIT(KIptvDmeDriveLockedDes, "EDriveLocked");
       
    29 _LIT(KIptvDmeDriveUnlockedDes, "EDriveUnlocked");
       
    30 _LIT(KIptvDmeDriveMountedDes, "EDriveMounted");
       
    31 _LIT(KIptvDmeDriveDismountedDes, "EDriveDismounted");
       
    32 _LIT(KIptvDmeDriveVolumeNameChangedDes, "EDriveVolumeNameChanged");
       
    33 _LIT(KIptvDmeUnknownDes, "Unknown");
       
    34 #endif
       
    35 
       
    36 // ============================ MEMBER FUNCTIONS ===============================
       
    37 
       
    38 EXPORT_C TIptvDriveMonitorEvent::TIptvDriveMonitorEvent()
       
    39     : iEvent( ENone )
       
    40     , iDrive( -1 )
       
    41     {
       
    42     }
       
    43 
       
    44 // -----------------------------------------------------------------------------
       
    45 // TIptvDriveMonitorEvent::EventDes()
       
    46 // -----------------------------------------------------------------------------
       
    47 //
       
    48 #if IPTV_LOGGING_METHOD != 0
       
    49 
       
    50 const TDesC& TIptvDriveMonitorEvent::EventDes( TIptvDriveMonitorEvent::TEvent aEvent )
       
    51     {
       
    52     switch ( aEvent )
       
    53         {
       
    54         case EMediaRemoved:
       
    55             return KIptvDmeMediaRemovedDes;
       
    56             
       
    57         case EMediaInserted:
       
    58             return KIptvDmeMediaInsertedDes;
       
    59 
       
    60         case EDriveLocked:
       
    61             return KIptvDmeDriveLockedDes;
       
    62 
       
    63         case EDriveUnlocked:
       
    64             return KIptvDmeDriveUnlockedDes;
       
    65 
       
    66         case EDriveMounted:
       
    67             return KIptvDmeDriveMountedDes;
       
    68 
       
    69         case EDriveDismounted:
       
    70             return KIptvDmeDriveDismountedDes;
       
    71         
       
    72         case EDriveVolumeNameChanged:
       
    73             return KIptvDmeDriveVolumeNameChangedDes;
       
    74 
       
    75         default:
       
    76             return KIptvDmeUnknownDes;
       
    77         }
       
    78     }
       
    79     
       
    80 #else
       
    81 
       
    82 const TDesC& TIptvDriveMonitorEvent::EventDes( TIptvDriveMonitorEvent::TEvent /*aEvent*/ )
       
    83     {
       
    84     return KIptvEmptyDes;
       
    85     }
       
    86 
       
    87 #endif
       
    88