* More header cleanup, continuing korli's work.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36206 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,61 +1,49 @@
|
||||
//----------------------------------------------------------------------
|
||||
// This software is part of the OpenBeOS distribution and is covered
|
||||
// by the OpenBeOS license.
|
||||
//---------------------------------------------------------------------
|
||||
/*!
|
||||
\file EntryList.h
|
||||
BEntryList interface declaration.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2001-2010, Haiku Inc.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _ENTRY_LIST_H
|
||||
#define _ENTRY_LIST_H
|
||||
|
||||
|
||||
#include <dirent.h>
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
#ifdef USE_OPENBEOS_NAMESPACE
|
||||
namespace OpenBeOS {
|
||||
#endif
|
||||
|
||||
// Forward declarations
|
||||
class BEntry;
|
||||
struct entry_ref;
|
||||
|
||||
//! Interface for iterating through a list of filesystem entries
|
||||
/*! Defines a general interface for iterating through a list of entries (i.e.
|
||||
|
||||
/*! Interface for iterating through a list of filesystem entries
|
||||
Defines a general interface for iterating through a list of entries (i.e.
|
||||
files in a folder
|
||||
|
||||
@author <a href='mailto:[email protected]'>Tyler Dauwalder</a>
|
||||
@author Be Inc.
|
||||
@version 0.0.0
|
||||
*/
|
||||
class BEntryList {
|
||||
public:
|
||||
BEntryList();
|
||||
virtual ~BEntryList();
|
||||
|
||||
virtual status_t GetNextEntry(BEntry *entry, bool traverse = false) = 0;
|
||||
virtual status_t GetNextRef(entry_ref *ref) = 0;
|
||||
virtual int32 GetNextDirents(struct dirent *buf, size_t length,
|
||||
int32 count = INT_MAX) = 0;
|
||||
virtual status_t Rewind() = 0;
|
||||
virtual int32 CountEntries() = 0;
|
||||
BEntryList();
|
||||
virtual ~BEntryList();
|
||||
|
||||
virtual status_t GetNextEntry(BEntry* entry,
|
||||
bool traverse = false) = 0;
|
||||
virtual status_t GetNextRef(entry_ref* ref) = 0;
|
||||
virtual int32 GetNextDirents(struct dirent* direntBuffer,
|
||||
size_t bufferSize,
|
||||
int32 maxEntries = INT_MAX) = 0;
|
||||
virtual status_t Rewind() = 0;
|
||||
virtual int32 CountEntries() = 0;
|
||||
|
||||
private:
|
||||
virtual void _ReservedEntryList1();
|
||||
virtual void _ReservedEntryList2();
|
||||
virtual void _ReservedEntryList3();
|
||||
virtual void _ReservedEntryList4();
|
||||
virtual void _ReservedEntryList5();
|
||||
virtual void _ReservedEntryList6();
|
||||
virtual void _ReservedEntryList7();
|
||||
virtual void _ReservedEntryList8();
|
||||
|
||||
virtual void _ReservedEntryList1();
|
||||
virtual void _ReservedEntryList2();
|
||||
virtual void _ReservedEntryList3();
|
||||
virtual void _ReservedEntryList4();
|
||||
virtual void _ReservedEntryList5();
|
||||
virtual void _ReservedEntryList6();
|
||||
virtual void _ReservedEntryList7();
|
||||
virtual void _ReservedEntryList8();
|
||||
};
|
||||
|
||||
#ifdef USE_OPENBEOS_NAMESPACE
|
||||
}; // namespace OpenBeOS
|
||||
#endif
|
||||
|
||||
#endif // _ENTRY_LIST_H
|
||||
|
||||
|
||||
@@ -1,88 +1,76 @@
|
||||
/*
|
||||
* Copyright 2002-2006, Haiku, Inc. All Rights Reserved.
|
||||
* Copyright 2002-2010, Haiku, Inc. All Rights Reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _NODE_INFO_H
|
||||
#define _NODE_INFO_H
|
||||
|
||||
#ifndef _BE_BUILD_H
|
||||
#include <BeBuild.h>
|
||||
#endif
|
||||
#include <SupportDefs.h>
|
||||
#include <Mime.h>
|
||||
#include <Message.h>
|
||||
#include <File.h>
|
||||
#include <Entry.h>
|
||||
|
||||
#ifdef USE_OPENBEOS_NAMESPACE
|
||||
namespace OpenBeOS {
|
||||
#endif // USE_OPENBEOS_NAMESPACE
|
||||
#include <BeBuild.h>
|
||||
#include <Entry.h>
|
||||
#include <File.h>
|
||||
#include <Message.h>
|
||||
#include <Mime.h>
|
||||
#include <SupportDefs.h>
|
||||
|
||||
|
||||
class BBitmap;
|
||||
class BResources;
|
||||
|
||||
|
||||
//! BNodeInfo provides file type information
|
||||
/*! BNodeInfo provides a nice wrapper to all sorts of usefull meta data.
|
||||
/*! \brief BNodeInfo provides file type information
|
||||
BNodeInfo provides a nice wrapper to all sorts of usefull meta data.
|
||||
Like it's mime type, the files icon and the application which will load
|
||||
the file.
|
||||
|
||||
\see <a href="http://www.opensource.org/licenses/mit-license.html">MIT</a>
|
||||
\author <a href='mailto:[email protected]'>Ingo Weinhold</a>
|
||||
\author <a href="mailto:[email protected]"> Michael Lloyd Lee </a>
|
||||
\author Be Inc
|
||||
\version 0
|
||||
*/
|
||||
*/
|
||||
class BNodeInfo {
|
||||
public:
|
||||
BNodeInfo();
|
||||
BNodeInfo(BNode* node);
|
||||
virtual ~BNodeInfo();
|
||||
|
||||
BNodeInfo();
|
||||
status_t SetTo(BNode* node);
|
||||
|
||||
BNodeInfo(BNode *node);
|
||||
virtual ~BNodeInfo();
|
||||
status_t InitCheck() const;
|
||||
|
||||
status_t SetTo(BNode *node);
|
||||
virtual status_t GetType(char* type) const;
|
||||
virtual status_t SetType(const char* type);
|
||||
virtual status_t GetIcon(BBitmap* icon,
|
||||
icon_size size = B_LARGE_ICON) const;
|
||||
virtual status_t SetIcon(const BBitmap* icon,
|
||||
icon_size size = B_LARGE_ICON);
|
||||
status_t GetIcon(uint8** data, size_t* size,
|
||||
type_code* type) const;
|
||||
status_t SetIcon(const uint8* data, size_t size);
|
||||
|
||||
status_t InitCheck() const;
|
||||
status_t GetPreferredApp(char* signature,
|
||||
app_verb verb = B_OPEN) const;
|
||||
status_t SetPreferredApp(const char* signature,
|
||||
app_verb verb = B_OPEN);
|
||||
status_t GetAppHint(entry_ref* ref) const;
|
||||
status_t SetAppHint(const entry_ref* ref);
|
||||
|
||||
virtual status_t GetType(char *type) const;
|
||||
virtual status_t SetType(const char *type);
|
||||
virtual status_t GetIcon(BBitmap *icon, icon_size k = B_LARGE_ICON) const;
|
||||
virtual status_t SetIcon(const BBitmap *icon, icon_size k = B_LARGE_ICON);
|
||||
status_t GetIcon(uint8** data, size_t* size, type_code* type) const;
|
||||
status_t SetIcon(const uint8* data, size_t size);
|
||||
|
||||
status_t GetPreferredApp(char *signature,
|
||||
app_verb verb = B_OPEN) const;
|
||||
status_t SetPreferredApp(const char *signature,
|
||||
app_verb verb = B_OPEN);
|
||||
status_t GetAppHint(entry_ref *ref) const;
|
||||
status_t SetAppHint(const entry_ref *ref);
|
||||
|
||||
status_t GetTrackerIcon(BBitmap *icon,
|
||||
icon_size k = B_LARGE_ICON) const;
|
||||
static status_t GetTrackerIcon(const entry_ref *ref,
|
||||
BBitmap *icon,
|
||||
icon_size k = B_LARGE_ICON);
|
||||
status_t GetTrackerIcon(BBitmap* icon,
|
||||
icon_size size = B_LARGE_ICON) const;
|
||||
static status_t GetTrackerIcon(const entry_ref* ref,
|
||||
BBitmap* icon,
|
||||
icon_size size = B_LARGE_ICON);
|
||||
private:
|
||||
friend class BAppFileInfo;
|
||||
friend class BAppFileInfo;
|
||||
|
||||
virtual void _ReservedNodeInfo1(); //< FBC
|
||||
virtual void _ReservedNodeInfo2(); //< FBC
|
||||
virtual void _ReservedNodeInfo3(); //< FBC
|
||||
virtual void _ReservedNodeInfo1();
|
||||
virtual void _ReservedNodeInfo2();
|
||||
virtual void _ReservedNodeInfo3();
|
||||
|
||||
BNodeInfo &operator=(const BNodeInfo &);
|
||||
BNodeInfo(const BNodeInfo &);
|
||||
BNodeInfo &operator=(const BNodeInfo& other);
|
||||
BNodeInfo(const BNodeInfo& other);
|
||||
// not implemented
|
||||
|
||||
BNode *fNode; //< The Node in question
|
||||
uint32 _reserved[2]; //< FBC
|
||||
status_t fCStatus; //< The status to return from InitCheck
|
||||
private:
|
||||
BNode* fNode;
|
||||
uint32 _reserved[2];
|
||||
status_t fCStatus;
|
||||
};
|
||||
|
||||
#ifdef USE_OPENBEOS_NAMESPACE
|
||||
}
|
||||
#endif // USE_OPENBEOS_NAMESPACE
|
||||
|
||||
#endif // _NODE_INFO_H
|
||||
|
||||
|
||||
|
||||
@@ -1,92 +1,86 @@
|
||||
//----------------------------------------------------------------------
|
||||
// This software is part of the OpenBeOS distribution and is covered
|
||||
// by the OpenBeOS license.
|
||||
//---------------------------------------------------------------------
|
||||
/*!
|
||||
\file ResourceStrings.h
|
||||
BResourceStrings interface declaration.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2001-2010, Haiku Inc.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _RESOURCE_STRINGS_H
|
||||
#define _RESOURCE_STRINGS_H
|
||||
|
||||
|
||||
#include <Entry.h>
|
||||
#include <Locker.h>
|
||||
|
||||
|
||||
class BResources;
|
||||
class BString;
|
||||
|
||||
/*!
|
||||
\class BResourceStrings
|
||||
\brief Simple class to access the string resources in a file.
|
||||
|
||||
/*! \brief Simple class to access the string resources in a file.
|
||||
|
||||
A BResourceStrings object reads the string type resources from a given
|
||||
resource file and provides fast read only access to them.
|
||||
|
||||
\author <a href='mailto:[email protected]'>Ingo Weinhold</a>
|
||||
|
||||
\version 0.0.0
|
||||
*/
|
||||
class BResourceStrings {
|
||||
public:
|
||||
BResourceStrings();
|
||||
BResourceStrings(const entry_ref &ref);
|
||||
virtual ~BResourceStrings();
|
||||
BResourceStrings();
|
||||
BResourceStrings(const entry_ref& ref);
|
||||
virtual ~BResourceStrings();
|
||||
|
||||
status_t InitCheck();
|
||||
virtual BString *NewString(int32 id);
|
||||
virtual const char *FindString(int32 id);
|
||||
status_t InitCheck();
|
||||
virtual BString* NewString(int32 id);
|
||||
virtual const char* FindString(int32 id);
|
||||
|
||||
virtual status_t SetStringFile(const entry_ref *ref);
|
||||
status_t GetStringFile(entry_ref *outRef);
|
||||
virtual status_t SetStringFile(const entry_ref* ref);
|
||||
status_t GetStringFile(entry_ref* outRef);
|
||||
|
||||
public:
|
||||
enum {
|
||||
RESOURCE_TYPE = 'CSTR'
|
||||
};
|
||||
enum {
|
||||
RESOURCE_TYPE = 'CSTR'
|
||||
};
|
||||
|
||||
protected:
|
||||
struct _string_id_hash {
|
||||
_string_id_hash();
|
||||
~_string_id_hash();
|
||||
void assign_string(const char *str, bool makeCopy);
|
||||
_string_id_hash *next;
|
||||
int32 id;
|
||||
char *data;
|
||||
bool data_alloced;
|
||||
bool _reserved1[3];
|
||||
uint32 _reserved2;
|
||||
};
|
||||
struct _string_id_hash {
|
||||
_string_id_hash();
|
||||
~_string_id_hash();
|
||||
|
||||
void assign_string(const char* str, bool makeCopy);
|
||||
|
||||
_string_id_hash* next;
|
||||
int32 id;
|
||||
char* data;
|
||||
bool data_alloced;
|
||||
bool _reserved1[3];
|
||||
uint32 _reserved2;
|
||||
};
|
||||
|
||||
private:
|
||||
void _Cleanup();
|
||||
void _MakeEmpty();
|
||||
status_t _Rehash(int32 newSize);
|
||||
_string_id_hash* _AddString(char* str, int32 id,
|
||||
bool wasMalloced);
|
||||
|
||||
virtual _string_id_hash* _FindString(int32 id);
|
||||
|
||||
virtual status_t _Reserved_ResourceStrings_0(void*);
|
||||
virtual status_t _Reserved_ResourceStrings_1(void*);
|
||||
virtual status_t _Reserved_ResourceStrings_2(void*);
|
||||
virtual status_t _Reserved_ResourceStrings_3(void*);
|
||||
virtual status_t _Reserved_ResourceStrings_4(void*);
|
||||
virtual status_t _Reserved_ResourceStrings_5(void*);
|
||||
|
||||
protected:
|
||||
BLocker _string_lock;
|
||||
status_t _init_error;
|
||||
BLocker _string_lock;
|
||||
status_t _init_error;
|
||||
|
||||
private:
|
||||
entry_ref fFileRef;
|
||||
BResources *fResources;
|
||||
_string_id_hash **fHashTable;
|
||||
int32 fHashTableSize;
|
||||
int32 fStringCount;
|
||||
uint32 _reserved[16]; // FBC
|
||||
|
||||
private:
|
||||
void _Cleanup();
|
||||
void _MakeEmpty();
|
||||
status_t _Rehash(int32 newSize);
|
||||
_string_id_hash *_AddString(char *str, int32 id, bool wasMalloced);
|
||||
|
||||
virtual _string_id_hash *_FindString(int32 id);
|
||||
|
||||
// FBC
|
||||
virtual status_t _Reserved_ResourceStrings_0(void *);
|
||||
virtual status_t _Reserved_ResourceStrings_1(void *);
|
||||
virtual status_t _Reserved_ResourceStrings_2(void *);
|
||||
virtual status_t _Reserved_ResourceStrings_3(void *);
|
||||
virtual status_t _Reserved_ResourceStrings_4(void *);
|
||||
virtual status_t _Reserved_ResourceStrings_5(void *);
|
||||
entry_ref fFileRef;
|
||||
BResources *fResources;
|
||||
_string_id_hash **fHashTable;
|
||||
int32 fHashTableSize;
|
||||
int32 fStringCount;
|
||||
uint32 _reserved[16]; // FBC
|
||||
};
|
||||
|
||||
|
||||
#endif // _RESOURCE_STRINGS_H
|
||||
|
||||
|
||||
|
||||
@@ -1,54 +1,44 @@
|
||||
// ----------------------------------------------------------------------
|
||||
// This software is part of the OpenBeOS distribution and is covered
|
||||
// by the OpenBeOS license.
|
||||
//
|
||||
// File Name: VolumeRoster.h
|
||||
//
|
||||
// Description: BVolumeRoster class
|
||||
// ----------------------------------------------------------------------
|
||||
/*!
|
||||
\file VolumeRoster.h
|
||||
BVolumeRoster interface declarations.
|
||||
*/
|
||||
/*
|
||||
* Copyright 2002-2010, Haiku, Inc. All Rights Reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _VOLUME_ROSTER_H
|
||||
#define _VOLUME_ROSTER_H
|
||||
|
||||
|
||||
#include <Application.h>
|
||||
#include <SupportDefs.h>
|
||||
#include <Volume.h>
|
||||
|
||||
#ifdef USE_OPENBEOS_NAMESPACE
|
||||
namespace OpenBeOS {
|
||||
#endif
|
||||
|
||||
class BVolume;
|
||||
class BMessenger;
|
||||
|
||||
|
||||
class BVolumeRoster {
|
||||
public:
|
||||
BVolumeRoster();
|
||||
virtual ~BVolumeRoster();
|
||||
BVolumeRoster();
|
||||
virtual ~BVolumeRoster();
|
||||
|
||||
status_t GetNextVolume(BVolume *volume);
|
||||
void Rewind();
|
||||
status_t GetNextVolume(BVolume* volume);
|
||||
void Rewind();
|
||||
|
||||
status_t GetBootVolume(BVolume *volume);
|
||||
status_t GetBootVolume(BVolume* volume);
|
||||
|
||||
status_t StartWatching(BMessenger messenger = be_app_messenger);
|
||||
void StopWatching();
|
||||
BMessenger Messenger() const;
|
||||
status_t StartWatching(
|
||||
BMessenger messenger = be_app_messenger);
|
||||
void StopWatching();
|
||||
BMessenger Messenger() const;
|
||||
|
||||
private:
|
||||
virtual void _SeveredVRoster1();
|
||||
virtual void _SeveredVRoster2();
|
||||
|
||||
int32 fCookie;
|
||||
BMessenger *fTarget;
|
||||
uint32 _reserved[3];
|
||||
virtual void _SeveredVRoster1();
|
||||
virtual void _SeveredVRoster2();
|
||||
|
||||
private:
|
||||
int32 fCookie;
|
||||
BMessenger* fTarget;
|
||||
uint32 _reserved[3];
|
||||
};
|
||||
|
||||
#ifdef USE_OPENBEOS_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _VOLUME_ROSTER_H
|
||||
|
||||
Reference in New Issue
Block a user