satengine/SatServer/SatClient/src/TSatIconInfo.cpp
changeset 46 2fa1fa551b0b
parent 42 35488577e233
child 48 78df25012fda
equal deleted inserted replaced
42:35488577e233 46:2fa1fa551b0b
     1 /*
       
     2 * Copyright (c) 2002-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:  Capsulates the icon info from the SIM.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include    <etelsat.h>
       
    21 #include    <tsaticoninfo.h>
       
    22 
       
    23 #include    "SatLog.h"
       
    24 
       
    25 // ============================ MEMBER FUNCTIONS ===============================
       
    26 
       
    27 // -----------------------------------------------------------------------------
       
    28 // TSatIconInfo::TSatIconInfo
       
    29 // C++ default constructor can NOT contain any code, that
       
    30 // might leave.
       
    31 // The aIconDescription has to be in following format: (ETSI TS 131 102 V4.10.0)
       
    32 //      1 byte: Icon width
       
    33 //      2 byte: Icon height
       
    34 //      3 byte: Image coding scheme
       
    35 //      4 byte: High byte of file identifier
       
    36 //      5 byte: Low byte of file identifier.
       
    37 //      6 byte: High byte of offset of the icon in EF.
       
    38 //      7 byte: Low byte of offset of the icon in EF.
       
    39 //      8 byte: High byte of icon length.
       
    40 //      9 byte: Low byte of icon lenght.
       
    41 // -----------------------------------------------------------------------------
       
    42 //
       
    43 
       
    44 TSatIconInfo::TSatIconInfo() :
       
    45     iSize(),
       
    46     iCodingScheme( static_cast<TCodingScheme>( 0 ) ),
       
    47     iFileIdentifier( 0 ),
       
    48     iOffset( 0 ),
       
    49     iLength( 0 )
       
    50     {
       
    51     LOG( SIMPLE, "SATCLIENT: TSatIconInfo::TSatIconInfo calling-exits" )
       
    52     }
       
    53 
       
    54 // -----------------------------------------------------------------------------
       
    55 // TSatIconInfo::IconSize
       
    56 // (other items were commented in a header).
       
    57 // -----------------------------------------------------------------------------
       
    58 //
       
    59 EXPORT_C TSize TSatIconInfo::IconSize() const
       
    60     {
       
    61     LOG( SIMPLE, "SATCLIENT: TSatIconInfo::IconSize calling-exits" )    
       
    62     return iSize;
       
    63     }
       
    64 
       
    65 // -----------------------------------------------------------------------------
       
    66 // TSatIconInfo::CodingScheme
       
    67 // (other items were commented in a header).
       
    68 // -----------------------------------------------------------------------------
       
    69 //
       
    70 EXPORT_C TSatIconInfo::TCodingScheme TSatIconInfo::CodingScheme() const
       
    71     {
       
    72     LOG( SIMPLE, "SATCLIENT: TSatIconInfo::CodingScheme calling-exits" )
       
    73     return iCodingScheme;
       
    74     }
       
    75 
       
    76 // -----------------------------------------------------------------------------
       
    77 // TSatIconInfo::FileIdentifier
       
    78 // (other items were commented in a header).
       
    79 // -----------------------------------------------------------------------------
       
    80 //
       
    81 EXPORT_C TUint16 TSatIconInfo::FileIdentifier() const
       
    82     {
       
    83     LOG2( SIMPLE, 
       
    84     "SATCLIENT: TSatIconInfo::FileIdentifier calling-exits, iFileIdentifier: %i", 
       
    85     iFileIdentifier )
       
    86     return iFileIdentifier;
       
    87     }
       
    88 
       
    89 // -----------------------------------------------------------------------------
       
    90 // TSatIconInfo::Offset
       
    91 // (other items were commented in a header).
       
    92 // -----------------------------------------------------------------------------
       
    93 //
       
    94 EXPORT_C TUint16 TSatIconInfo::Offset() const
       
    95     {
       
    96     LOG2( SIMPLE, 
       
    97     "SATCLIENT: TSatIconInfo::Offset calling-exits, iOffset: %i", 
       
    98     iOffset )
       
    99     return iOffset;
       
   100     }
       
   101 
       
   102 // -----------------------------------------------------------------------------
       
   103 // TSatIconInfo::DataLength
       
   104 // (other items were commented in a header).
       
   105 // -----------------------------------------------------------------------------
       
   106 //
       
   107 EXPORT_C TUint16 TSatIconInfo::DataLength() const
       
   108     {
       
   109     LOG2( SIMPLE, 
       
   110     "SATCLIENT: TSatIconInfo::DataLength calling-exits, iLength: %i", 
       
   111     iLength )
       
   112     return iLength;
       
   113     }
       
   114 
       
   115 // -----------------------------------------------------------------------------
       
   116 // TSatIconInfo::SetIconSize
       
   117 // (other items were commented in a header).
       
   118 // -----------------------------------------------------------------------------
       
   119 //
       
   120 void TSatIconInfo::SetIconSize( const TSize aIconSize )
       
   121     {
       
   122     LOG3( SIMPLE, 
       
   123     "SATCLIENT: TSatIconInfo::SetIconSize calling-exits aIconSize: x=%i, y=%i", 
       
   124     aIconSize.iWidth, aIconSize.iHeight )
       
   125     iSize = aIconSize;
       
   126     }
       
   127 
       
   128 // -----------------------------------------------------------------------------
       
   129 // TSatIconInfo::SetCodingScheme
       
   130 // (other items were commented in a header).
       
   131 // -----------------------------------------------------------------------------
       
   132 //
       
   133 void TSatIconInfo::SetCodingScheme( const TCodingScheme aCodingScheme )
       
   134     {
       
   135     LOG2( SIMPLE, 
       
   136     "SATCLIENT: TSatIconInfo::SetCodingScheme calling-exits, aCodingScheme: %i",
       
   137     aCodingScheme )
       
   138     iCodingScheme = aCodingScheme;
       
   139     }
       
   140 
       
   141 // -----------------------------------------------------------------------------
       
   142 // TSatIconInfo::SetFileIdentifier
       
   143 // (other items were commented in a header).
       
   144 // -----------------------------------------------------------------------------
       
   145 //
       
   146 void TSatIconInfo::SetFileIdentifier( const TUint16 aFileIdentifier )
       
   147     {
       
   148     LOG2( SIMPLE, 
       
   149     "SATCLIENT: TSatIconInfo::SetFileIdentifier calling-exits, aFileIdentifier: %i", 
       
   150     aFileIdentifier )
       
   151     iFileIdentifier = aFileIdentifier;
       
   152     }
       
   153 
       
   154 // -----------------------------------------------------------------------------
       
   155 // TSatIconInfo::SetOffset
       
   156 // (other items were commented in a header).
       
   157 // -----------------------------------------------------------------------------
       
   158 //
       
   159 void TSatIconInfo::SetOffset( const TUint16 aOffset)
       
   160     {
       
   161     LOG2( SIMPLE, 
       
   162     "SATCLIENT: TSatIconInfo::SetOffset calling-exiting, aOffset: %i", 
       
   163     aOffset )
       
   164     iOffset = aOffset;
       
   165     }
       
   166 
       
   167 // -----------------------------------------------------------------------------
       
   168 // TSatIconInfo::SetDataLength
       
   169 // (other items were commented in a header).
       
   170 // -----------------------------------------------------------------------------
       
   171 //
       
   172 void TSatIconInfo::SetDataLength( const TUint16 aDataLength )
       
   173     {
       
   174     LOG2( SIMPLE, 
       
   175     "SATCLIENT: TSatIconInfo::SetDataLength calling-exiting aDataLength: %i", 
       
   176     aDataLength )
       
   177     iLength = aDataLength;
       
   178     }
       
   179 
       
   180 //  End of File