bool group_proccessor::uninitialize() { if (!intf) return false; #ifdef DVNCI_DEDUG intf->debugwarning("UNINIT GROUP appid=" + to_str(appid()) + " grouid=" + (selector ? to_str(selector->group()) : "nodef")); #endif if (!uninitialize_impl()) return false; DEBUG_STR_DVNCI(UNINITGROUP) return true; }
clientstruct::clientstruct(guidtype gid, appidtype app, acclevtype lev, const std::string& hst, const std::string& ip_, const std::string& usernm_, indx clid) { guid_ = static_cast<unum64> (gid); accesslevel(lev); appid(app); host(hst); user(clid); username(usernm_); ip(ip_); }
/* Initialise a Preferences object from the given pspec. This might be an * SCPreferences AppID or it might be the path to a plist file. */ Preferences::Preferences(const char * pspec) : m_pspec(pspec), m_plist(NULL), m_scpref(NULL) { /* Try to load this as a plist file first. The SCPreferences API does a * bunch of work if it can't find the file, and we should avoid that unless * we have a good idea that it's necessary. */ this->m_plist = load_plist_from_path(this->m_pspec.c_str()); if (this->m_plist) { /* Loading a plist should always give you back a dictionary. */ ASSERT(CFDictionaryGetTypeID() == CFGetTypeID(this->m_plist)); VERBOSE("loaded plist %s\n", pspec); return; } cf_typeref<CFStringRef> appname(cfstring_wrap(getprogname())); cf_typeref<CFStringRef> appid(cfstring_wrap(this->m_pspec.c_str())); this->m_scpref = SCPreferencesCreate(kCFAllocatorDefault, appname, appid); if (this->m_scpref == NULL) { return; } /* If there was no existing preferences file, SCError() should return * kSCStatusNoConfigFile. We are only interested in reading preferences, so * we want to fail if there's no existing config. */ if (SCError() != kSCStatusOK) { safe_release(this->m_scpref); } if (this->m_scpref) { VERBOSE("loaded SC preferences %s\n", pspec); } }