homescreenpluginsrv/inc/hspsresult.h
changeset 0 79c6a41cd166
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     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:  Class ChspsResult is a Xuikon utility class that defines Additional 
       
    15 *                Return Code for Xuikon Application Theme Management Services on service
       
    16 *                request return.
       
    17 *                It is quaranteed that ChspsResult-object is always accessible after
       
    18 *                client request whether the result was successful or not.
       
    19 *                ChspsResult-class has attributes that informs the result as follows:
       
    20 *                - iSystemError - Symbian OS returned error code
       
    21 *                - iXuikonError - Xuikon defined error code in Xuikon error space
       
    22 *                - iIntValue1   - additional information relevant the result. 
       
    23 *                - iIntValue2   - additional information relevant the result.
       
    24 * 
       
    25 *  For more information about Xuikon errors, see hspsUIManagerErrorCodes.h.  
       
    26 *
       
    27 *
       
    28 */
       
    29 
       
    30 
       
    31 #ifndef hspsRESULT_H
       
    32 #define hspsRESULT_H
       
    33 
       
    34 #include <e32base.h>
       
    35  
       
    36 const TInt KMaxResultDataLength8 = 4*sizeof(TUint32);
       
    37 
       
    38 class RDesReadStream;
       
    39 class RDesWriteStream;
       
    40 
       
    41 /**
       
    42  * ChspsResult is utility class serving in error handling.
       
    43  *
       
    44  * @lib hspsResult.lib
       
    45  * @since S60 5.0
       
    46  * @ingroup group_hspsresult
       
    47  */
       
    48 class ChspsResult : public CBase
       
    49     {
       
    50     public:  // Constructors and destructor
       
    51         
       
    52         /**
       
    53         * Two-phased constructor.
       
    54         * 
       
    55         * @since S60 5.0
       
    56         */
       
    57         IMPORT_C static ChspsResult* NewL();
       
    58         
       
    59         /**
       
    60         * Destructor.
       
    61         */
       
    62         virtual ~ChspsResult();
       
    63 
       
    64     public: // New functions
       
    65               
       
    66         /**
       
    67         * ChspsResult::ExternalizeL() writes ChspsResult object to a given stream.
       
    68         * 
       
    69         * @since S60 5.0
       
    70         * @param aStream Stream to write to.
       
    71         */
       
    72         IMPORT_C void ExternalizeL( RDesWriteStream& aStream ) const;
       
    73         
       
    74         /**
       
    75         * ChspsResult::InternalizeL() reads ChspsResult from given stream.
       
    76         * 
       
    77         * @since S60 5.0
       
    78         * @param aStream Stream to read from.
       
    79         */
       
    80         IMPORT_C void InternalizeL( RDesReadStream& aStream );
       
    81         
       
    82         /**
       
    83         * ChspsResult::GetDataLenght() calculates data length of ChspsResult object.
       
    84         * 
       
    85         * @since S60 5.0
       
    86         * @return Length of the data in ChspsResult object.
       
    87         */
       
    88         IMPORT_C TInt GetDataLength() const;
       
    89         
       
    90         /**
       
    91         * Resets ChspsResult data members.
       
    92         * 
       
    93         * @since S60 5.0
       
    94         */
       
    95         IMPORT_C void ResetData();
       
    96                
       
    97     private:
       
    98 
       
    99         /**
       
   100         * C++ default constructor.
       
   101         */
       
   102         ChspsResult();
       
   103 
       
   104         /**
       
   105         * By default Symbian 2nd phase constructor is private.
       
   106         */
       
   107         void ConstructL();
       
   108 
       
   109     public:     // Data
       
   110         // Symbian OS returned error code
       
   111         TInt iSystemError;
       
   112         // Xuikon defined error code in Xuikon error space
       
   113         TInt iXuikonError;
       
   114         // Additional information relevant the result.
       
   115         TInt iIntValue1;
       
   116         // Additional information relevant the result.
       
   117         TInt iIntValue2;
       
   118            
       
   119     private:     // Data
       
   120 
       
   121         // Reserved pointer for future extension
       
   122         TAny* iReserved;
       
   123     };
       
   124 
       
   125 #endif      // hspsRESULT_H   
       
   126             
       
   127 // End of File