upnpavcontroller/upnpavcontrollerserver/inc/upnpaverrorhandler.h
changeset 0 7f85d04be362
equal deleted inserted replaced
-1:000000000000 0:7f85d04be362
       
     1 /*
       
     2 * Copyright (c) 2008 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:      Definition of class CUPnPAVErrorHandler.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 #ifndef UPNPAVERRORHANDLER_H
       
    24 #define UPNPAVERRORHANDLER_H
       
    25 
       
    26 // INCLUDES
       
    27 #include <e32base.h>
       
    28 
       
    29 // CONSTANTS
       
    30 enum TUPnPErrorCodeType
       
    31     {
       
    32     EUPnPGeneralError = 0,
       
    33     EUPnPConnectionManagerError,
       
    34     EUPnPContentDirectoryError,
       
    35     EUPnPRenderingControlError,
       
    36     EUPnPAVTransportError,
       
    37     EUPnPHTTPError
       
    38     };
       
    39 
       
    40 // CLASS DECLARATION
       
    41     
       
    42 /**
       
    43 * UPnP AV Error Handler class header. Provides static methods to map UPnP
       
    44 * error codes to corresponding Symbian (e32err.h) error codes.
       
    45 *
       
    46 * @since Series 60 3.0
       
    47 */
       
    48 class UPnPAVErrorHandler
       
    49     {
       
    50     
       
    51     public:
       
    52 
       
    53         /**
       
    54          * Returns the Symbian error code (e32err.h) corresponding to the 
       
    55          * given UPnP error code.
       
    56          *
       
    57          * @param aUPnPErrorCode TInt the UPnP error code
       
    58          * @param aErrorType TUPnPErrorCode type of the the UPnP error code
       
    59          * @return TInt the corresponding Symbian error code
       
    60          */
       
    61         static TInt ConvertToSymbianErrorCode( 
       
    62                                 TInt aUPnPErrorCode,
       
    63                                 TUPnPErrorCodeType aErrorType );
       
    64     
       
    65     private:
       
    66     
       
    67         /**
       
    68          * Returns the Symbian error code (e32err.h) corresponding to the 
       
    69          * given general UPnP error code.
       
    70          *
       
    71          * @param aUPnPErrorCode TInt the UPnP error code
       
    72          * @return TInt the corresponding Symbian error code
       
    73          */
       
    74         static TInt ConvertGeneralErrorCode( TInt aUPnPErrorCode );
       
    75     
       
    76         /**
       
    77          * Returns the Symbian error code (e32err.h) corresponding to the 
       
    78          * given Connection Manager error code.
       
    79          *
       
    80          * @param aUPnPErrorCode TInt the UPnP error code
       
    81          * @return TInt the corresponding Symbian error code
       
    82          */
       
    83         static TInt ConvertCMErrorCode( TInt aUPnPErrorCode );
       
    84 
       
    85         /**
       
    86          * Returns the Symbian error code (e32err.h) corresponding to the 
       
    87          * given Content Directory error code.
       
    88          *
       
    89          * @param aUPnPErrorCode TInt the UPnP error code
       
    90          * @return TInt the corresponding Symbian error code
       
    91          */
       
    92         static TInt ConvertCDSErrorCode( TInt aUPnPErrorCode );
       
    93 
       
    94         /**
       
    95          * Returns the Symbian error code (e32err.h) corresponding to the 
       
    96          * given Rendering Control error code.
       
    97          *
       
    98          * @param aUPnPErrorCode TInt the UPnP error code
       
    99          * @return TInt the corresponding Symbian error code
       
   100          */
       
   101         static TInt ConvertRCErrorCode( TInt aUPnPErrorCode );
       
   102 
       
   103         /**
       
   104          * Returns the Symbian error code (e32err.h) corresponding to the 
       
   105          * given AV Transport error code.
       
   106          *
       
   107          * @param aUPnPErrorCode TInt the UPnP error code
       
   108          * @return TInt the corresponding Symbian error code
       
   109          */
       
   110         static TInt ConvertAVTErrorCode( TInt aUPnPErrorCode );
       
   111 
       
   112         /**
       
   113          * Returns the Symbian error code (e32err.h) corresponding to the 
       
   114          * given HTTP error code.
       
   115          *
       
   116          * @param aUPnPErrorCode TInt the UPnP error code
       
   117          * @return TInt the corresponding Symbian error code
       
   118          */
       
   119         static TInt ConvertHTTPErrorCode( TInt aUPnPErrorCode );
       
   120     };
       
   121 
       
   122 #endif // UPNPAVERRORHANDLER_H
       
   123 
       
   124 // End of File