void RegistrationDB::updateBinding(const RegistrationBinding& reg) { updateBinding(*(reg.getUri()), // must not be null *(reg.getContact() ? reg.getContact() : &nullString), *(reg.getQvalue() ? reg.getQvalue() : &nullString), *(reg.getCallId() ? reg.getCallId() : &nullString), reg.getCseq(), reg.getExpires(), *(reg.getInstanceId() ? reg.getInstanceId() : &nullString), *(reg.getGruu() ? reg.getGruu() : &nullString), *(reg.getPath() ? reg.getPath() : &nullString), *(reg.getPrimary() ? reg.getPrimary() : &nullString), reg.getUpdateNumber()); }
void RegistrationDB::insertRow(const UtlHashMap& nvPairs) { // For integer values, default to 0 if the datum is missing in the input. UtlString* expStr = (UtlString*) nvPairs.findValue(&gExpiresKey); UtlString* cseqStr = (UtlString*) nvPairs.findValue(&gCseqKey); // If the IMDB does not specify a Q-Value, "%" will be found here // (representing a null IMDB column). UtlString* qvalue = (UtlString*) nvPairs.findValue(&gQvalueKey); UtlString* updateNumberStr = (UtlString*) nvPairs.findValue(&gUpdateNumberKey); // Note that updateNumberStr is likely to start with 0x, so we // need the full functionality of strtoll here, not just a // decimal-to-binary conversion. But strtoll is in C99, so it // should be OK. Int64 updateNumber = updateNumberStr ? strtoll(updateNumberStr->data(), NULL, 0) : 0; // Get the remaining fields so that we can substitute the null string // if the fetched value is 0 (the null pointer) because the field // is not present in the disk file. UtlString* contact = (UtlString*) nvPairs.findValue(&gContactKey); UtlString* callId = (UtlString*) nvPairs.findValue(&gCallidKey); UtlString* instanceId = (UtlString*) nvPairs.findValue(&gInstanceIdKey); UtlString* gruu = (UtlString*) nvPairs.findValue(&gGruuKey); UtlString* path = (UtlString*) nvPairs.findValue(&gPathKey); UtlString* primary = (UtlString*) nvPairs.findValue(&gPrimaryKey); // Note: identity inferred from the uri updateBinding( Url(*((UtlString*)nvPairs.findValue(&gUriKey))), contact ? *contact : nullString, qvalue ? *qvalue : percent, callId ? *callId : nullString, cseqStr ? atoi(cseqStr->data()) : 0, expStr ? atoi(expStr->data()) : 0, instanceId ? *instanceId : nullString, gruu ? *gruu : nullString, path ? *path : nullString, primary ? *primary : nullString, updateNumber ); }
bool GameController::init() { initKeycodeMap(); if (!updateBinding()) return false; return true; }
void UniformBlock::setBinding(GLuint bindingIndex) { m_bindingIndex = bindingIndex; updateBinding(); }