BOOL LLParcel::allowModifyBy(const LLUUID &agent_id, const LLUUID &group_id) const { if (agent_id == LLUUID::null) { // system always can enter return TRUE; } else if (isPublic()) { return TRUE; } else if (agent_id == mOwnerID) { // owner can always perform operations return TRUE; } else if (mParcelFlags & PF_CREATE_OBJECTS) { return TRUE; } else if ((mParcelFlags & PF_CREATE_GROUP_OBJECTS) && group_id.notNull() ) { return (getGroupID() == group_id); } return FALSE; }
// Get whether entity is in group bool GroupManager::isInGroup(const EntityInfo& e, std::string group) { // Get group ID int groupID = getGroupID(group); return e._groupMask[groupID]; }
// Get entities by group const std::vector<Entity>& GroupManager::getEntitiesByGroup(std::string group) { // Get group ID int groupID = getGroupID(group); return _entitiesByGroup[groupID]; }
// Assumes we are in a block "ParcelData" void LLParcel::packMessage(LLSD& msg) { msg["local_id"] = getLocalID(); msg["parcel_flags"] = ll_sd_from_U32(getParcelFlags()); msg["sale_price"] = getSalePrice(); msg["name"] = getName(); msg["description"] = getDesc(); msg["music_url"] = getMusicURL(); msg["media_url"] = getMediaURL(); msg["media_desc"] = getMediaDesc(); msg["media_type"] = getMediaType(); msg["media_width"] = getMediaWidth(); msg["media_height"] = getMediaHeight(); msg["auto_scale"] = getMediaAutoScale(); msg["media_loop"] = getMediaLoop(); msg["obscure_media"] = getObscureMedia(); msg["obscure_music"] = getObscureMusic(); msg["media_id"] = getMediaID(); msg["group_id"] = getGroupID(); msg["pass_price"] = mPassPrice; msg["pass_hours"] = mPassHours; msg["category"] = (U8)mCategory; msg["auth_buyer_id"] = mAuthBuyerID; msg["snapshot_id"] = mSnapshotID; msg["snapshot_id"] = mSnapshotID; msg["user_location"] = ll_sd_from_vector3(mUserLocation); msg["user_look_at"] = ll_sd_from_vector3(mUserLookAt); msg["landing_type"] = (U8)mLandingType; }
void GroupCommand::init(float globalOrder) { _globalOrder = globalOrder; auto manager = Director::getInstance()->getRenderer()->getGroupCommandManager(); manager->releaseGroupID(_renderQueueID); _renderQueueID = manager->getGroupID(); }
void LLPanelGroupExperiences::activate() { if (getGroupID() == LLUUID::null) { return; } // search for experiences owned by the current group std::string url = gAgent.getRegion()->getCapability("GroupExperiences"); if (!url.empty()) { url += "?" + getGroupID().asString(); LLHTTPClient::get(url, new LLGroupExperienceResponder(getDerivedHandle<LLPanelGroupExperiences>())); } }
// writes the shape data to XML. xml's cursor is already pushed into the right <shape> tag. // return success state bool basicShape::saveToXML(ofxXmlSettings &xml){ // create position tag xml.addTag("position"); xml.pushTag("position"); xml.addValue("X", getPositionUnaltered()->x); xml.addValue("Y", getPositionUnaltered()->y); xml.popTag(); xml.addValue("shapeType", getShapeType() ); xml.addValue("groupID", getGroupID() ); xml.addValue("shapeName", shapeName ); return true; }
FhgfsOpsErr LookupIntentMsgEx::create(EntryInfo* parentInfo, std::string& entryName, EntryInfo *outEntryInfo, FileInodeStoreData* outInodeData) { const int umask = isMsgHeaderFeatureFlagSet(LOOKUPINTENTMSG_FLAG_UMASK) ? getUmask() : 0000; MkFileDetails mkDetails(entryName, getUserID(), getGroupID(), getMode(), umask ); UInt16List preferredTargets; parsePreferredTargets(&preferredTargets); return MsgHelperMkFile::mkFile(parentInfo, &mkDetails, &preferredTargets, 0, 0, outEntryInfo, outInodeData); }
bool LCDbWorkEntry::createRecord( LQuery cQuery, const String & reason ) { cQuery.setSQL( "Insert into c_buddy_worklist" " (machine_cid, barcode, test_cid, group_id, category_id, sample_id, range_set," " min_value, max_value, project_cid, profile_id, profile_name, buddy_read," " time_stamp, in_date, trigger_id, lower_trigger_limit, upper_trigger_limit," " buddy_result_id, private_result, status, diluent)" " values ( :mid, :bar, :tid, :grp, :cat, :sid, :rs, :mnv, :mxv, :proj, :pfid," " :pnm, 'N', 'now', :ind, :trid, :ltl, :utl, :rid, :prv, 'Q', :dil)" ); cQuery.setParam( "bar", getBarcode() ); cQuery.setParam( "grp", getGroupID() ); cQuery.setParam( "cat", getCategoryID() ); cQuery.setParam( "pfid", getProfileID() ); cQuery.setParam( "pnm", reason ); cQuery.setParam( "dil", diluent ); cQuery.setParam( "ind", getInDate() ); cQuery.setParam( "rid", getResultID() ); std::pair< int, int > specimen = getSpecimen(); cQuery.setParam( "proj", specimen.first ); cQuery.setParam( "sid", specimen.second ); cQuery.setParam( "tid", limits.getID() ); cQuery.setParam( "mid", limits.getAnalyserID() ); std::pair< double, double > range = limits.getRange().asDoubles(); if( range.first == 0 && range.second == 0 ) cQuery.setParam( "rs", 'N' ); else cQuery.setParam( "rs", 'Y' ); cQuery.setParam( "mnv", range.first ); cQuery.setParam( "mxv", range.second ); range = limits.getTriggerLimits().asDoubles(); cQuery.setParam( "trid", limits.getTriggerProfile() ); cQuery.setParam( "ltl", range.first ); cQuery.setParam( "utl", range.second ); cQuery.setParam( "prv", limits.isPrivate() ? 'Y' : 'N' ); return cQuery.execSQL() == 1; // don't add to cache - Marty's RFPs add record_no and ts_sequence }
// Assumes we are in a block "ParcelData" void LLParcel::packMessage(LLMessageSystem* msg) { msg->addU32Fast( _PREHASH_ParcelFlags, getParcelFlags() ); msg->addS32Fast( _PREHASH_SalePrice, getSalePrice() ); msg->addStringFast( _PREHASH_Name, getName() ); msg->addStringFast( _PREHASH_Desc, getDesc() ); msg->addStringFast( _PREHASH_MusicURL, getMusicURL() ); msg->addStringFast( _PREHASH_MediaURL, getMediaURL() ); msg->addU8 ( "MediaAutoScale", getMediaAutoScale () ); msg->addUUIDFast( _PREHASH_MediaID, getMediaID() ); msg->addUUIDFast( _PREHASH_GroupID, getGroupID() ); msg->addS32Fast( _PREHASH_PassPrice, mPassPrice ); msg->addF32Fast( _PREHASH_PassHours, mPassHours ); msg->addU8Fast( _PREHASH_Category, (U8)mCategory); msg->addUUIDFast( _PREHASH_AuthBuyerID, mAuthBuyerID); msg->addUUIDFast( _PREHASH_SnapshotID, mSnapshotID); msg->addVector3Fast(_PREHASH_UserLocation, mUserLocation); msg->addVector3Fast(_PREHASH_UserLookAt, mUserLookAt); msg->addU8Fast( _PREHASH_LandingType, (U8)mLandingType); }
// Remove entity from group void GroupManager::removeGroup(EntityInfo& e, std::string group) { // Get group ID int groupID = getGroupID(group); // Get group bitmask BitMask groupMask; groupMask.setBit(groupID); // If entity is in group if (!(e._groupMask & groupMask).isZero()) { // Get group std::vector<Entity>& group = _entitiesByGroup[groupID]; // Remove entity removeFirst<Entity>(group, e); // Update group bitmask e._groupMask.clearBit(groupID); } }
// Add entity to group void GroupManager::addGroup(EntityInfo& e, std::string group) { // Get group ID int groupID = getGroupID(group); // Get group bitmask BitMask groupMask; groupMask.setBit(groupID); // If entity not already in group if ((e._groupMask & groupMask).isZero()) { // Get group std::vector<Entity>& group = _entitiesByGroup[groupID]; // Add entity group.push_back((Entity)e); // Update group bitmask e._groupMask.setBit(groupID); } }
// Assumes we are in a block "ParcelData" void LLParcel::packMessage(LLSD& msg) { // used in the viewer, the sim uses it's own packer msg["local_id"] = getLocalID(); msg["parcel_flags"] = ll_sd_from_U32(getParcelFlags()); msg["sale_price"] = getSalePrice(); msg["name"] = getName(); msg["description"] = getDesc(); msg["music_url"] = getMusicURL(); msg["media_url"] = getMediaURL(); msg["media_desc"] = getMediaDesc(); msg["media_type"] = getMediaType(); msg["media_width"] = getMediaWidth(); msg["media_height"] = getMediaHeight(); msg["auto_scale"] = getMediaAutoScale(); msg["media_loop"] = getMediaLoop(); msg["media_current_url"] = getMediaCurrentURL(); msg["obscure_media"] = false; // OBSOLETE - no longer used msg["obscure_music"] = false; // OBSOLETE - no longer used msg["media_id"] = getMediaID(); msg["media_allow_navigate"] = getMediaAllowNavigate(); msg["media_prevent_camera_zoom"] = getMediaPreventCameraZoom(); msg["media_url_timeout"] = getMediaURLTimeout(); msg["media_url_filter_enable"] = getMediaURLFilterEnable(); msg["media_url_filter_list"] = getMediaURLFilterList(); msg["group_id"] = getGroupID(); msg["pass_price"] = mPassPrice; msg["pass_hours"] = mPassHours; msg["category"] = (U8)mCategory; msg["auth_buyer_id"] = mAuthBuyerID; msg["snapshot_id"] = mSnapshotID; msg["user_location"] = ll_sd_from_vector3(mUserLocation); msg["user_look_at"] = ll_sd_from_vector3(mUserLookAt); msg["landing_type"] = (U8)mLandingType; msg["see_avs"] = (LLSD::Boolean) getSeeAVs(); msg["group_av_sounds"] = (LLSD::Boolean) getAllowGroupAVSounds(); msg["any_av_sounds"] = (LLSD::Boolean) getAllowAnyAVSounds(); }