commonuis/CommonUi/inc/DocConstants.h
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2002-2006 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:  CDocumentHandler constants.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #if !defined DOCCONSTANTS_H
       
    20 #define DOCCONSTANTS_H
       
    21 
       
    22 
       
    23 // Dummy filtering mime type. If this mime type is given as
       
    24 // a content type parameters dochandler does nothing
       
    25 // (just returns KErrNone).
       
    26 _LIT8(KDummyMimeType, "text/vnd.nokia.filtering");
       
    27 
       
    28 // Empty string
       
    29 _LIT8(KNullText,"");
       
    30 
       
    31 // Stream Uid's
       
    32 const TUid KUidEmbedInputStream  = { 0x1000 };
       
    33 const TUid KUidEmbedOutputStream = { 0x2000 };
       
    34 
       
    35 // Application UID's needed in code
       
    36 //const TUid KMediaGalleryUID3 = { 0x200009EE };//fix for Gallery remove 
       
    37 const TUid KImageViewerUID = { 0x101f4d90 };
       
    38 const TUid KAppManagerUID3 = { 0x101F8512 };
       
    39 const TUid KFileManagerUID3 = { 0x101F84EB };
       
    40 const TUid KPhotosUID3 = { 0x200009EE };
       
    41 const TUid KMusicPlayerAppUid = { 0x102072C3 };
       
    42 const TUid KVideoCenterAppUid = { 0x200159B2 };
       
    43 // Landmark UI app
       
    44 const TInt KLandmarkHandler  = 0x101F85C1;
       
    45 
       
    46 // Length of maximum of file extension, for example ".html"
       
    47 const TInt KLengthOfFileExtension = 5;
       
    48 
       
    49 // This value is needed when parsing resources.
       
    50 const TInt KRIMask(0x00000fff);
       
    51 
       
    52 // Own resource file
       
    53 _LIT( KDocResourceFileName, "z:\\resource\\documenthandlerui.rsc" );
       
    54 // Temporary place to save which MIME-type is not recognized
       
    55 //_LIT (KDocTempPath,  "d:\\system\\temp\\" );
       
    56 _LIT (KDocTempPath,  "\\system\\temp\\" );
       
    57 // This is used for temporary saving if d: drive is full.
       
    58 _LIT (KDocTempPath2, "c:\\system\\temp\\" );  
       
    59 // We save temp directory to under process private directory
       
    60 //_LIT (KDocTemp,  "temp\\" );
       
    61 // Last resort default file name for unnamed documents
       
    62 _LIT( KDocFallBackName, "Data" );
       
    63 //  Root of C-drive
       
    64 //_LIT (KDocMemoryRoot,  "c:" );
       
    65 //  Root of C-drive, used when saving to process privatepath
       
    66 //_LIT (KDocDDriveRoot,  "d:" );
       
    67 
       
    68 // Place where applications resource files should be found
       
    69 _LIT( resourceaApps, "\\resource\\apps\\");
       
    70 // Extension for resource files
       
    71 _LIT( resExt, ".rsc" );
       
    72 // Error message, CStringResourceReader::ReadResourceString might return  
       
    73 // this if filename is not fetched.
       
    74 _LIT( errorStr, "Resolving Error" );
       
    75 
       
    76 // Mime-type of flash files
       
    77 _LIT(KFlashMimeType, "application/x-shockwave-flash");
       
    78 
       
    79 // Hard coded MIME-types
       
    80 _LIT8( KDocMimeCalendar,     "text/calendar"                     );
       
    81 _LIT8( KDocMimeCalendar2,    "text/X-vCalendar"                 );
       
    82 _LIT8( KDocMimeCard,         "text/X-vCard"                      );
       
    83 /*
       
    84 _LIT( KDocExtCalendar,      ".vcs"                              );
       
    85 _LIT( KDocExtCard,          ".vcf"                              );
       
    86 _LIT8( KDocMimeAmr,          "audio/x-amr"                       );
       
    87 _LIT( KDocExtAmr,           ".amr"                              );
       
    88 _LIT8( KDocMimeWbmp,         "image/vnd.wap.wbmp"                );
       
    89 _LIT( KDocExtWbmp,          ".wbmp"                             );
       
    90 _LIT8( KDocMimeWmlc,         "application/vnd.wap.wmlc"          );
       
    91 _LIT( KDocExtWmlc,          ".wmlc"                             );
       
    92 _LIT8( KDocMimeOtaBitmap,    "image/vnd.nokia.ota-bitmap"        );
       
    93 _LIT( KDocExtOtaBitmap,     ".ota"                              );
       
    94 _LIT8( KDocMimeXOtaBitmap,   "image/x-ota-bitmap"                );
       
    95 */
       
    96 _LIT( KDocMimeJad,          "text/vnd.sun.j2me.app-descriptor"  );
       
    97 _LIT( KDocExtJad,           ".jad"                              );
       
    98 /*
       
    99 _LIT8( KDocMimeJar1,         "application/vnd.sun.java-archive"  );
       
   100 _LIT8( KDocMimeJar2,         "application/java-archive"         );
       
   101 _LIT( KDocExtJar,           ".jar"                              );
       
   102 */
       
   103 _LIT8( KDocMimeMSWord,         	"application/msword"            );
       
   104 _LIT8( KDocMimeMSExcel,        	"application/msexcel"           );
       
   105 _LIT8( KDocMimeMSPowerPoint,   	"application/x-mspowerpoint"    );
       
   106 _LIT8( KDocMimePdf,   		   	"application/pdf"		        );
       
   107 _LIT8( KDocMimeZip1,           	"application/zip"               );
       
   108 _LIT8( KDocMimeZip2, 			"application/x-compressed"		);
       
   109 _LIT8( KDocMimeZip3,			"application/x-zip-compressed"	); 
       
   110 _LIT8( KDocMimeZip4,			"multipart/x-zip"				);
       
   111 _LIT8( KDocMimeTextPlain,		"text/plain"	    			);
       
   112 
       
   113 _LIT( KMIMETypeImage,           "image/"                        );
       
   114 _LIT( KMIMETypeRingTone,        "application/vnd.nokia.ringing-tone");
       
   115 _LIT( KMIMETypeAudio,           "audio/"                        );
       
   116 _LIT( KMIMETypeAudioMp4,        "audio/mp4"                     );
       
   117 _LIT( KMIMETypeAudioMpeg,       "audio/mpeg"                    );
       
   118 _LIT( KMIMETypeVideo,           "video/"                        );
       
   119 _LIT( KMIMETypeVideoReal,       "application/vnd.rn-realmedia"  );
       
   120 _LIT( KMIMETypeVideoSdp,        "application/sdp"               );
       
   121 _LIT( KMIMETypeSvg,             "image/svg+xml"                 );
       
   122 
       
   123 /**
       
   124 * Result from the "save as" query.
       
   125 */
       
   126 enum TDocSaveAsResult
       
   127     {
       
   128     EDocFileCancelWrite = -1203, // Cancel the operation
       
   129     EDocFileOverWrite,          // Overwrite
       
   130     EDocFileRenameNew           // Rename
       
   131     };
       
   132 
       
   133 /**
       
   134 * Service mode.
       
   135 * Some mime types e.g. text/x-vCalendar can not be saved
       
   136 * (there is no sense of doing it), but can be opened. Others can be
       
   137 * Saved but not opened. Names should be rather self-explanatory.
       
   138 */
       
   139 enum TDocServiceMode
       
   140 {
       
   141     EDocOpenAndSave,            // Handler can open and save the data type
       
   142     EDocOpenOnly,               // Handler can only open the data type
       
   143     EDocSaveOnly                // Handler can only open the data type
       
   144 };
       
   145 
       
   146 #endif // DOCCONSTANTS_H
       
   147             
       
   148 // End of File