1c8a97620SStephan Aßmus /* 2*a30a4a41SJohn Scipione * Copyright 2002-2010 Haiku, Inc. All rights reserved. 3c8a97620SStephan Aßmus * Distributed under the terms of the MIT License. 452a38012Sejakowatz */ 582b75665STyler Dauwalder #ifndef _NODE_INFO_H 682b75665STyler Dauwalder #define _NODE_INFO_H 752a38012Sejakowatz 852a38012Sejakowatz 9f46308c9SAxel Dörfler #include <BeBuild.h> 10f46308c9SAxel Dörfler #include <Entry.h> 11f46308c9SAxel Dörfler #include <File.h> 12f46308c9SAxel Dörfler #include <Message.h> 13f46308c9SAxel Dörfler #include <Mime.h> 14f46308c9SAxel Dörfler #include <SupportDefs.h> 15f46308c9SAxel Dörfler 1652a38012Sejakowatz 1752a38012Sejakowatz class BBitmap; 1852a38012Sejakowatz class BResources; 1952a38012Sejakowatz 2052a38012Sejakowatz 2152a38012Sejakowatz class BNodeInfo { 2252a38012Sejakowatz public: 2352a38012Sejakowatz BNodeInfo(); 2452a38012Sejakowatz BNodeInfo(BNode* node); 2552a38012Sejakowatz virtual ~BNodeInfo(); 2652a38012Sejakowatz 2752a38012Sejakowatz status_t SetTo(BNode* node); 2852a38012Sejakowatz 2952a38012Sejakowatz status_t InitCheck() const; 3052a38012Sejakowatz 3152a38012Sejakowatz virtual status_t GetType(char* type) const; 3252a38012Sejakowatz virtual status_t SetType(const char* type); 33f46308c9SAxel Dörfler virtual status_t GetIcon(BBitmap* icon, 34*a30a4a41SJohn Scipione icon_size which = B_LARGE_ICON) const; 35f46308c9SAxel Dörfler virtual status_t SetIcon(const BBitmap* icon, 36*a30a4a41SJohn Scipione icon_size which = B_LARGE_ICON); 37f46308c9SAxel Dörfler status_t GetIcon(uint8** data, size_t* size, 38f46308c9SAxel Dörfler type_code* type) const; 39c8a97620SStephan Aßmus status_t SetIcon(const uint8* data, size_t size); 4052a38012Sejakowatz 4152a38012Sejakowatz status_t GetPreferredApp(char* signature, 4252a38012Sejakowatz app_verb verb = B_OPEN) const; 4352a38012Sejakowatz status_t SetPreferredApp(const char* signature, 4452a38012Sejakowatz app_verb verb = B_OPEN); 4552a38012Sejakowatz status_t GetAppHint(entry_ref* ref) const; 4652a38012Sejakowatz status_t SetAppHint(const entry_ref* ref); 4752a38012Sejakowatz 4852a38012Sejakowatz status_t GetTrackerIcon(BBitmap* icon, 49*a30a4a41SJohn Scipione icon_size which = B_LARGE_ICON) const; 5052a38012Sejakowatz static status_t GetTrackerIcon(const entry_ref* ref, 5152a38012Sejakowatz BBitmap* icon, 52*a30a4a41SJohn Scipione icon_size which = B_LARGE_ICON); 5352a38012Sejakowatz private: 5452a38012Sejakowatz friend class BAppFileInfo; 5552a38012Sejakowatz 56f46308c9SAxel Dörfler virtual void _ReservedNodeInfo1(); 57f46308c9SAxel Dörfler virtual void _ReservedNodeInfo2(); 58f46308c9SAxel Dörfler virtual void _ReservedNodeInfo3(); 5952a38012Sejakowatz 60f46308c9SAxel Dörfler BNodeInfo &operator=(const BNodeInfo& other); 61f46308c9SAxel Dörfler BNodeInfo(const BNodeInfo& other); 62f46308c9SAxel Dörfler // not implemented 6352a38012Sejakowatz 64f46308c9SAxel Dörfler private: 65f46308c9SAxel Dörfler BNode* fNode; 66f46308c9SAxel Dörfler uint32 _reserved[2]; 67f46308c9SAxel Dörfler status_t fCStatus; 6852a38012Sejakowatz }; 6952a38012Sejakowatz 7052a38012Sejakowatz 7182b75665STyler Dauwalder #endif // _NODE_INFO_H 72