/////////////////////////////////////////////////////////////////////////////// /// \brief /// Starts loading the resource package. /// void MgdResourcePackageLoader::Start(CREFSTRING packagePathname, bool logActivities) { MG_RESOURCE_SERVICE_TRY() // Initialize the status information. InitializeStatus(MgdPackageApiName::LoadPackage, packagePathname, logActivities); // Create the package reader. m_zipFileReader.reset(new MgdZipFileReader(packagePathname)); // Extract the resource package manifest and parse it. MgdOperationParameter opParam; opParam.SetValue(MgdResourcePackageManifestHandler::sm_manifestFileName); opParam.SetContentType(MgMimeType::Xml); string manifestXmlDoc; Ptr<MgByteReader> byteReader = CreateByteReader(opParam); byteReader->ToStringUtf8(manifestXmlDoc); m_manifestParser.Parse(manifestXmlDoc); // Performs all the operations specified in the resource package. const MgOpInfoVector& opInfoVector = m_manifestParser.GetOperations(); m_opsReceived = (INT32)opInfoVector.size(); for (m_opsSucceeded = 0; m_opsSucceeded < m_opsReceived; ++m_opsSucceeded) { PerformOperation(opInfoVector[m_opsSucceeded]); } MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgdResourcePackageLoader.Start") }
HRESULT VDISocket::Luge(std::string instanceName, std::string databaseName) { Listen(); PerformOperation(instanceName, databaseName); DestroyVirtualDevice(); return 0; }
bool Flash_ErasePage(uint32_t address) { PLIB_NVM_FlashAddressToModify(NVM_ID_0, KVA_TO_PA(address)); PerformOperation(PAGE_ERASE_OPERATION); while (!PLIB_NVM_FlashWriteCycleHasCompleted(NVM_ID_0)) { {} } return !PLIB_NVM_WriteOperationHasTerminated(NVM_ID_0); }
bool Flash_WriteWord(uint32_t address, uint32_t data) { PLIB_NVM_FlashAddressToModify(NVM_ID_0, KVA_TO_PA(address)); PLIB_NVM_FlashProvideData(NVM_ID_0, data); PerformOperation(WORD_PROGRAM_OPERATION); while (!PLIB_NVM_FlashWriteCycleHasCompleted(NVM_ID_0)) { {} } return !PLIB_NVM_WriteOperationHasTerminated(NVM_ID_0); }
// updates the current packet by performing token operations on it // tokens are guaranteed to be of the following format where // t = token and v = value: // tvtvtvtv void UpdateCurrentPacket() { wxString newPkt = currentPkt; std::list<PartialPacketToken>::iterator iter = tokens.begin(); for( ; iter != tokens.end(); ++iter ) { if( iter != tokens.end() ) { std::list<PartialPacketToken>::iterator oldIter = iter; PerformOperation( oldIter->type, *(++iter), newPkt ); } } currentPkt = newPkt.Mid(0, numNibbles); }
void main(int argc, char** argv) { int port = 0; if (argc < 2) { printf("Usage: %s port\n", argv[0]); exit(0); } port = atoi(argv[1]); if (port == 0) { printf("Usage: %s port\n", argv[0]); exit(0); } PerformOperation(port); }
/*--------------------------------------------------------------------------- * AddCustomerType * Add a customer type into QuickBooks. It creates the request XML, * sends to QuickBooks, and parses the response XML. It uses the base class * method PerformOperation(). * */ bool QBCustomerTypeAdd::AddCustomerType() { return PerformOperation(); }
/*--------------------------------------------------------------------------- * GetCustomerListFromQB * Get all customers from QuickBooks. It creates the request XML, * sends to QuickBooks, and parses the response XML. It uses the base class * method PerformOperation(). * */ bool QBCustomerQuery::GetCustomerListFromQB() { return PerformOperation(); }
bool wxPOP3::DownloadMessages(Listener* operation_listener) { return PerformOperation(DownloadMessagesOperation, operation_listener); }
bool wxPOP3::CheckConnection(Listener* operation_listener) { return PerformOperation(CheckConnectionOperation, operation_listener); }