OSStatus CSecondPage::StartBrowse() { OSStatus err; // // setup the DNS-SD browsing // err = DNSServiceBrowse( &m_pdlBrowser, 0, 0, kPDLServiceType, NULL, OnBrowse, this ); require_noerr( err, exit ); err = StartOperation( m_pdlBrowser ); require_noerr( err, exit ); err = DNSServiceBrowse( &m_lprBrowser, 0, 0, kLPRServiceType, NULL, OnBrowse, this ); require_noerr( err, exit ); err = StartOperation( m_lprBrowser ); require_noerr( err, exit ); err = DNSServiceBrowse( &m_ippBrowser, 0, 0, kIPPServiceType, NULL, OnBrowse, this ); require_noerr( err, exit ); err = StartOperation( m_ippBrowser ); require_noerr( err, exit ); exit: return err; }
void AClient::Receive(struct FPacketData Data) { if (Data.Type == FPacketType::END_OPERATION) { bOperationInProgress = false; } else if (Data.bIsError && Data.Type == FPacketType::START_OPERATION) { bOperationInProgress = false; StartOperation(); } }
OSStatus CSecondPage::StartResolve( Service * service ) { CPrinterSetupWizardSheet * psheet; OSStatus err = kNoErr; psheet = reinterpret_cast<CPrinterSetupWizardSheet*>(GetParent()); require_quiet( psheet, exit ); check( service->serviceRef == NULL ); // // clean out any queues that were collected during a previous // resolve // service->EmptyQueues(); // // now start the new resolve // err = DNSServiceResolve( &service->serviceRef, 0, 0, service->printer->name.c_str(), service->type.c_str(), service->domain.c_str(), (DNSServiceResolveReply) OnResolve, service ); require_noerr( err, exit ); err = StartOperation( service->serviceRef ); require_noerr( err, exit ); // // If we're not currently resolving, then disable the next button // and set the cursor to hourglass // if ( !service->printer->resolving ) { psheet->SetWizardButtons( PSWIZB_BACK ); psheet->m_active = psheet->m_wait; SetCursor(psheet->m_active); } service->printer->resolving++; exit: return err; }