<commit_before>/* * This file is part of meego-im-framework *
 *
 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * Contact: Nokia Corporation (<EMAIL>)
 *
 * If you have questions regarding the use of this file, please contact
 * Nokia at <EMAIL>.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License version 2.1 as published by the Free Software Foundation
 * and appearing in the file LICENSE.LGPL included in the packaging
 * of this file.
 */

#ifndef MINPUTMETHODPLUGIN_H
#define MINPUTMETHODPLUGIN_H

#include <QStringList>
#include <QtPlugin>
#include <QSet>

#include "minputmethodbase.h"
#include "minputmethodsettingsbase.h"
#include "minputmethodnamespace.h"

class MInputContextConnection;
class MInputMethodBase;


/*!
 * \brief MInputMethodPlugin is an interface class for all input method plugins.
 *
 * To create a virtual keyboard / input method plugin, re-implement the virtual functions and
 * instantiate the input method implementation in the createInputMethod() method.
 * Make sure your plugin links against the m im framework library as well.
 */
class MInputMethodPlugin
{
public:
    /*! \brief Implement this function to return the identifier for this input method.
     */
    virtual QString name() const = 0;

    /*! \brief Implement this function to return the languages supported for this virtual keyboard.
     */
    virtual QStringList languages() const = 0;

    /*! \brief Creates and returns the MInputMethodBase object for
     * this plugin. This function will be only called once and the allocated
     * resources will be owned by the input method server.
     */
    virtual MInputMethodBase *createInputMethod(MInputContextConnection *icConnection) = 0;

    /*! \brief Creates and returns the MInputMethodSettingsBase object for
     * this plugin. This function will be only called once and the allocated
     * resources will be owned by the input method server.
     */
    virtual MInputMethodSettingsBase *createInputMethodSettings() = 0;

    /*!
     * \brief Returns set of states which could be handled by this plugin.
     *
     * WARNING: If result is empty then this plugin will not be loaded
     * during startup.
     */
    virtual QSet<MInputMethod::HandlerState> supportedStates() const = 0;
};


Q_DECLARE_INTERFACE(MInputMethodPlugin,
                    "com.nokia.maemo.MInputMethodPlugin/1.0")

#endif<commit_msg>Changes: plugin interface out of com.nokia.maemo<commit_after>/* * This file is part of meego-im-framework *
 *
 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * Contact: Nokia Corporation (<EMAIL>)
 *
 * If you have questions regarding the use of this file, please contact
 * Nokia at <EMAIL>.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License version 2.1 as published by the Free Software Foundation
 * and appearing in the file LICENSE.LGPL included in the packaging
 * of this file.
 */

#ifndef MINPUTMETHODPLUGIN_H
#define MINPUTMETHODPLUGIN_H

#include <QStringList>
#include <QtPlugin>
#include <QSet>

#include "minputmethodbase.h"
#include "minputmethodsettingsbase.h"
#include "minputmethodnamespace.h"

class MInputContextConnection;
class MInputMethodBase;


/*!
 * \brief MInputMethodPlugin is an interface class for all input method plugins.
 *
 * To create a virtual keyboard / input method plugin, re-implement the virtual functions and
 * instantiate the input method implementation in the createInputMethod() method.
 * Make sure your plugin links against the m im framework library as well.
 */
class MInputMethodPlugin
{
public:
    /*! \brief Implement this function to return the identifier for this input method.
     */
    virtual QString name() const = 0;

    /*! \brief Implement this function to return the languages supported for this virtual keyboard.
     */
    virtual QStringList languages() const = 0;

    /*! \brief Creates and returns the MInputMethodBase object for
     * this plugin. This function will be only called once and the allocated
     * resources will be owned by the input method server.
     */
    virtual MInputMethodBase *createInputMethod(MInputContextConnection *icConnection) = 0;

    /*! \brief Creates and returns the MInputMethodSettingsBase object for
     * this plugin. This function will be only called once and the allocated
     * resources will be owned by the input method server.
     */
    virtual MInputMethodSettingsBase *createInputMethodSettings() = 0;

    /*!
     * \brief Returns set of states which could be handled by this plugin.
     *
     * WARNING: If result is empty then this plugin will not be loaded
     * during startup.
     */
    virtual QSet<MInputMethod::HandlerState> supportedStates() const = 0;
};


Q_DECLARE_INTERFACE(MInputMethodPlugin,
                    "com.meego.meegoimframework.MInputMethodPlugin/1.0")

#endif
{'fraction_non_alphanumeric': 0.07106299212598426, 'fraction_numerical': 0.005118110236220472, 'mean_word_length': 3.635948905109489, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5291484', 'n_tokens_mistral': 1351, 'n_tokens_neox': 1296, 'n_words': 576}