1338b8dc3SIngo Weinhold //---------------------------------------------------------------------- 2*2ca13760SColdfirex // This software is part of the Haiku distribution and is covered 3b6f76ebeSAugustin Cavalier // by the MIT License. 4338b8dc3SIngo Weinhold //--------------------------------------------------------------------- 5338b8dc3SIngo Weinhold /*! 6338b8dc3SIngo Weinhold \file NodeInfo.h 7338b8dc3SIngo Weinhold BNodeInfo interface declaration. 8338b8dc3SIngo Weinhold */ 9338b8dc3SIngo Weinhold 10338b8dc3SIngo Weinhold #ifndef _NODE_INFO_H 11338b8dc3SIngo Weinhold #define _NODE_INFO_H 12338b8dc3SIngo Weinhold 13338b8dc3SIngo Weinhold #ifndef _BE_BUILD_H 14338b8dc3SIngo Weinhold #include <BeBuild.h> 15338b8dc3SIngo Weinhold #endif 16338b8dc3SIngo Weinhold #include <SupportDefs.h> 17338b8dc3SIngo Weinhold #include <Mime.h> 18338b8dc3SIngo Weinhold #include <Message.h> 19338b8dc3SIngo Weinhold #include <File.h> 20338b8dc3SIngo Weinhold #include <Entry.h> 21338b8dc3SIngo Weinhold 22338b8dc3SIngo Weinhold #ifdef USE_OPENBEOS_NAMESPACE 23338b8dc3SIngo Weinhold namespace OpenBeOS { 24338b8dc3SIngo Weinhold #endif // USE_OPENBEOS_NAMESPACE 25338b8dc3SIngo Weinhold 26338b8dc3SIngo Weinhold class BBitmap; 27338b8dc3SIngo Weinhold class BResources; 28338b8dc3SIngo Weinhold 29338b8dc3SIngo Weinhold 30338b8dc3SIngo Weinhold //! BNodeInfo provides file type information 31338b8dc3SIngo Weinhold /*! BNodeInfo provides a nice wrapper to all sorts of usefull meta data. 32338b8dc3SIngo Weinhold Like it's mime type, the files icon and the application which will load 33338b8dc3SIngo Weinhold the file. 34338b8dc3SIngo Weinhold 35338b8dc3SIngo Weinhold \see <a href="http://www.opensource.org/licenses/mit-license.html">MIT</a> 36338b8dc3SIngo Weinhold \author <a href='mailto:bonefish@users.sf.net'>Ingo Weinhold</a> 37338b8dc3SIngo Weinhold \author <a href="mailto:mrmlk@users.sf.net"> Michael Lloyd Lee </a> 38338b8dc3SIngo Weinhold \author Be Inc 39338b8dc3SIngo Weinhold \version 0 40338b8dc3SIngo Weinhold */ 41338b8dc3SIngo Weinhold class BNodeInfo { 42338b8dc3SIngo Weinhold public: 43338b8dc3SIngo Weinhold 44338b8dc3SIngo Weinhold BNodeInfo(); 45338b8dc3SIngo Weinhold 46338b8dc3SIngo Weinhold BNodeInfo(BNode *node); 47338b8dc3SIngo Weinhold virtual ~BNodeInfo(); 48338b8dc3SIngo Weinhold 49338b8dc3SIngo Weinhold status_t SetTo(BNode *node); 50338b8dc3SIngo Weinhold 51338b8dc3SIngo Weinhold status_t InitCheck() const; 52338b8dc3SIngo Weinhold 53338b8dc3SIngo Weinhold virtual status_t GetType(char *type) const; 54338b8dc3SIngo Weinhold virtual status_t SetType(const char *type); 55338b8dc3SIngo Weinhold virtual status_t GetIcon(BBitmap *icon, icon_size k = B_LARGE_ICON) const; 56338b8dc3SIngo Weinhold virtual status_t SetIcon(const BBitmap *icon, icon_size k = B_LARGE_ICON); 57338b8dc3SIngo Weinhold 58338b8dc3SIngo Weinhold status_t GetPreferredApp(char *signature, 59338b8dc3SIngo Weinhold app_verb verb = B_OPEN) const; 60338b8dc3SIngo Weinhold status_t SetPreferredApp(const char *signature, 61338b8dc3SIngo Weinhold app_verb verb = B_OPEN); 62338b8dc3SIngo Weinhold status_t GetAppHint(entry_ref *ref) const; 63338b8dc3SIngo Weinhold status_t SetAppHint(const entry_ref *ref); 64338b8dc3SIngo Weinhold 65338b8dc3SIngo Weinhold status_t GetTrackerIcon(BBitmap *icon, 66338b8dc3SIngo Weinhold icon_size k = B_LARGE_ICON) const; 67338b8dc3SIngo Weinhold static status_t GetTrackerIcon(const entry_ref *ref, 68338b8dc3SIngo Weinhold BBitmap *icon, 69338b8dc3SIngo Weinhold icon_size k = B_LARGE_ICON); 70338b8dc3SIngo Weinhold private: 71338b8dc3SIngo Weinhold friend class BAppFileInfo; 72338b8dc3SIngo Weinhold 73338b8dc3SIngo Weinhold virtual void _ReservedNodeInfo1(); //< FBC 74338b8dc3SIngo Weinhold virtual void _ReservedNodeInfo2(); //< FBC 75338b8dc3SIngo Weinhold virtual void _ReservedNodeInfo3(); //< FBC 76338b8dc3SIngo Weinhold 77338b8dc3SIngo Weinhold BNodeInfo &operator=(const BNodeInfo &); 78338b8dc3SIngo Weinhold BNodeInfo(const BNodeInfo &); 79338b8dc3SIngo Weinhold 80338b8dc3SIngo Weinhold BNode *fNode; //< The Node in question 81338b8dc3SIngo Weinhold uint32 _reserved[2]; //< FBC 82338b8dc3SIngo Weinhold status_t fCStatus; //< The status to return from InitCheck 83338b8dc3SIngo Weinhold }; 84338b8dc3SIngo Weinhold 85338b8dc3SIngo Weinhold #ifdef USE_OPENBEOS_NAMESPACE 86338b8dc3SIngo Weinhold } 87338b8dc3SIngo Weinhold #endif // USE_OPENBEOS_NAMESPACE 88338b8dc3SIngo Weinhold 89338b8dc3SIngo Weinhold #endif // _NODE_INFO_H 90338b8dc3SIngo Weinhold 91338b8dc3SIngo Weinhold 92