2 * Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Definition of CDocumentHandler class.
15 * The purpose of the Documenthandler is to offer to applications
16 * - wrapper for application embedding
17 * - temporary file utility to support data caging for platform security
23 #ifndef DOCUMENTHANDLER_H
24 #define DOCUMENTHANDLER_H
32 // App UIDs for handlers. Handlers are identified by the handler application's
33 // UID. E.g. The handler for WMLC (binary format of Wireless Markup Language)
34 // is responsible for launching the WMLBrowser. The data type
35 // application/wap.vnd.wmlc is therefore mapped to the browser's UID,
38 const TInt KTextHandler = 0x1000599d; // Notepad viever
39 const TInt KWmlcHandler = 0x10008D39; // WML Browser
40 const TInt KJamHandler = 0x100009C1; // JAM
41 const TInt KAppInstHandler = 0x101F875A; // Installer
42 const TInt KBioViewerAppHandler = 0x0FC99F01; // BVA
43 const TInt KImageViewerHandler = 0x101f4d90; // Image viever
44 const TInt KCertSaveAppHandler = 0x100059D2; // Cert response handler app
45 const TInt KCODHandler = 0x10008d4a; // COD handler
46 const TInt KDDhandler = 0x10008d3f; // DD Handler
48 // A global external mime type for all nokia games.
49 _LIT8(KGameMimeType, "application/x-NokiaGameData");
50 _LIT8(KDataTypeODM,"application/vnd.oma.drm.message"); // Not supported by DocumentHandler
51 _LIT8(KDataTypeDCF,"application/vnd.oma.drm.content"); // Deprecated, do not use from here
54 const TInt KBadMimeType = -12002; // Mime type conflict etc.
55 const TInt KMimeNotSupported = -12003; // No handler found
56 const TInt KNullContent = -12005; // Empty content
57 const TInt KDataDirNotFound = -12006; // Deprecated - not used
58 const TInt KExecNotAllowed = -12007; // Executables not allowed
59 const TInt KNoHostProcess = -12008; // Deprecated - not used
60 const TInt KNotInitialized = -12009; // Not initialized
61 const TInt KUserCancel = -12010; // User cancelled operation
62 const TInt KDRMErrSession = -12011; // DRM session error.
63 const TInt KDRMErrNoRights = -12012; // Invalid DRM rights.
64 const TInt KDRMErrRightsDBCorrupted = -12013; // DRM rights db corrupted.
65 const TInt KDRMErrInvalidVersion = -12014; // Invalid DRM version.
66 const TInt KDRMErrPreviewRights = -12015; // Preview DRM rights.
71 // API operations to inform special handlers of the entry function.
74 EDocCopy, // CopyL( aFileNameOld, aNameNew, aDataType, aAttr)
75 EDocSave, // SaveL( aContent, aDataType, aAttr )
76 EDocSaveAs, // SaveL( aContent, aDataType,aFileName, aAttr )
77 EDocOpenFile, // OpenFileL( aFileName, aDataType )
78 EDocOpenFileEmb, // OpenFileEmbeddedL( aFileName, aDataType)
79 EDocMove, // MoveL( aFileNameOld, aNameNew, aDataType, aAttr)
80 EDocSilentMove, // SilentMoveL( aFileNameOld, aNameNew, aRootPaht, aDataType, aAttr)
81 EDocSaveTemp, // SaveTempFileL( aContent, aDataType, aFileName, aSharableFile)
84 // FORWARD DECLARATIONS
85 class CDocHandlerBase; // Base class for handlers
86 class CEikProcess; // The host process
87 class MAknServerAppExitObserver; // Viewer app exit observer
88 class TDataType; // Mime type handling
89 class RApaLsSession; // App list server session
90 class CAiwGenericParamList; // Generic parameter list
95 * Utility class for opening and saving any supported content.
96 * This class declares an interface for the DocumentHandler, a
97 * common component in Series60.
99 * The CDocumentHandler class will not itself implement any content
100 * handling routines. It's responsible for finding out which application
101 * can handle given data type and constructing a correct handler implementation
102 * for that application. If the given data type is supported by the system
103 * but no specific handler is found, the CDocDefaltHandler is then constructed.
104 * The default handler is an implementation of the CDoCDocHandlerBase class with
105 * standard "Epoc-style" content handling.
107 * The handler application can be lauched standalone or embedded. The
108 * Embedded launching is preferred way in Series60.
109 * Standalone launching means that the application will run in
110 * it's own process. Embedded launching means that the UI of an
111 * application, which is responsible for handling given data type,
112 * is embedded into the parent application. There will be only
113 * parent applications icon shown in the fast swap window when an
114 * application is embedded.
116 * Link your application against CommonUI.lib.
118 * <b>An example: </b>
120 * #include <DocumentHandler.h>
122 * <i>// Define DocHandler</i>
123 * CDocumentHandler* iDocHandler;
125 * <i>// Construct DocHandler</i>
128 * iDocHandler = CDocumentHandler::NewL();
130 * <i>// I want to be notified when exit happends. Because I
131 * // pass "this" pointer, I have to derive from
132 * // MAknServerAppExitObserver class.</i>
133 * iDocHandler->SetExitObserver(this)
136 * <i>// delete DocHandler</i>
139 * delete iDocHandler;
143 * <i>// and use like this</i>
145 * void OpenAttachmentL( RFile& aFile, <i>// A file to be open</i>
146 * TDataType& aDataType ) <i>// DataType can be empty</i>
148 * TInt error = KErrNone;
152 * // Leaves on system wide errors like disk full, out of memory etc.</i>
153 * error = iDocHandler->OpenFileEmbeddedL( aFile, aDataType );
154 * // The status code can be either KErrNone or KUserCancel
160 NONSHARABLE_CLASS(CDocumentHandler) : public CBase
162 public: // Constructors and destructor
165 * Two-phased constructor. Leaves on failure.
167 * @param aProcess The host process, which will be
168 * used for embedded launching.
170 * @return The constructed CDocumentHandler
171 * @deprecated in Series60 3.0, instead use NewL without CEikProcess parameter
173 IMPORT_C static CDocumentHandler* NewL( CEikProcess* aProcess );
176 * Two-phased constructor. Leaves on failure.
178 * @param aProcess The host process, which will be
179 * used for embedded launching.
181 * @return The constructed CDocumentHandler
182 * @deprecated in Series60 3.0, instead use NewL without CEikProcess parameter
184 IMPORT_C static CDocumentHandler* NewLC( CEikProcess* aProcess );
187 * Two-phased constructor. Leaves on failure.
190 * @return The constructed CDocumentHandler
191 * @since Series 60 3.0
193 IMPORT_C static CDocumentHandler* NewL( );
196 * Two-phased constructor. Leaves on failure.
199 * @return The constructed CDocumentHandler
200 * @since Series 60 3.0
202 IMPORT_C static CDocumentHandler* NewLC( );
207 IMPORT_C virtual ~CDocumentHandler();
209 private: // Constructors and destructor
212 * C++ default constructor.
217 * C++ copy constructor
219 CDocumentHandler( const CDocumentHandler& );
222 * By default EPOC constructor is private.
226 public: // New functions, data caging
229 * Utility method for opening filehandle from existing file for OpenFileL
230 * calls. The created file handle is meant to be shared across process
233 * This function can leave in some system wide error situation.
234 * E.g. out of memory, not enough space in filesystem etc. These
235 * errors are usually trapped by the application framework.
237 * NOTE! Caller is responsible of closing opened file handle.
239 * @param aFileName Name (including directory information) for file.
240 * This file should exist allready, otherwise this
241 * function leaves with KErrNotFound.
242 * @param aSharableFile Returned file handle that can be shared.
243 * @since Series 60 3.0
245 IMPORT_C void OpenTempFileL(
246 const TDesC& aFileName,
247 RFile &aSharableFile);
250 * Utility method for save aContent with aDataType temporarily
251 * for OpenFileL calls. The created file handle is meant to be shared
252 * across process boundaries.
254 * This temporary file will be saved to process private temp directory.
255 * Temporary directory will be created if not existing yet.
257 * This function can leave in some system wide error situation.
258 * E.g. out of memory, not enough space in filesystem etc. These
259 * errors are usually trapped by the application framework.
261 * NOTE! Caller is responsible of closing opened file handle!
262 * Created temporary file will be deleted in destructor of
263 * DocumentHandler, but caller can delete it self as well.
265 * @param aContent A content data buffer. Narrow descriptor that
266 * can contain any kind of data.
267 * @param aDataType A data type for the content of the file. If empty
268 * the DocumentHandler tries to recognize the content.
269 * @param aFileName Use this name for saving. The name must not
270 * contain any directory information.
271 * @param aSharableFile Returned file handle that can be shared.
272 * @since Series 60 3.0
274 IMPORT_C void SaveTempFileL(
275 const TDesC8& aContent,
276 TDataType& aDataType,
277 const TDesC& aFileName,
278 RFile &aSharableFile);
280 public: // New functions, parameter handling
283 * Returns an empty instance of CAiwGenericParamList class. It can be
284 * used for example as an input parameter list for API methods.
285 * This is just a convinience method and doesn't have
286 * to be used. If consumer wants to create input list by itself
287 * it is ok. If this method is used, service handler takes care
288 * of deleting returned generic parameter list.
290 * @return An empty instance of CAiwGenericParameter list.
291 * @since Series 60 3.0
293 IMPORT_C CAiwGenericParamList& InParamListL();
296 * Returns a list of possible output parameters handler application
297 * may have set after executing the service. The caller is responsible
298 * for deleting the parameter instance if not null.
300 * @return List of output parameters, NULL if nothing set.
303 IMPORT_C const CAiwGenericParamList* OutParamList();
305 public: // New functions, open file with filehandle
308 * Launches an application in standalone capable of handling
309 * data in aSharableFile (using aDatatype if available).
310 * Doesn't save data from the file. In case of DRM protected
311 * files with restricted rights, there will be query asking
312 * if user want open file.
314 * This function can leave in some system wide error situation.
315 * E.g. out of memory, not enough space in filesystem etc. See
316 * also possible error codes from documenthandler.h header file.
318 * @param aSharableFile A sharable file handle to be passed to
319 * the launched application
320 * @param aDataType A data type for the content of the file. If empty
321 * the DocumentHandler tries to recognize the content.
322 * @return KErrNone if success. KUserCancel if the user
323 * cancelled the operation.
324 * @since Series 60 3.0
326 IMPORT_C TInt OpenFileL(
327 RFile& aSharableFile,
328 TDataType& aDataType);
331 * Launches an application in embedded (if possible) capable of
332 * handling data in aSharableFile (using aDatatype if available).
333 * Doesn't save data from the file. In case of DRM protected
334 * files with restricted rights, there will be query asking
335 * if user want open file.
337 * This function can leave in some system wide error situation.
338 * E.g. out of memory, not enough space in filesystem etc. See
339 * also possible error codes from documenthandler.h header file.
341 * @param aSharableFile A sharable file handle to be passed to
342 * the launched application.
343 * @param aDataType A data type for the content of the file. If empty
344 * the DocumentHandler tries to recognize the content.
345 * @param aParamList Parameter list to be passed to handler application.
346 * @return KErrNone if success. KUserCancel if the user
347 * cancelled the operation.
348 * @since Series 60 3.0
350 IMPORT_C TInt OpenFileEmbeddedL(
351 RFile& aSharableFile,
352 TDataType& aDataType,
353 const CAiwGenericParamList& aParamList);
356 * Launches an application in embedded (if possible) capable of
357 * handling data in aSharableFile (using aDatatype if available).
358 * Doesn't save data from the file. In case of DRM protected
359 * files with restricted rights, there will be query asking
360 * if user want open file.
362 * This function can leave in some system wide error situation.
363 * E.g. out of memory, not enough space in filesystem etc. See
364 * also possible error codes from documenthandler.h header file.
366 * @param aSharableFile A sharable file handle to be passed to
367 * the launched application.
368 * @param aDataType A data type for the content of the file. If empty
369 * the DocumentHandler tries to recognize the content.
370 * @return KErrNone if success. KUserCancel if the user
371 * cancelled the operation.
372 * @since Series 60 3.0
374 IMPORT_C TInt OpenFileEmbeddedL(
375 RFile& aSharableFile,
376 TDataType& aDataType);
378 public: // open file with filename
381 * Launches an application standalone capable of handling
382 * data in aFilename, with aDataType. Doesn't copy data
385 * This function can leave in some system wide error situation.
386 * E.g. out of memory, not enough space in filesystem etc. See
387 * also possible error codes from documenthandler.h header file.
389 * @param aFileName Name of the file. Directory path included.
390 * @param aDataType A data type for the content of the file. If empty
391 * the DocumentHandler tries to recognize the content.
392 * @return KErrNone if success. KUserCancel if the user
393 * cancelled the operation.
395 IMPORT_C TInt OpenFileL(
396 const TDesC& aFileName,
397 TDataType& aDataType );
400 * Launches an application embedded capable of handling data in
401 * aFilename with aDataType. Doesn't copy data from the file.
403 * This function can leave in some system wide error situation.
404 * E.g. out of memory, not enough space in filesystem etc. See
405 * also possible error codes from documenthandler.h header file.
407 * @param aFileName Name of the file. Directory path included.
408 * @param aDataType A data type for the content of the file. If empty
409 * the DocumentHandler tries to recognize the content.
410 * @return KErrNone if success. KUserCancel if the user
411 * cancelled the operation.
413 IMPORT_C TInt OpenFileEmbeddedL(
414 const TDesC& aFileName,
415 TDataType& aDataType );
417 public: // data saving
420 * Save aContent with aDataType using aAttr to a correct directory.
421 * Generates a new name for saving. The storage is usually a filesystem,
422 * but can be anything from application spesific data structures to
425 * This function can leave in some system wide error situation.
426 * E.g. out of memory, not enough space in filesystem etc. See
427 * also possible error codes from documenthandler.h header file.
429 * @param aContent A content data buffer. Narrow descriptor that
430 * can contain any kind of data.
431 * @param aDataType A data type for the content of the file. If empty
432 * the DocumentHandler tries to recognize the content.
433 * @param aAttr Use these file attributes for saving. Your can
434 * find these attributes from
435 * \epoc32\include\f32file.h header file.
436 * If the storage is not a filesystem these
437 * attributes are ignored.
438 * @return KErrNone if success. KUserCancel if the user
439 * cancelled the operation.
442 const TDesC8& aContent,
443 TDataType& aDataType,
447 * Save aBuffer with aDataType using aAttr to a correct storage with a
448 * supplied name. The storage is usually a filesystem, but can be
449 * anything from application spesific data structures to a database.
451 * This function can leave in some system wide error situation.
452 * E.g. out of memory, not enough space in filesystem etc. See
453 * also possible error codes from documenthandler.h header file.
455 * @param aContent A content data buffer. Narrow descriptor that
456 * can contain any kind of data.
457 * @param aDataType A data type for the content of the file. If empty
458 * the DocumentHandler tries to recognize the content.
459 * @param aName Use this name for saving. The name must not
460 * contain any directory information.
461 * @param aAttr Use these file attributes for saving. Your can
462 * find these attributes from
463 * \epoc32\include\f32file.h header file.
464 * If the storage is not a filesystem these
465 * attributes are ignored.
466 * @return KErrNone if success. KUserCancel if the user
467 * cancelled the operation.
470 const TDesC8& aContent,
471 TDataType& aDataType,
476 * Copy a file named aFileNameOld to the correct storage using
477 * name aNameNew and aFileAttr. If aNameNew is empty, use
480 * This function can leave in some system wide error situation.
481 * E.g. out of memory, not enough space in filesystem etc. See
482 * also possible error codes from documenthandler.h header file.
484 * @param aFileNameOld Name of the file being copied.
485 * @param aNameNew Name of the new file. If null, use the
487 * @param aDataType A data type for the file. If empty the
488 * DocumentHandler tries to recognize type.
489 * @param aAttr Use these file attributes for saving.
490 * ReadOnly, ReadWrite.
491 * @return KErrNone if success. KUserCancel if the user
492 * cancelled the operation.
495 const TDesC& aFileNameOld,
496 const TDesC& aNameNew,
497 TDataType& aDataType,
501 * Copy a file with handle aFileOld to the correct storage using
502 * name aNameNew and aFileAttr. If aNameNew is empty, use
505 * This function can leave in some system wide error situation.
506 * E.g. out of memory, not enough space in filesystem etc. See
507 * also possible error codes from documenthandler.h header file.
509 * @param aFileOld Handle of the file being copied.
510 * @param aNameNew Name of the new file. If null, use the
512 * @param aDataType A data type for the file. If empty the
513 * DocumentHandler tries to recognize type.
514 * @param aAttr Use these file attributes for saving.
515 * ReadOnly, ReadWrite.
516 * @return KErrNone if success. KUserCancel if the user
517 * cancelled the operation.
520 const RFile& aFileOld,
521 const TDesC& aNameNew,
522 TDataType& aDataType,
526 * Move a file named aFileNameOld to the correct storage using
527 * name aNameNew and aFileAttr. Note that file in the old location
528 * (aFileNameOld) will be removed during this operation.
530 * This function can leave in some system wide error situation.
531 * E.g. out of memory, not enough space in filesystem etc. See
532 * also possible error codes from documenthandler.h header file.
534 * @param aFileNameOld Name of the file being copied.
535 * @param aNameNew Name of the new file. If null, use the
536 * default name for this mime-type.
537 * @param aDataType A data type for the file. If empty the
538 * DocumentHandler tries to recognize type.
539 * @param aAttr Use these file attributes for saving.
540 * ReadOnly, ReadWrite.
541 * @return KErrNone if success. KUserCancel if the user
542 * cancelled the operation.
543 * @since Series60 2.8
546 const TDesC& aFileNameOld,
547 const TDesC& aNameNew,
548 TDataType& aDataType,
552 * Move a file named aFileNameOld to the correct storage using
553 * name aNameNew and aFileAttr. This method operates silently, so
554 * nothing will be asked from user. Caller should give root path of
555 * the selected memory. Unique file name will be created automatically
556 * without user interaction. Note that file in the old location
557 * (aFileNameOld) will be removed during this operation.
559 * This function can leave in some system wide error situation.
560 * E.g. out of memory, not enough space in filesystem etc. See
561 * also possible error codes from documenthandler.h header file.
563 * @param aFileNameOld Name of the file being copied.
564 * @param aNameNew Name of the new file. If null, use the
565 * default name for this mime-type.
566 * @param aRootPath Root path of the selected memory where file
568 * @param aDataType A data type for the file. If empty the
569 * DocumentHandler tries to recognize type.
570 * @param aAttr Use these file attributes for saving.
571 * ReadOnly, ReadWrite.
572 * @return KErrNone if success.
573 * @since Series60 3.0
575 IMPORT_C TInt SilentMoveL(
576 const TDesC& aFileNameOld,
577 const TDesC& aNameNew,
578 const TDesC& aRootPath,
579 TDataType& aDataType,
583 public: // query functions
586 * Is the aDataType supported by the system.
588 * @param aDataType Data type for content.
590 * @return True if there is an application capable of handling
591 * aDataType. False if no application can handle
594 IMPORT_C TBool CanHandleL( const TDataType& aDataType );
597 * Is opening of aDataType supported by the system.
599 * @param aDataType Data type for content.
601 * @return True if there is an application capable of handling
602 * aDataType. False if no application can handle
605 IMPORT_C TBool CanOpenL( const TDataType& aDataType );
608 * Is saving aDataType supported by the system.
610 * @param aDataType Data type for content.
612 * @return True if there is an application capable of handling
613 * aDataType. False if no application can handle
616 IMPORT_C TBool CanSaveL( const TDataType& aDataType );
619 * Get the whole path including filename where the content was saved.
620 * If the content was not saved to a file, this function returns
621 * a name that represents the saved object.
623 * It may not be possible to open the object with the returned
624 * value, if it's not a real file in the filesystem. This situation
625 * may happen when e.g. the handler application stores it's contents in
626 * some weird data structure.
628 * @param aPath The path of the saved content.
630 * @return KErrNone if the path was found. KNotInitialised if the
631 * handler is not initialised.
633 IMPORT_C TInt GetPath( TDes& aPath );
636 * Get the uid of handler application. In case of media files uid is
637 * Media Gallery's uid. This method should be called only succesfully
638 * completed DocumentHandler operations.
640 * @param aUid Uid of the handler application for the content.
642 * @return KErrNone if the uid was found. KNotInitialised if the
643 * handler is not initialised.
644 * @since Series 60 2.8
646 IMPORT_C TInt HandlerAppUid( TUid& aUid );
649 * Set an observer for embedded application exit events.
650 * DocumentHandler will delegate embedding applications exit
651 * events to aObserver if it's not NULL:
653 * @param aObserver Exit observer
654 * @since Series 60 3.0
656 IMPORT_C void SetExitObserver( MAknServerAppExitObserver* aObserver );
659 * Utility method for appending a correct file name extension for some
660 * content. This method should be called if wanted quarantee that file
661 * extension of aFileName is correct with aDataType.
663 * This method uses internal mapping table to find correct file
664 * extension to aFileName. Mapping table contains mainly extensions
665 * and datatypes, which cannot be recognized based on the data it self
666 * (No header information etc.).
668 * This method replaces existing extension with correct one at aFileName
669 * if needed. If aDatatype is not found from mapping table or aDatatype
670 * is not supported by any application, aFileName will remain unchanged.
672 * @param aFileName Append extension to this filename.
673 * @param aDataType The content type of the file.
674 * @since Series 60 3.0
676 IMPORT_C void CheckFileNameExtension(
678 const TDataType& aDatatype );
681 * Get the RApaLsSession.
683 * @return Pointer to RApaLsSession
685 RApaLsSession* ApaLs();
688 * Get the exit observer.
690 * @return Pointer to exit observer
691 * @since Series 60 3.0
693 MAknServerAppExitObserver* ServerAppExitObserver() const;
696 * Get the operation code of the api entry function.
698 TDocOperation DocOperation() const;
701 * Close sharable FileSession.
703 void CloseSharableFS();
706 * Set temporary file, which will be deleted in destructor.
708 void SetTempFile( const TDesC& aTempFile);
711 * Utility method to find out if there are any applications that
712 * support progressive downloading for a given data type.
714 * The decision is based on configuration made in central repository.
716 * @param aDataType The content type of the file.
717 * @param aUid An Uid of the applications for the given data type.
718 * @return ETrue if progressive download was supported for the given
719 * data type. Otherwise EFalse.
720 * @since Series 60 3.1
722 IMPORT_C TBool CanHandleProgressivelyL(
723 const TDataType& aDataType,
727 * Utility method to provide a list of applications that support
728 * progressive downloading.
730 * The list of applications uids is configured central repository.
732 * @param aUidList A list of app Uids
733 * @since Series 60 3.2
735 IMPORT_C void GetProgressiveDownloadAppUidsL( RArray<TInt32>& aUidList );
737 private: // New functions
740 * Construct a handler for a given data type. A previous handler will
741 * be destroyed and the new one is constructed.
743 * The desicion of which handler implementation to use is
744 * based on Apparc's AppForDataType query. If the app uid is
745 * found for aDataType and there is a hardcoded handler for it,
746 * the right handler will be constucted. If the app uid is not found
747 * try to match a data type for some handler. The default handler is
748 * constructed if no handler entry is found.
750 * @param aUid UID of the handler application.
754 const TDataType& aDataType,
758 * Try to find a handler for aUid. Constructs iHandler if found.
760 * @param aDataType A data type to pass to a handler
761 * @param aUid An uid to search a handler for
763 void FindHandlerByUidL(
765 const TDataType& aDataType);
768 * Try to find a handler for aDataType. Constructs iHandler if found.
770 * @param aUid An Uid for handler application.
771 * @param aDataType A data type to search a handler for.
773 void FindHandlerByMimeTypeL(
775 const TDataType& aDataType);
778 * Makes all the nesessary security checks and maps aDataType to
779 * an UID of the handler application. If system is not able to handle
780 * the content type, or file is DRM protectedfile, aDataType and aUid
783 * @param aFileName Filename
784 * @param aDataType Data type for the file
785 * @param aUid An application UID will be returned if a handler
787 * @return KErrNone if success, error code if failure.
789 TInt RecognizeAndCheckFileL(
790 const TDesC& aFileName,
791 TDataType& aDataType,
795 * Makes all the nesessary security checks and maps aDataType to
796 * an UID of the handler application. If system is not able to handle
797 * the content type, or file is DRM protectedfile, aDataType and aUid
800 * @param aFileHandle Filehandle
801 * @param aDataType Data type for the file
802 * @param aUid An application UID will be returned if a handler
804 * @return KErrNone if success, error code if failure.
806 TInt RecognizeAndCheckFileL(
808 TDataType& aDataType,
812 * This method lists all supported mime-types of system using
813 * RDebug::Print. On UREL mode this method do nothing.
815 void ListSupportedMimeTypesL();
818 * Prohibit the assignment operation
820 CDocumentHandler operator=( const CDocumentHandler& ) const;
823 * Convert a hex string to 32-bit integer.
825 TInt ConvertHexStringToInt32(
826 const TDesC& aHexString,
832 * The entry operation. Handlers can query about the entry function
833 * when they need to implement some special behaviour.
835 TDocOperation iOperation;
838 * A handler providing operations.
840 CDocHandlerBase* iHandler;
843 * A ApaLs session client.
845 RApaLsSession* iApaLs;
848 * Notify embedded app's exit event to this observer.
850 MAknServerAppExitObserver* iServerAppExitObserver;
853 * Holds sharable Fileserver session
858 * Parameter list created using InParamListL function
860 CAiwGenericParamList* iInParams;
863 * Filename of temporary saved file. This file will be deleted
864 * in destructor of documenthandler
866 TFileName iTempFileName;
870 #endif // DOCUMENTHANDLER_H