javaruntimes/midp/runtime/inc/platformrequestinterface.h
author William Roberts <williamr@symbian.org>
Fri, 18 Jun 2010 16:27:48 +0100
branchGCC_SURGE
changeset 41 6918cb13caa7
parent 21 2a9601315dfc
permissions -rw-r--r--
Apply Bug 3029 workaround to S^4 in GCC_SURGE branch

/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  Platform request interface.
 *
*/


#ifndef PLATFORMREQUESTINTERFACE_H
#define PLATFORMREQUESTINTERFACE_H

#include <string>

#include "javaosheaders.h"

namespace java // codescanner::namespace
{
namespace runtime // codescanner::namespace
{

/**
 * Interface for platform specific implementation of MIDlet.platformRequest()
 * method.
 */
OS_NONSHARABLE_CLASS(PlatformRequestInterface)
{
public:

    static const int CONNECTION_NOT_SUPPORTED = -11100;
    static const int UNEXPECTED_ERROR = -11101;

    virtual ~PlatformRequestInterface() {}

    /**
    * This operation launches application which can manage URI.
    * @param aUri wanted to be executed.
    * @throws ExceptionBase with following error codes:
    *         CONNECTION_NOT_SUPPORTED:
    *         - scheme of the URI is not supported in the device.
    *         INTERNAL_ERROR:
    *         - Launching an application ffailed to internal error.
    */
    virtual void handleUri(const std::wstring& aUri) = 0;

};

} // end namespace runtime
} // end namespace java

java::runtime::PlatformRequestInterface* getPlatformRequestHandlerObj();

#endif // PLATFORMREQUESTINTERFACE_H