当前位置: 首页>>代码示例>>C++>>正文


C++ SyncProfile::name方法代码示例

本文整理汇总了C++中SyncProfile::name方法的典型用法代码示例。如果您正苦于以下问题:C++ SyncProfile::name方法的具体用法?C++ SyncProfile::name怎么用?C++ SyncProfile::name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SyncProfile的用法示例。


在下文中一共展示了SyncProfile::name方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SyncPluginBase

ClientPlugin::ClientPlugin( const QString& aPluginName,
                            const SyncProfile& aProfile,
                            PluginCbInterface *aCbInterface )
:   SyncPluginBase( aPluginName, aProfile.name(), aCbInterface ),
    iProfile( aProfile )
{
}
开发者ID:amtep,项目名称:buteo-syncfw,代码行数:7,代码来源:ClientPlugin.cpp

示例2: ClientPlugin

OOPClientPlugin::OOPClientPlugin(const QString& aPluginName,
                                 const SyncProfile& aProfile,
                                 PluginCbInterface* aCbInterface,
                                 QProcess &aProcess ) : 
    ClientPlugin( aPluginName, aProfile, aCbInterface ), iDone( false )
{
    FUNCTION_CALL_TRACE;

    // randomly-generated profile names cannot be registered
    // as dbus service paths due to being purely numeric.
    QString profileName = aProfile.name();
    int numericIdx = profileName.indexOf(QRegExp("[0123456789]"));
    QString servicePath = numericIdx == 0
                        ? QString(QLatin1String("%1%2%3"))
                              .arg(DBUS_SERVICE_NAME_PREFIX)
                              .arg("profile-")
                              .arg(profileName)
                        : QString(QLatin1String("%1%2"))
                              .arg(DBUS_SERVICE_NAME_PREFIX)
                              .arg(profileName);

    // Initialise dbus for client
    iOopPluginIface = new ButeoPluginIface( servicePath,
                                         DBUS_SERVICE_OBJ_PATH,
                                         QDBusConnection::sessionBus()
                                       );
    iOopPluginIface->setTimeout(60000); // one minute.

    // Chain the signals received over dbus
    connect(iOopPluginIface, SIGNAL(transferProgress(const QString &,
            Sync::TransferDatabase, Sync::TransferType, const QString &, int)),
        this, SIGNAL(transferProgress(const QString &,
            Sync::TransferDatabase, Sync::TransferType, const QString &, int)));

    connect(iOopPluginIface, SIGNAL(error(QString,QString,int)),
        this, SLOT(onError(QString,QString,int)));

    connect(iOopPluginIface, SIGNAL(success(QString,QString)),
        this, SLOT(onSuccess(QString,QString)));

    connect(iOopPluginIface, SIGNAL(accquiredStorage(const QString &)),
        this, SIGNAL(accquiredStorage(const QString &)));

    connect(iOopPluginIface,SIGNAL(syncProgressDetail(const QString &,int)),
            this ,SIGNAL(syncProgressDetail(const QString &,int)));

    // Handle the signals from the process
    connect(&aProcess, SIGNAL(error(QProcess::ProcessError)),
            this, SLOT(onProcessError(QProcess::ProcessError)));

    connect(&aProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
            this, SLOT(onProcessFinished(int,QProcess::ExitStatus)));
}
开发者ID:amtep,项目名称:buteo-syncfw,代码行数:53,代码来源:OOPClientPlugin.cpp

示例3: ClientPlugin

OOPClientPlugin::OOPClientPlugin(const QString& aPluginName,
                                 const SyncProfile& aProfile,
                                 PluginCbInterface* aCbInterface,
                                 QProcess &aProcess ) : 
    ClientPlugin( aPluginName, aProfile, aCbInterface )
{
    FUNCTION_CALL_TRACE;

    // Initialise dbus for client
    iOopPluginIface = new ButeoPluginIface( DBUS_SERVICE_NAME_PREFIX + aProfile.name(),
                                         DBUS_SERVICE_OBJ_PATH,
                                         QDBusConnection::sessionBus()
                                       );
    iOopPluginIface->setTimeout(60000); // one minute.

    // Chain the signals received over dbus
    connect(iOopPluginIface, SIGNAL(transferProgress(const QString &,
            Sync::TransferDatabase, Sync::TransferType, const QString &, int)),
        this, SIGNAL(transferProgress(const QString &,
            Sync::TransferDatabase, Sync::TransferType, const QString &, int)));

    connect(iOopPluginIface, SIGNAL(error(const QString &, const QString &, int)),
        this, SIGNAL(error(const QString &, const QString &, int)));

    connect(iOopPluginIface, SIGNAL(success(const QString &, const QString &)),
        this, SIGNAL(success(const QString &, const QString &)));

    connect(iOopPluginIface, SIGNAL(accquiredStorage(const QString &)),
        this, SIGNAL(accquiredStorage(const QString &)));

    connect(iOopPluginIface,SIGNAL(syncProgressDetail(const QString &,int)),
    		this ,SIGNAL(syncProgressDetail(const QString &,int)));

    connect(&aProcess, SIGNAL(error(QProcess::ProcessError)),
            this, SIGNAL(processError(QProcess::ProcessError)));

    connect(&aProcess, SIGNAL(finished(int, QProcess::ExitStatus)),
            this, SIGNAL(processFinished(int,QProcess::ExitStatus)));
}
开发者ID:xhaakon,项目名称:buteo-syncfw,代码行数:39,代码来源:OOPClientPlugin.cpp


注:本文中的SyncProfile::name方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。