Example #1
0
Q_DECL_EXPORT int main(int argc, char **argv)
{
    qmlRegisterType<ChatModel>();
    qmlRegisterType<ContactModel>();
    qmlRegisterType<HistoryModel>();
    qmlRegisterType<ListEditorHelper>();
    qmlRegisterType<CallStatsModel>();
    qmlRegisterType<AccountSettingsModel>();
    qmlRegisterType<LinphoneCallModel>("org.linphone", 1, 0, "LinphoneCallModel");

    qRegisterMetaType<LinphoneCall*>("LinphoneCall*");
    qmlRegisterType<bb::device::DisplayInfo>("bb.displayInfo", 1, 0, "DisplayInfo");

    Application app(argc, argv);
    app.setMenuEnabled(false);

    LinphoneManager *manager = LinphoneManager::createInstance(&app);
    manager->createAndStartLinphoneCore();

    // Create the Application UI object, this is where the main.qml file
    // is loaded and the application scene is set.
    ApplicationUI appui;

    // Enter the application main event loop.
    return Application::exec();
}