This page was last modified 09:26, 1 July 2008.
CS001054 - Checking whether a certain MIME type is supported
From Forum Nokia Wiki
| ID | CS001054 | Creation date | July 1, 2008 |
| Platform | S60 3rd Edition, FP1 | Tested on devices | Nokia N95 8GB |
| Category | Symbian C++ | Subcategory | Files/Data |
| Keywords (APIs, classes, methods, functions): CDocumentHandler, TDataType, CDocumentHandler::CanOpenL() |
Overview
This code snippet demonstrates how to use the Document Handler API for querying whether the system supports a certain MIME type.
This snippet can be self-signed.
MMP file
The following libraries are required:
LIBRARY apmime.lib // TDataType LIBRARY commonui.lib // CDocumentHandler
Header file
#include <DocumentHandler.h>
private: // Data CDocumentHandler* iDocHandler;
Source file
#include <DocumentHandler.h>
iDocHandler = CDocumentHandler::NewL(CEikonEnv::Static()->Process());
_LIT8(KAudioBasicMimeType, "audio/basic"); TDataType audioDataType(KAudioBasicMimeType); TBool result = EFalse; TRAPD(err, result = iDocHandler->CanOpenL(audioDataType)); if (err == KMimeNotSupported) { // MIME type is not supported } else if (result && !err) { // Basic audio can be handled } else if (!result && !err) { // Basic audio cannot be handled } else { // Some other error }
Postconditions
The Document Handler API has queried whether the audio/basic MIME type is supported by the system.
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| N70 - Cannot stream Real Player, why? | teura666 | Graphics & Video & Streaming | 2 | 2006-01-19 09:19 |
| MIME type for color callergroup logo? | enstedt | Digital Rights Management & Content Downloading | 1 | 2002-12-17 16:17 |
| Where do the mime types need to be??? | kray | General Browsing | 3 | 2004-08-26 17:31 |
| I have games (.jar, .jad), how do i download them into the nokia 3510 | dcgsmix | Mobile Java General | 3 | 2003-12-14 21:16 |
| MMAPI/MIDP2 Audio playback | ericjame | Mobile Java Media (Graphics & Sounds) | 0 | 2005-08-29 16:40 |

