Oops, I didn't see the translator tool. My binding/wrapper is hand-written. My scheme api.h and impl.cc files are separate from existing CEF files to avoid problems when the CEF source requires an update.
I tried to specify the parameter of the translator tool like this:
- Code: Select all
..\..\third_party\python_24\python.exe translator.py --cpp-header ..\libcef\scheme\cef_scheme.h --capi-header ..\libcef_dll\scheme\cef_scheme_api.h --cpptoc-dir ..\libcef_dll\cpptoc --ctocpp-dir ..\libcef_dll\ctocpp
It doesn't seemed to work, no bindings are generated, only the api is generated, but with no actual interface definitions of mine. It only contains the cef_base structure.
cef_scheme.h is as below:
- Code: Select all
#ifndef _CEF_SCHEME_H
#define _CEF_SCHEME_H
#include <string>
#include "include/cef.h"
#include "include/cef_ptr.h"
#include "include/cef_types.h"
class CefSchemeHandler;
bool CefRegisterScheme( const std::string& scheme_name,
const std::string& host_name,
CefRefPtr<CefSchemeHandler> handler);
class CefSchemeHandler : public CefBase
{
public:
virtual void Begin() = 0;
virtual void StorePostData(const int type, const std::wstring& file, const std::vector<char>& data) = 0;
virtual bool ProcessRequest(const std::string& url) = 0;
virtual void End() = 0;
virtual void Cancel() = 0;
virtual int GetLength() = 0;
virtual void* GetData() = 0;
virtual char* GetMimeType() = 0;
virtual bool Lock(bool bWrite) = 0;
virtual bool Unlock(bool bWrite) = 0;
};
#endif
p.s. this is changing as we speak.