Sha256: 58ab319808821f74c2989652e93092d19cd7a9c6ac6ac6ade383c95c57642319

Contents?: true

Size: 1.65 KB

Versions: 14

Compression:

Stored size: 1.65 KB

Contents

#pragma once

#ifdef __cplusplus

#include "logging/RhoLog.h"
#include "common/RhoThread.h"
#include "common/IRhoClassFactory.h"

#undef DEFAULT_LOGCATEGORY
#define DEFAULT_LOGCATEGORY "RhodesApp"

namespace rho {
namespace common {

class CRhodesAppBase : public common::CRhoThread
{
public:
    DEFINE_LOGCLASS;

protected:

    static CRhodesAppBase* m_pInstance;

    String m_strRhoRootPath, m_strBlobsDirPath, m_strDBDirPath, m_strAppRootPath;
    String m_strHomeUrl;

    CRhodesAppBase(const String& strRootPath);
public:
    static CRhodesAppBase* Create(const String& strRootPath);
    static void Destroy();
    static CRhodesAppBase* getInstance(){ return m_pInstance; }

    String resolveDBFilesPath(const String& strFilePath);
    const String& getRhoRootPath(){return m_strRhoRootPath;}
    const String& getAppRootPath(){return m_strAppRootPath;}
    const String& getBlobsDirPath(){return m_strBlobsDirPath; }
    const String& getDBDirPath(){return m_strDBDirPath; }
    const String& getHomeUrl(){ return m_strHomeUrl; }

    String canonicalizeRhoUrl(const String& strUrl) ;

protected:
    virtual void run(){}

    void initAppUrls();
};

}
}

inline rho::common::CRhodesAppBase& RHODESAPPBASE(){ return *rho::common::CRhodesAppBase::getInstance(); }

#endif //__cplusplus

#ifdef __cplusplus
extern "C" {
#endif //__cplusplus

const char* rho_native_rhopath();
const char* rho_rhodesapp_getplatform();
int rho_unzip_file(const char* szZipPath);

void rho_free_callbackdata(void* pData);
	
int rho_base64_encode(const char *src, int srclen, char *dst);
int rho_base64_decode(const char *src, int srclen, char *dst);	
	
#ifdef __cplusplus
};
#endif //__cplusplus

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rhodes-2.4.1 platform/shared/common/RhodesAppBase.h
rhodes-2.4.1.beta.1 platform/shared/common/RhodesAppBase.h
rhodes-2.4.0 platform/shared/common/RhodesAppBase.h
rhodes-2.4.0.beta.2 platform/shared/common/RhodesAppBase.h
rhodes-2.4.0.beta.1 platform/shared/common/RhodesAppBase.h
rhodes-2.3.2 platform/shared/common/RhodesAppBase.h
rhodes-2.3.2.beta.2 platform/shared/common/RhodesAppBase.h
rhodes-2.3.2.beta.1 platform/shared/common/RhodesAppBase.h
rhodes-2.3.1 platform/shared/common/RhodesAppBase.h
rhodes-2.3.1.beta.1 platform/shared/common/RhodesAppBase.h
rhodes-2.3.0 platform/shared/common/RhodesAppBase.h
rhodes-2.3.0.beta.3 platform/shared/common/RhodesAppBase.h
rhodes-2.3.0.beta.2 platform/shared/common/RhodesAppBase.h
rhodes-2.3.0.beta.1 platform/shared/common/RhodesAppBase.h