31 : m_serviceDispatch(nullptr)
45 _log(SERVICE__CALL_TRACE,
"Call %s returned:", method.c_str());
46 res.ssResult->Dump(SERVICE__CALL_TRACE,
" ");
51 _log(SERVICE__CALL_ERROR,
"Call %s threw exception:", method.c_str());
65 if (!cur->first->IsString()) {
66 _log(SERVICE__ERROR,
"Non-string key in call named arguments. Skipping.");
67 cur->first->Dump(SERVICE__ERROR,
" ");
71 byname[ cur->first->AsString()->content() ] = cur->second;
85 _log(type,
" Call Arguments:");
88 _log(type,
" Named Arguments:");
90 _log(type,
" %s", cur.first.c_str());
91 cur.second->Dump(type,
" ");
99 : ssResult(result != nullptr ? result :
PyStatic.NewNone()),
100 ssNamedResult( nullptr )
103 : ssResult(result != nullptr ? result :
PyStatic.NewNone()),
104 ssNamedResult(namedResult)
CallDispatcher * m_serviceDispatch
#define _log(type, fmt,...)
std::map< std::string, PyRep * > byname
void Dump(FILE *into, const char *pfx) const
Dumps object to file.
#define is_log_enabled(type)
Base class for exceptions that can be converted to python objects.
PyResult & operator=(const PyResult &oth)
virtual PyResult Dispatch(const std::string &method_name, PyCallArgs &call)=0
PyCallArgs(Client *c, PyTuple *tup, PyDict *dict)
const_iterator begin() const
storage_type::const_iterator const_iterator
void Dump(LogType type) const
const_iterator end() const
virtual PyResult Call(const std::string &method, PyCallArgs &args)