Changeset 55523 in vbox for trunk/src/VBox/Main/src-all/EventImpl.cpp
- Timestamp:
- Apr 29, 2015 2:33:39 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 99882
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-all/EventImpl.cpp
r53160 r55523 228 228 229 229 typedef std::list<Utf8Str> VetoList; 230 typedef std::list<Utf8Str> ApprovalList; 230 231 struct VBoxVetoEvent::Data 231 232 { … … 236 237 BOOL mVetoed; 237 238 VetoList mVetoList; 239 ApprovalList mApprovalList; 238 240 }; 239 241 … … 272 274 m->mVetoed = FALSE; 273 275 m->mVetoList.clear(); 276 m->mApprovalList.clear(); 274 277 275 278 /* Confirm a successful initialization */ … … 350 353 return S_OK; 351 354 355 } 356 357 HRESULT VBoxVetoEvent::addApproval(const com::Utf8Str &aReason) 358 { 359 // AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 360 m->mApprovalList.push_back(aReason); 361 return S_OK; 362 } 363 364 HRESULT VBoxVetoEvent::isApproved(BOOL *aResult) 365 { 366 // AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 367 *aResult = !m->mApprovalList.empty(); 368 return S_OK; 369 } 370 371 HRESULT VBoxVetoEvent::getApprovals(std::vector<com::Utf8Str> &aResult) 372 { 373 // AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 374 aResult.resize(m->mApprovalList.size()); 375 size_t i = 0; 376 for (ApprovalList::const_iterator it = m->mApprovalList.begin(); it != m->mApprovalList.end(); ++it, ++i) 377 aResult[i] = (*it); 378 return S_OK; 352 379 } 353 380
Note:
See TracChangeset
for help on using the changeset viewer.