* added missing version_variety enumeration (this fixes the FileTypes build).
* cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16421 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,14 +1,11 @@
|
|||||||
//----------------------------------------------------------------------
|
/*
|
||||||
// This software is part of the OpenBeOS distribution and is covered
|
* Copyright 2002-2006, Haiku, Inc. All Rights Reserved.
|
||||||
// by the OpenBeOS license.
|
* Distributed under the terms of the MIT License.
|
||||||
//---------------------------------------------------------------------
|
*/
|
||||||
/*!
|
|
||||||
\file AppFileInfo.h
|
|
||||||
BAppFileInfo and related structures' interface declarations.
|
|
||||||
*/
|
|
||||||
#ifndef _APP_FILE_INFO_H
|
#ifndef _APP_FILE_INFO_H
|
||||||
#define _APP_FILE_INFO_H
|
#define _APP_FILE_INFO_H
|
||||||
|
|
||||||
|
|
||||||
#include <NodeInfo.h>
|
#include <NodeInfo.h>
|
||||||
|
|
||||||
class BBitmap;
|
class BBitmap;
|
||||||
@@ -16,7 +13,8 @@ class BFile;
|
|||||||
class BMessage;
|
class BMessage;
|
||||||
class BResources;
|
class BResources;
|
||||||
|
|
||||||
struct version_info {
|
|
||||||
|
struct version_info {
|
||||||
uint32 major;
|
uint32 major;
|
||||||
uint32 middle;
|
uint32 middle;
|
||||||
uint32 minor;
|
uint32 minor;
|
||||||
@@ -26,6 +24,15 @@ struct version_info {
|
|||||||
char long_info[256];
|
char long_info[256];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum info_variety {
|
||||||
|
B_DEVELOPMENT_VERSION = 0,
|
||||||
|
B_ALPHA_VERSION,
|
||||||
|
B_BETA_VERSION,
|
||||||
|
B_GAMMA_VERSION,
|
||||||
|
B_GOLDEN_MASTER_VERSION,
|
||||||
|
B_FINAL_VERSION
|
||||||
|
};
|
||||||
|
|
||||||
enum info_location {
|
enum info_location {
|
||||||
B_USE_ATTRIBUTES = 0x1,
|
B_USE_ATTRIBUTES = 0x1,
|
||||||
B_USE_RESOURCES = 0x2,
|
B_USE_RESOURCES = 0x2,
|
||||||
@@ -45,81 +52,64 @@ enum version_kind {
|
|||||||
\version 0.0.0
|
\version 0.0.0
|
||||||
*/
|
*/
|
||||||
class BAppFileInfo: public BNodeInfo {
|
class BAppFileInfo: public BNodeInfo {
|
||||||
public:
|
public:
|
||||||
BAppFileInfo();
|
BAppFileInfo();
|
||||||
BAppFileInfo(BFile *file);
|
BAppFileInfo(BFile *file);
|
||||||
virtual ~BAppFileInfo();
|
virtual ~BAppFileInfo();
|
||||||
|
|
||||||
status_t SetTo(BFile *file);
|
status_t SetTo(BFile *file);
|
||||||
|
|
||||||
virtual status_t GetType(char *type) const;
|
virtual status_t GetType(char *type) const;
|
||||||
virtual status_t SetType(const char *type);
|
virtual status_t SetType(const char *type);
|
||||||
|
|
||||||
status_t GetSignature(char *signature) const;
|
status_t GetSignature(char *signature) const;
|
||||||
status_t SetSignature(const char *signature);
|
status_t SetSignature(const char *signature);
|
||||||
|
|
||||||
status_t GetAppFlags(uint32 *flags) const;
|
status_t GetAppFlags(uint32 *flags) const;
|
||||||
status_t SetAppFlags(uint32 flags);
|
status_t SetAppFlags(uint32 flags);
|
||||||
|
|
||||||
status_t GetSupportedTypes(BMessage *types) const;
|
status_t GetSupportedTypes(BMessage *types) const;
|
||||||
status_t SetSupportedTypes(const BMessage *types, bool syncAll);
|
status_t SetSupportedTypes(const BMessage *types, bool syncAll);
|
||||||
status_t SetSupportedTypes(const BMessage *types);
|
status_t SetSupportedTypes(const BMessage *types);
|
||||||
bool IsSupportedType(const char *type) const;
|
bool IsSupportedType(const char *type) const;
|
||||||
bool Supports(BMimeType *type) const;
|
bool Supports(BMimeType *type) const;
|
||||||
|
|
||||||
virtual status_t GetIcon(BBitmap *icon, icon_size which) const;
|
virtual status_t GetIcon(BBitmap *icon, icon_size which) const;
|
||||||
virtual status_t SetIcon(const BBitmap *icon, icon_size which);
|
virtual status_t SetIcon(const BBitmap *icon, icon_size which);
|
||||||
|
|
||||||
status_t GetVersionInfo(version_info *info, version_kind kind) const;
|
status_t GetVersionInfo(version_info *info, version_kind kind) const;
|
||||||
status_t SetVersionInfo(const version_info *info, version_kind kind);
|
status_t SetVersionInfo(const version_info *info, version_kind kind);
|
||||||
|
|
||||||
status_t GetIconForType(const char *type, BBitmap *icon,
|
status_t GetIconForType(const char *type, BBitmap *icon,
|
||||||
icon_size which) const;
|
icon_size which) const;
|
||||||
status_t SetIconForType(const char *type, const BBitmap *icon,
|
status_t SetIconForType(const char *type, const BBitmap *icon,
|
||||||
icon_size which);
|
icon_size which);
|
||||||
|
|
||||||
void SetInfoLocation(info_location location);
|
void SetInfoLocation(info_location location);
|
||||||
bool IsUsingAttributes() const;
|
bool IsUsingAttributes() const;
|
||||||
bool IsUsingResources() const;
|
bool IsUsingResources() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// uncomment when needed
|
virtual void _ReservedAppFileInfo1();
|
||||||
// friend status_t _update_mime_info_(const char *, int32);
|
virtual void _ReservedAppFileInfo2();
|
||||||
// friend status_t _real_update_app_(BAppFileInfo *, const char *, bool);
|
virtual void _ReservedAppFileInfo3();
|
||||||
// friend status_t _query_for_app_(BMimeType *, const char *, entry_ref *,
|
|
||||||
// version_info *);
|
|
||||||
// friend class BRoster;
|
|
||||||
|
|
||||||
virtual void _ReservedAppFileInfo1();
|
BAppFileInfo &operator=(const BAppFileInfo &);
|
||||||
virtual void _ReservedAppFileInfo2();
|
BAppFileInfo(const BAppFileInfo &);
|
||||||
virtual void _ReservedAppFileInfo3();
|
|
||||||
|
|
||||||
// uncomment when needed
|
status_t GetMetaMime(BMimeType *meta) const;
|
||||||
// static status_t SetSupTypesForAll(BMimeType *, const BMessage *);
|
|
||||||
|
|
||||||
BAppFileInfo &operator=(const BAppFileInfo &);
|
status_t _ReadData(const char *name, int32 id, type_code type,
|
||||||
BAppFileInfo(const BAppFileInfo &);
|
void *buffer, size_t bufferSize,
|
||||||
|
size_t &bytesRead, void **allocatedBuffer = NULL) const;
|
||||||
|
status_t _WriteData(const char *name, int32 id, type_code type,
|
||||||
|
const void *buffer, size_t bufferSize,
|
||||||
|
bool findID = false);
|
||||||
|
status_t _RemoveData(const char *name, type_code type);
|
||||||
|
|
||||||
// uncomment when needed
|
BResources *fResources;
|
||||||
// status_t _SetSupportedTypes(const BMessage *types);
|
info_location fWhere;
|
||||||
// status_t UpdateFromRsrc();
|
uint32 _reserved[2];
|
||||||
// status_t RealUpdateRsrcToAttr();
|
|
||||||
// status_t UpdateMetaMime(const char *path, bool force,
|
|
||||||
// uint32 *changesMask) const;
|
|
||||||
// bool IsApp();
|
|
||||||
status_t GetMetaMime(BMimeType *meta) const;
|
|
||||||
|
|
||||||
status_t _ReadData(const char *name, int32 id, type_code type,
|
|
||||||
void *buffer, size_t bufferSize,
|
|
||||||
size_t &bytesRead, void **allocatedBuffer = NULL) const;
|
|
||||||
status_t _WriteData(const char *name, int32 id, type_code type,
|
|
||||||
const void *buffer, size_t bufferSize,
|
|
||||||
bool findID = false);
|
|
||||||
status_t _RemoveData(const char *name, type_code type);
|
|
||||||
|
|
||||||
BResources *fResources;
|
|
||||||
info_location fWhere;
|
|
||||||
uint32 _reserved[2];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _APP_FILE_INFO_H
|
#endif // _APP_FILE_INFO_H
|
||||||
|
|||||||
Reference in New Issue
Block a user