emailuis/emailui/inc/FreestyleMessageHeaderURL.h
branchRCL_3
changeset 25 3533d4323edc
equal deleted inserted replaced
24:d189ee25cf9d 25:3533d4323edc
       
     1 /*
       
     2 * Copyright (c) 2007-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:  Message header URL
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CFREESTYLE_MESSAGE_HEADER_URL_H__
       
    19 #define __CFREESTYLE_MESSAGE_HEADER_URL_H__
       
    20 
       
    21 #include <e32base.h>
       
    22 
       
    23 _LIT( KURLSchemeCmail, "cmail" );
       
    24 _LIT( KURLSchemeSeparator, "://" );
       
    25 _LIT( KURLTypeFrom, "from" );
       
    26 _LIT( KURLTypeTo, "to" );
       
    27 _LIT( KURLTypeCc, "cc" );
       
    28 _LIT( KURLTypeBcc, "bcc" );
       
    29 _LIT( KURLTypeAttachment, "attachment" );
       
    30 _LIT( KURLTypeSeparator, "/" );
       
    31 _LIT( KURLHttpPrefix, "http://" );
       
    32 _LIT( KURLHttpsPrefix, "https://" );
       
    33 _LIT( KURLMailToPrefix, "mailto:" );
       
    34 _LIT( KURLTypeSubject, "subject" );
       
    35 
       
    36 class CFreestyleMessageHeaderURL : public CBase
       
    37     {
       
    38 public:
       
    39     IMPORT_C static CFreestyleMessageHeaderURL* NewL();
       
    40     IMPORT_C static CFreestyleMessageHeaderURL* NewL( TDesC* aScheme, 
       
    41                                                       TDesC* aType, 
       
    42                                                       TDesC* aItemId );
       
    43     virtual ~CFreestyleMessageHeaderURL();
       
    44     
       
    45     IMPORT_C TDesC* Scheme() const;
       
    46     IMPORT_C void SetScheme(TDesC* aScheme);
       
    47     
       
    48     IMPORT_C TDesC* Type() const;
       
    49     IMPORT_C void SetType (TDesC* aType);
       
    50     
       
    51     IMPORT_C TDesC* ItemId() const;
       
    52     IMPORT_C void SetItemId(TDesC* aItemId);
       
    53     
       
    54     IMPORT_C void InternalizeL(const TDesC& aUrlString);
       
    55     IMPORT_C HBufC* ExternalizeL();
       
    56     
       
    57     IMPORT_C static TBool IsMessageHeaderURL( const TDesC& aUrlString );
       
    58     
       
    59 protected:
       
    60     CFreestyleMessageHeaderURL();
       
    61     void Reset();
       
    62     
       
    63 private:
       
    64     TDesC* iScheme;
       
    65     TDesC* iType;
       
    66     TDesC* iItemId;
       
    67     };
       
    68 
       
    69 #endif //__CFREESTYLE_MESSAGE_HEADER_URL_H__