STDMETHODIMP CSpaceship::XMotion::QueryInterface( REFIID iid, LPVOID* ppvObj) { ITrace(iid, "CSpaceship::XMotion::QueryInterface"); METHOD_PROLOGUE(CSpaceship, Motion) return pThis->ExternalQueryInterface(&iid, ppvObj); }
void Init() { #ifndef REGAL_NO_GETENV const char *error = GetEnv("REGAL_LOG_ERROR"); const char *warning = GetEnv("REGAL_LOG_WARNING"); const char *info = GetEnv("REGAL_LOG_INFO"); const char *app = GetEnv("REGAL_LOG_APP"); const char *driver = GetEnv("REGAL_LOG_DRIVER"); const char *internal = GetEnv("REGAL_LOG_INTERNAL"); const char *http = GetEnv("REGAL_LOG_HTTP"); if (error) enableError = atoi(error)!=0; if (warning) enableWarning = atoi(warning)!=0; if (info) enableInfo = atoi(info)!=0; if (app) enableApp = atoi(app)!=0; if (driver) enableDriver = atoi(driver)!=0; if (internal) enableInternal = atoi(internal)!=0; if (http) enableHttp = atoi(http)!=0; const char *api = GetEnv("REGAL_LOG_API"); const char *all = GetEnv("REGAL_LOG_ALL"); if (api && atoi(api)) enableApp = enableDriver = true; if (all && atoi(all)) enableError = enableWarning = enableInfo = enableApp = enableDriver = enableInternal = enableHttp = true; const char *ml = GetEnv("REGAL_LOG_MAX_LINES"); if (ml) maxLines = atoi(ml); const char *bl = GetEnv("REGAL_HTTP_LOG_LIMIT"); if (bl) bufferLimit = atoi(bl); #endif #ifdef REGAL_HTTP_LOG_LIMIT bufferLimit = REGAL_HTTP_LOG_LIMIT; #endif // TODO - clean this up at shutdown... if (bufferLimit) buffer = new list<string>(); ITrace("Logging::Init"); #if REGAL_LOG_ERROR Info("REGAL_LOG_ERROR ", enableError ? "enabled" : "disabled"); #endif #if REGAL_LOG_WARNING Info("REGAL_LOG_WARNING ", enableWarning ? "enabled" : "disabled"); #endif #if REGAL_LOG_INFO Info("REGAL_LOG_INFO ", enableInfo ? "enabled" : "disabled"); #endif #if REGAL_LOG_APP Info("REGAL_LOG_APP ", enableApp ? "enabled" : "disabled"); #endif #if REGAL_LOG_DRIVER Info("REGAL_LOG_DRIVER ", enableDriver ? "enabled" : "disabled"); #endif #if REGAL_LOG_INTERNAL Info("REGAL_LOG_INTERNAL ", enableInternal ? "enabled" : "disabled"); #endif #if REGAL_LOG_HTTP Info("REGAL_LOG_HTTP ", enableHttp ? "enabled" : "disabled"); #endif }