Sha256: 90a1b9eb5f76290edda2eaa22a941dd932a19877f4ac066532f0610e554d0afc

Contents?: true

Size: 1.44 KB

Versions: 28

Compression:

Stored size: 1.44 KB

Contents

#include "common/RhoAppAdapter.h"
#include "sync/SyncThread.h"
#include "ruby/ext/rho/rhoruby.h"

namespace rho {
const _CRhoAppAdapter& RhoAppAdapter = _CRhoAppAdapter();

/*static*/ String _CRhoAppAdapter::getMessageText(const char* szName)
{
    if ( sync::CSyncThread::getInstance()->isNoThreadedMode() || !sync::CSyncThread::getInstance()->getSyncEngine().getNotify().isReportingEnabled() )
        return String();

    return rho_ruby_getMessageText(szName);
}

/*static*/ String _CRhoAppAdapter::getErrorText(int nError)
{
    if ( sync::CSyncThread::getInstance()->isNoThreadedMode() || !sync::CSyncThread::getInstance()->getSyncEngine().getNotify().isReportingEnabled() )
        return String();

    return rho_ruby_getErrorText(nError);
}

/*static*/ int  _CRhoAppAdapter::getErrorFromResponse(NetResponse& resp)
{
    if ( !resp.isResponseRecieved())
        return ERR_NETWORK;

    if ( resp.isUnathorized() )
    	return ERR_UNATHORIZED;

    if ( !resp.isOK() )
    	return ERR_REMOTESERVER;

    return ERR_NONE;
}

/*static*/ void  _CRhoAppAdapter::loadServerSources(const String& strSources)
{
    rho_ruby_loadserversources(strSources.c_str());
}

/*static*/ void  _CRhoAppAdapter::loadAllSyncSources()
{
    rho_ruby_loadallsyncsources();
}

/*static*/ const char* _CRhoAppAdapter::getRhoDBVersion()
{
	return rho_ruby_getRhoDBVersion();
}

/*static*/ void  _CRhoAppAdapter::resetDBOnSyncUserChanged()
{
    rho_ruby_reset_db_on_sync_user_changed();
}

}

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
rhodes-3.0.2 platform/shared/rubyext/RhoAppAdapter.cpp
rhodes-3.0.2.beta.1 platform/shared/rubyext/RhoAppAdapter.cpp
rhodes-3.0.1 platform/shared/rubyext/RhoAppAdapter.cpp
rhodes-3.0.1.beta.8 platform/shared/rubyext/RhoAppAdapter.cpp
rhodes-3.0.1.beta.7 platform/shared/rubyext/RhoAppAdapter.cpp
rhodes-3.0.1.beta.6 platform/shared/rubyext/RhoAppAdapter.cpp
rhodes-3.0.1.beta.5 platform/shared/rubyext/RhoAppAdapter.cpp
rhodes-3.0.1.beta.4 platform/shared/rubyext/RhoAppAdapter.cpp
rhodes-3.0.1.beta.3 platform/shared/rubyext/RhoAppAdapter.cpp
rhodes-3.0.1.beta.2 platform/shared/rubyext/RhoAppAdapter.cpp
rhodes-3.0.0 platform/shared/rubyext/RhoAppAdapter.cpp
rhodes-3.0.0.beta.7 platform/shared/rubyext/RhoAppAdapter.cpp
rhodes-3.0.0.beta.6 platform/shared/rubyext/RhoAppAdapter.cpp
rhodes-3.0.0.beta.5 platform/shared/rubyext/RhoAppAdapter.cpp
rhodes-3.0.0.beta.4 platform/shared/rubyext/RhoAppAdapter.cpp
rhodes-3.0.0.beta.3 platform/shared/rubyext/RhoAppAdapter.cpp
rhodes-3.0.0.beta.2 platform/shared/rubyext/RhoAppAdapter.cpp
rhodes-3.0.0.beta.1 platform/shared/rubyext/RhoAppAdapter.cpp
rhodes-2.4.1 platform/shared/rubyext/RhoAppAdapter.cpp
rhodes-2.4.1.beta.1 platform/shared/rubyext/RhoAppAdapter.cpp