Lines Matching refs:translator

80 	The purpose of this class is to put a translator entry_ref into - and remove
84 This is used in Private::CreateTranslators() in case a translator hides a
85 previous one (ie. if you install a translator in the user's translators
128 BHandler("translator roster"),
129 BLocker("translator list"),
156 // subdirectories of the translator directories.
195 BTranslator* translator = iterator->second.translator;
198 translator->Release();
222 printf("translator roster node monitor: ");
281 // translator got removed
321 // A translator's refcount has been reduced to zero and it wants
473 BTranslatorRoster::Private::AddTranslator(BTranslator* translator,
479 item.translator = translator;
491 translator->fOwningRoster = this;
492 translator->fID = fNextID++;
508 debugger("translator must be locked!");
514 return item->translator;
524 // If this is a translator add-on, it is in the C format
569 // check if the known translator has a higher priority
575 // replace existing translator(s) if the new translator succeeds
596 // If the translator add-on supports the post R4.5
597 // translator creation mechanism, keep loading translators
599 BTranslator* translator = NULL;
601 for (int32 n = 0; (translator = makeNthTranslator(n, image, 0)) != NULL;
603 if (AddTranslator(translator, image, &ref, nodeRef.node) == B_OK) {
605 update->AddInt32("translator_id", translator->fID);
606 fImageOrigins.insert(std::make_pair(translator, image));
610 translator->Release();
611 // this will delete the translator
626 // If this is a translator add-on, it is in the C format
630 // add this translator to the list
631 BPrivate::BFuncTranslator* translator = NULL;
633 translator = new (std::nothrow) BPrivate::BFuncTranslator(
635 if (translator == NULL)
640 status = AddTranslator(translator, image, &ref, nodeRef.node);
644 update->AddInt32("translator_id", translator->fID);
666 // adopt changes to the translator any longer
733 BTranslator& translator = *iterator->second.translator;
740 const translation_format* formats = translator.InputFormats(
747 if (translator.Identify(source, format, &extension, &info, wantType)
755 info.translator = iterator->first;
788 BTranslator& translator = *iterator->second.translator;
797 const translation_format* formats = translator.InputFormats(
803 if (translator.Identify(source, format, ioExtension, &info, wantType)
805 info.translator = iterator->first;
909 In lazy mode, freshly installed translator are not scanned immediately
932 the formats the translator exports.
1033 to be added has the highest priority; if a translator with the same name
1100 item.translator->Release();
1169 BTranslatorReleaseDelegate::BTranslatorReleaseDelegate(BTranslator* translator)
1171 fUnderlying(translator)
1180 // ReleaseDelegate is only allowed to release a translator once.
1262 // Just wait for the default translator to be instantiated
1315 \param translator the translator to be added to the
1318 \return B_BAD_VALUE, if translator is NULL,
1322 BTranslatorRoster::AddTranslator(BTranslator* translator)
1324 if (!translator)
1327 return fPrivate->AddTranslator(translator);
1348 // If this is a translator add-on, it is in the C format
1359 This function determines which translator is best suited
1363 \param ioExtension the configuration data for the translator
1364 \param _info the information about the chosen translator is put here
1372 B_NO_TRANSLATOR, no appropriate translator found,
1396 \param ioExtension the configuration data for the translator
1408 B_NO_TRANSLATOR, no translator could handle \a source
1443 Returns information about the translator with the specified
1444 translator \a id.
1447 \param id identifies which translator you want info for
1448 \param _name the translator name is put here
1449 \param _info the translator description is put here
1454 B_NO_TRANSLATOR, \id didn't identify an existing translator
1465 BTranslator* translator = fPrivate->FindTranslator(id);
1466 if (translator == NULL)
1470 *_name = translator->TranslatorName();
1472 *_info = translator->TranslatorInfo();
1474 *_version = translator->TranslatorVersion();
1481 Returns all of the input formats for the translator specified
1485 \param id identifies which translator you want the input formats for
1491 B_NO_TRANSLATOR, \id didn't identify an existing translator
1502 BTranslator* translator = fPrivate->FindTranslator(id);
1503 if (translator == NULL)
1506 *_formats = translator->InputFormats(_numFormats);
1512 Returns all of the output formats for the translator specified
1516 \param id identifies which translator you want the output formats for
1522 B_NO_TRANSLATOR, \id didn't identify an existing translator
1533 BTranslator* translator = fPrivate->FindTranslator(id);
1534 if (translator == NULL)
1537 *_formats = translator->OutputFormats(_numFormats);
1548 \param ioExtension the configuration data for the translator
1549 \param info information about translator to use (can be NULL, in which
1559 B_NO_TRANSLATOR, no appropriate translator found,
1573 // look for a suitable translator
1585 BTranslator* translator = fPrivate->FindTranslator(info->translator);
1586 if (translator != NULL) {
1587 translator->Acquire();
1588 // make sure this translator is not removed while we're playing with
1594 if (translator == NULL)
1602 status = translator->Translate(source, info, ioExtension, wantOutType,
1605 translator->Release();
1614 using the format \a wantOutType and the translator identified
1617 \param id the translator to be used
1619 \param ioExtension the configuration data for the translator
1624 B_NO_TRANSLATOR, no appropriate translator found,
1637 BTranslator* translator = fPrivate->FindTranslator(id);
1638 if (translator != NULL) {
1639 translator->Acquire();
1640 // make sure this translator is not removed while we're playing with
1646 if (translator == NULL)
1653 status = translator->Identify(source, NULL, ioExtension, &info,
1660 status = translator->Translate(source, &info, ioExtension,
1666 translator->Release();
1673 Creates a BView in \a _view for configuring the translator specified
1676 \param id identifies which translator you want the input formats for
1677 \param ioExtension the configuration data for the translator
1678 \param _view the view for configuring the translator
1683 B_NO_TRANSLATOR, \id didn't identify an existing translator
1694 BTranslator* translator = fPrivate->FindTranslator(id);
1695 if (translator == NULL)
1698 return translator->MakeConfigurationView(ioExtension, _view, _extent);
1707 BTranslator* translator = fPrivate->FindTranslator(id);
1708 if (translator == NULL)
1711 translator->Acquire();
1712 return new BTranslatorReleaseDelegate(translator);
1717 Gets the configuration setttings for the translator
1720 \param id identifies which translator you want the input formats for
1721 \param ioExtension the configuration data for the translator
1725 B_NO_TRANSLATOR, \id didn't identify an existing translator
1736 BTranslator* translator = fPrivate->FindTranslator(id);
1737 if (translator == NULL)
1740 return translator->GetConfigurationMessage(ioExtension);
1745 Gets the entry_ref for the given translator (of course, this works only
1748 \param id identifies which translator you want the input formats for
1752 B_ERROR, if this is not a disk based translator
1754 B_NO_TRANSLATOR, \id didn't identify an existing translator