phoneapp/phoneuiutils/src/tphonecmdparamcallheaderdata.cpp
changeset 50 377c906a8701
parent 37 ba76fc04e6c2
child 65 2a5d4ab426d3
equal deleted inserted replaced
46:bc5a64e5bc3c 50:377c906a8701
    29 // might leave.
    29 // might leave.
    30 // -----------------------------------------------------------------------------
    30 // -----------------------------------------------------------------------------
    31 //
    31 //
    32 EXPORT_C TPhoneCmdParamCallHeaderData::TPhoneCmdParamCallHeaderData() :
    32 EXPORT_C TPhoneCmdParamCallHeaderData::TPhoneCmdParamCallHeaderData() :
    33     TPhoneCommandParam(),
    33     TPhoneCommandParam(),
    34     iLabelText( KNullDesC ),
    34     iLabelText( NULL ),
    35     iShortLabelText( KNullDesC ),
    35     iShortLabelText( NULL ),
    36     iCallState( 0 ),
    36     iCallState( 0 ),
    37     iNumberType( 0 ),
    37     iNumberType( 0 ),
    38     iCiphering( EFalse ),
    38     iCiphering( EFalse ),
    39     iCLIText( KNullDesC ),
    39     iCLIText( NULL ),
    40     iCNAPText( KNullDesC ),
    40     iCNAPText( NULL ),
    41     iPicture( KNullDesC ),
    41     iPicture( KNullDesC ),
    42     iLine2 ( EFalse ),
    42     iLine2 ( EFalse ),
    43     iThumbnail( NULL ),
    43     iThumbnail( NULL ),
    44     iCallerText( KNullDesC ),
    44     iCallerText( KNullDesC ),
    45     iParticipantListCLI( EPhoneParticipantCLIText ),
    45     iParticipantListCLI( EPhoneParticipantCLIText ),
    50     {
    50     {
    51     iParamId = EPhoneParamIdCallHeaderData;
    51     iParamId = EPhoneParamIdCallHeaderData;
    52     }
    52     }
    53 
    53 
    54 // ---------------------------------------------------------
    54 // ---------------------------------------------------------
       
    55 // TPhoneCmdParamCallHeaderData::~TPhoneCmdParamCallHeaderData
       
    56 // ---------------------------------------------------------
       
    57 //
       
    58 EXPORT_C TPhoneCmdParamCallHeaderData::~TPhoneCmdParamCallHeaderData()
       
    59     {
       
    60     delete iLabelText;
       
    61     delete iShortLabelText;
       
    62     delete iCLIText;
       
    63     delete iCNAPText;
       
    64     }
       
    65 
       
    66 // ---------------------------------------------------------
    55 // TPhoneCmdParamCallHeaderData::SetLabelText
    67 // TPhoneCmdParamCallHeaderData::SetLabelText
    56 // Sets the call header label text
    68 // Sets the call header label text
    57 // (other items were commented in a header).
    69 // (other items were commented in a header).
    58 // ---------------------------------------------------------
    70 // ---------------------------------------------------------
    59 //
    71 //
    60 EXPORT_C void TPhoneCmdParamCallHeaderData::SetLabelText( 
    72 EXPORT_C void TPhoneCmdParamCallHeaderData::SetLabelText( 
    61    const TDesC& aLabelText )
    73    const TDesC& aLabelText )
    62     {
    74     {
    63     iLabelText = aLabelText;
    75     delete iLabelText;
       
    76     iLabelText = aLabelText.Alloc();
    64     }
    77     }
    65 
    78 
    66 // ---------------------------------------------------------
    79 // ---------------------------------------------------------
    67 // TPhoneCmdParamCallHeaderData::SetShortLabelText
    80 // TPhoneCmdParamCallHeaderData::SetShortLabelText
    68 // Sets the call header short label text
    81 // Sets the call header short label text
    70 // ---------------------------------------------------------
    83 // ---------------------------------------------------------
    71 //
    84 //
    72 EXPORT_C void TPhoneCmdParamCallHeaderData::SetShortLabelText( 
    85 EXPORT_C void TPhoneCmdParamCallHeaderData::SetShortLabelText( 
    73    const TDesC& aShortLabelText )
    86    const TDesC& aShortLabelText )
    74     {
    87     {
    75     iShortLabelText = aShortLabelText;
    88     delete iShortLabelText;
       
    89     iShortLabelText = aShortLabelText.Alloc();
    76     }
    90     }
    77 
    91 
    78 // ---------------------------------------------------------
    92 // ---------------------------------------------------------
    79 // TPhoneCmdParamCallHeaderData::SetCallState
    93 // TPhoneCmdParamCallHeaderData::SetCallState
    80 // Sets the call header call state
    94 // Sets the call header call state
   128 //
   142 //
   129 EXPORT_C void TPhoneCmdParamCallHeaderData::SetCLIText( 
   143 EXPORT_C void TPhoneCmdParamCallHeaderData::SetCLIText( 
   130    const TDesC& aCLIText,
   144    const TDesC& aCLIText,
   131    TPhoneTextClippingDirection aDirection )
   145    TPhoneTextClippingDirection aDirection )
   132    {
   146    {
   133    iCLIText = aCLIText;
   147    delete iCLIText;
       
   148    iCLIText = aCLIText.Alloc();
   134    iCLITextClippingDirection = aDirection; 
   149    iCLITextClippingDirection = aDirection; 
   135    }
   150    }
   136 
   151 
   137 // ---------------------------------------------------------
   152 // ---------------------------------------------------------
   138 // TPhoneCmdParamCallHeaderData::SetCNAPText
   153 // TPhoneCmdParamCallHeaderData::SetCNAPText
   142 //
   157 //
   143 EXPORT_C void TPhoneCmdParamCallHeaderData::SetCNAPText( 
   158 EXPORT_C void TPhoneCmdParamCallHeaderData::SetCNAPText( 
   144    const TDesC& aCNAPText,
   159    const TDesC& aCNAPText,
   145    TPhoneTextClippingDirection aDirection )
   160    TPhoneTextClippingDirection aDirection )
   146    {
   161    {
   147    iCNAPText = aCNAPText;
   162    delete iCNAPText;
       
   163    iCNAPText = aCNAPText.Alloc();
   148    iCNAPTextClippingDirection = aDirection; 
   164    iCNAPTextClippingDirection = aDirection; 
   149    }
   165    }
   150 
   166 
   151 // ---------------------------------------------------------
   167 // ---------------------------------------------------------
   152 // TPhoneCmdParamCallHeaderData::SetPicture
   168 // TPhoneCmdParamCallHeaderData::SetPicture
   188 // (other items were commented in a header).
   204 // (other items were commented in a header).
   189 // ---------------------------------------------------------
   205 // ---------------------------------------------------------
   190 //
   206 //
   191 EXPORT_C const TDesC& TPhoneCmdParamCallHeaderData::LabelText() const
   207 EXPORT_C const TDesC& TPhoneCmdParamCallHeaderData::LabelText() const
   192    {
   208    {
   193    return iLabelText;
   209    return iLabelText ? *iLabelText : KNullDesC();
   194    }
   210    }
   195 
   211 
   196 // ---------------------------------------------------------
   212 // ---------------------------------------------------------
   197 // TPhoneCmdParamCallHeaderData::ShortLabelText
   213 // TPhoneCmdParamCallHeaderData::ShortLabelText
   198 // Returns the call header short label text
   214 // Returns the call header short label text
   199 // (other items were commented in a header).
   215 // (other items were commented in a header).
   200 // ---------------------------------------------------------
   216 // ---------------------------------------------------------
   201 //
   217 //
   202 EXPORT_C const TDesC& TPhoneCmdParamCallHeaderData::ShortLabelText() const
   218 EXPORT_C const TDesC& TPhoneCmdParamCallHeaderData::ShortLabelText() const
   203    {
   219    {
   204    return iShortLabelText;
   220    return iShortLabelText ? *iShortLabelText : KNullDesC();
   205    }
   221    }
   206 
   222 
   207 // ---------------------------------------------------------
   223 // ---------------------------------------------------------
   208 // TPhoneCmdParamCallHeaderData::CallState
   224 // TPhoneCmdParamCallHeaderData::CallState
   209 // Returns the call header call state
   225 // Returns the call header call state
   254 // (other items were commented in a header).
   270 // (other items were commented in a header).
   255 // ---------------------------------------------------------
   271 // ---------------------------------------------------------
   256 //
   272 //
   257 EXPORT_C const TDesC& TPhoneCmdParamCallHeaderData::CLIText() const
   273 EXPORT_C const TDesC& TPhoneCmdParamCallHeaderData::CLIText() const
   258    {
   274    {
   259    return iCLIText;
   275    return iCLIText ? *iCLIText : KNullDesC();
   260    }
   276    }
   261 
   277 
   262 // ---------------------------------------------------------
   278 // ---------------------------------------------------------
   263 // TPhoneCmdParamCallHeaderData::CLITextClippingDirection
   279 // TPhoneCmdParamCallHeaderData::CLITextClippingDirection
   264 // Returns the clipping direction of the CLI text.
   280 // Returns the clipping direction of the CLI text.
   289 // (other items were commented in a header).
   305 // (other items were commented in a header).
   290 // ---------------------------------------------------------
   306 // ---------------------------------------------------------
   291 //
   307 //
   292 EXPORT_C const TDesC& TPhoneCmdParamCallHeaderData::CNAPText() const
   308 EXPORT_C const TDesC& TPhoneCmdParamCallHeaderData::CNAPText() const
   293    {
   309    {
   294    return iCNAPText;
   310    return iCNAPText ? *iCNAPText : KNullDesC();
   295    }
   311    }
   296 
   312 
   297 // ---------------------------------------------------------
   313 // ---------------------------------------------------------
   298 // TPhoneCmdParamCallHeaderData::Picture
   314 // TPhoneCmdParamCallHeaderData::Picture
   299 // Returns the call header picture
   315 // Returns the call header picture