Yummy, more style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30856 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
a9cfff5fc2
commit
bd8ff8aa9f
@ -141,12 +141,12 @@ QuarantineTranslatorImage::Remove()
|
||||
|
||||
BTranslatorRoster::Private::Private()
|
||||
:
|
||||
BHandler("translator roster"), BLocker("translator list"),
|
||||
BHandler("translator roster"),
|
||||
BLocker("translator list"),
|
||||
fNextID(1),
|
||||
fLazyScanning(true),
|
||||
fSafeMode(false)
|
||||
{
|
||||
|
||||
char parameter[32];
|
||||
size_t parameterLength = sizeof(parameter);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Haiku, Inc. All Rights Reserved.
|
||||
* Copyright 2006-2009, Haiku, Inc. All Rights Reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Author:
|
||||
@ -8,6 +8,9 @@
|
||||
#ifndef TRANSLATOR_ROSTER_PRIVATE_H
|
||||
#define TRANSLATOR_ROSTER_PRIVATE_H
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
#include <Entry.h>
|
||||
#include <Handler.h>
|
||||
@ -15,9 +18,6 @@
|
||||
#include <Messenger.h>
|
||||
#include <TranslatorRoster.h>
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
struct translator_data;
|
||||
|
||||
@ -34,74 +34,88 @@ typedef std::vector<BMessenger> MessengerList;
|
||||
typedef std::vector<node_ref> NodeRefList;
|
||||
typedef std::set<entry_ref> EntryRefSet;
|
||||
|
||||
|
||||
class BTranslatorRoster::Private : public BHandler, public BLocker {
|
||||
public:
|
||||
Private();
|
||||
virtual ~Private();
|
||||
public:
|
||||
Private();
|
||||
virtual ~Private();
|
||||
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
|
||||
void AddDefaultPaths();
|
||||
status_t AddPaths(const char* paths);
|
||||
status_t AddPath(const char* path, int32* _added = NULL);
|
||||
status_t AddTranslator(BTranslator* translator, image_id image = -1,
|
||||
const entry_ref* ref = NULL, ino_t node = 0);
|
||||
void AddDefaultPaths();
|
||||
status_t AddPaths(const char* paths);
|
||||
status_t AddPath(const char* path, int32* _added = NULL);
|
||||
status_t AddTranslator(BTranslator* translator,
|
||||
image_id image = -1,
|
||||
const entry_ref* ref = NULL,
|
||||
ino_t node = 0);
|
||||
|
||||
void RemoveTranslators(entry_ref& ref);
|
||||
void RemoveTranslators(entry_ref& ref);
|
||||
|
||||
BTranslator* FindTranslator(translator_id id);
|
||||
BTranslator* FindTranslator(translator_id id);
|
||||
|
||||
status_t StoreTranslators(BMessage& archive);
|
||||
status_t Identify(BPositionIO* source, BMessage* ioExtension,
|
||||
uint32 hintType, const char* hintMIME, uint32 wantType,
|
||||
translator_info* _info);
|
||||
status_t StoreTranslators(BMessage& archive);
|
||||
status_t Identify(BPositionIO* source,
|
||||
BMessage* ioExtension, uint32 hintType,
|
||||
const char* hintMIME, uint32 wantType,
|
||||
translator_info* _info);
|
||||
|
||||
status_t GetTranslators(BPositionIO* source, BMessage* ioExtension,
|
||||
uint32 hintType, const char* hintMIME, uint32 wantType,
|
||||
translator_info** _info, int32* _numInfo);
|
||||
status_t GetAllTranslators(translator_id** _ids, int32* _count);
|
||||
status_t GetRefFor(translator_id id, entry_ref& ref);
|
||||
status_t GetTranslators(BPositionIO* source,
|
||||
BMessage* ioExtension, uint32 hintType,
|
||||
const char* hintMIME, uint32 wantType,
|
||||
translator_info** _info, int32* _numInfo);
|
||||
status_t GetAllTranslators(translator_id** _ids,
|
||||
int32* _count);
|
||||
status_t GetRefFor(translator_id id, entry_ref& ref);
|
||||
|
||||
bool IsActive() const { return Looper(); }
|
||||
bool IsActive() const { return Looper(); }
|
||||
|
||||
status_t CreateTranslators(const entry_ref& ref, int32& count,
|
||||
BMessage* update = NULL);
|
||||
status_t GetTranslatorData(image_id image, translator_data& data);
|
||||
status_t CreateTranslators(const entry_ref& ref,
|
||||
int32& count, BMessage* update = NULL);
|
||||
status_t GetTranslatorData(image_id image,
|
||||
translator_data& data);
|
||||
|
||||
status_t StartWatching(BMessenger target);
|
||||
status_t StopWatching(BMessenger target);
|
||||
status_t StartWatching(BMessenger target);
|
||||
status_t StopWatching(BMessenger target);
|
||||
|
||||
void TranslatorDeleted(translator_id id);
|
||||
void TranslatorDeleted(translator_id id);
|
||||
|
||||
private:
|
||||
static int _CompareSupport(const void* _a, const void* _b);
|
||||
private:
|
||||
static int _CompareSupport(const void* _a, const void* _b);
|
||||
|
||||
void _RescanChanged();
|
||||
void _RescanChanged();
|
||||
|
||||
const translation_format* _CheckHints(const translation_format* formats,
|
||||
int32 formatsCount, uint32 hintType, const char* hintMIME);
|
||||
const translation_format* _CheckHints(
|
||||
const translation_format* formats,
|
||||
int32 formatsCount, uint32 hintType,
|
||||
const char* hintMIME);
|
||||
|
||||
const translator_item* _FindTranslator(translator_id id) const;
|
||||
const translator_item* _FindTranslator(const char* name) const;
|
||||
const translator_item* _FindTranslator(entry_ref& ref) const;
|
||||
translator_item* _FindTranslator(node_ref& nodeRef);
|
||||
const translator_item* _FindTranslator(translator_id id) const;
|
||||
const translator_item* _FindTranslator(const char* name) const;
|
||||
const translator_item* _FindTranslator(entry_ref& ref) const;
|
||||
translator_item* _FindTranslator(node_ref& nodeRef);
|
||||
|
||||
int32 _CompareTranslatorDirectoryPriority(const entry_ref& a,
|
||||
const entry_ref& b) const;
|
||||
bool _IsKnownDirectory(const node_ref& nodeRef) const;
|
||||
int32 _CompareTranslatorDirectoryPriority(
|
||||
const entry_ref& a,
|
||||
const entry_ref& b) const;
|
||||
bool _IsKnownDirectory(const node_ref& nodeRef)
|
||||
const;
|
||||
|
||||
void _RemoveTranslators(const node_ref* nodeRef, const entry_ref* ref = NULL);
|
||||
void _EntryAdded(const node_ref& nodeRef, const char* name);
|
||||
void _EntryAdded(const entry_ref& ref);
|
||||
void _NotifyListeners(BMessage& update) const;
|
||||
void _RemoveTranslators(const node_ref* nodeRef,
|
||||
const entry_ref* ref = NULL);
|
||||
void _EntryAdded(const node_ref& nodeRef,
|
||||
const char* name);
|
||||
void _EntryAdded(const entry_ref& ref);
|
||||
void _NotifyListeners(BMessage& update) const;
|
||||
|
||||
NodeRefList fDirectories;
|
||||
TranslatorMap fTranslators;
|
||||
MessengerList fMessengers;
|
||||
EntryRefSet fRescanEntries;
|
||||
int32 fNextID;
|
||||
bool fLazyScanning;
|
||||
bool fSafeMode;
|
||||
NodeRefList fDirectories;
|
||||
TranslatorMap fTranslators;
|
||||
MessengerList fMessengers;
|
||||
EntryRefSet fRescanEntries;
|
||||
int32 fNextID;
|
||||
bool fLazyScanning;
|
||||
bool fSafeMode;
|
||||
};
|
||||
|
||||
|
||||
#endif // TRANSLATOR_ROSTER_PRIVATE_H
|
||||
|
Loading…
Reference in New Issue
Block a user