1105109Smike//----------------------------------------------------------------------
21541Srgrimes//  This software is part of the Haiku distribution and is covered
31541Srgrimes//  by the MIT License.
41541Srgrimes//---------------------------------------------------------------------
51541Srgrimes/*!
61541Srgrimes	\file NodeInfo.h
71541Srgrimes	BNodeInfo interface declaration.
81541Srgrimes*/
91541Srgrimes
101541Srgrimes#ifndef _NODE_INFO_H
111541Srgrimes#define _NODE_INFO_H
121541Srgrimes
131541Srgrimes#ifndef _BE_BUILD_H
141541Srgrimes#include <BeBuild.h>
151541Srgrimes#endif
161541Srgrimes#include <SupportDefs.h>
171541Srgrimes#include <Mime.h>
181541Srgrimes#include <Message.h>
191541Srgrimes#include <File.h>
201541Srgrimes#include <Entry.h>
211541Srgrimes
221541Srgrimes#ifdef USE_OPENBEOS_NAMESPACE
231541Srgrimesnamespace OpenBeOS {
241541Srgrimes#endif // USE_OPENBEOS_NAMESPACE
251541Srgrimes
261541Srgrimesclass BBitmap;
271541Srgrimesclass BResources;
281541Srgrimes
291541Srgrimes
301541Srgrimes//!	BNodeInfo provides file type information
311541Srgrimes/*!	BNodeInfo provides a nice wrapper to all sorts of usefull meta data.
321541Srgrimes	Like it's mime type, the files icon and the application which will load
331541Srgrimes	the file.
3414486Shsu
3550477Speter	\see <a href="http://www.opensource.org/licenses/mit-license.html">MIT</a>
361541Srgrimes	\author <a href='mailto:bonefish@users.sf.net'>Ingo Weinhold</a>
371541Srgrimes	\author <a href="mailto:mrmlk@users.sf.net"> Michael Lloyd Lee </a>
38105109Smike	\author Be Inc
391541Srgrimes	\version 0
401541Srgrimes */
419343Sbdeclass BNodeInfo {
42107376Smikepublic:
4398301Swollman
449343Sbde	BNodeInfo();
45149337Sstefanf
46105109Smike	BNodeInfo(BNode *node);
47105109Smike	virtual ~BNodeInfo();
4851791Smarcel
4951942Smarcel	status_t SetTo(BNode *node);
5051791Smarcel
51105106Smike	status_t InitCheck() const;
5251942Smarcel
53105106Smike	virtual status_t GetType(char *type) const;
5451791Smarcel	virtual status_t SetType(const char *type);
55105106Smike	virtual status_t GetIcon(BBitmap *icon, icon_size k = B_LARGE_ICON) const;
5651791Smarcel	virtual status_t SetIcon(const BBitmap *icon, icon_size k = B_LARGE_ICON);
57105106Smike
5851791Smarcel	status_t GetPreferredApp(char *signature,
59105106Smike								app_verb verb = B_OPEN) const;
6051791Smarcel	status_t SetPreferredApp(const char *signature,
61105106Smike								app_verb verb = B_OPEN);
6251791Smarcel	status_t GetAppHint(entry_ref *ref) const;
63105106Smike	status_t SetAppHint(const entry_ref *ref);
6451791Smarcel
6551791Smarcel	status_t GetTrackerIcon(BBitmap *icon,
66105106Smike							icon_size k = B_LARGE_ICON) const;
6751791Smarcel	static status_t GetTrackerIcon(const entry_ref *ref,
68105106Smike									BBitmap *icon,
6951791Smarcel									icon_size k = B_LARGE_ICON);
70105106Smikeprivate:
71105106Smike	friend class BAppFileInfo;
7251791Smarcel
73105106Smike	virtual void _ReservedNodeInfo1(); //< FBC
7451791Smarcel	virtual void _ReservedNodeInfo2(); //< FBC
75105106Smike	virtual void _ReservedNodeInfo3(); //< FBC
7651791Smarcel
77105106Smike	BNodeInfo &operator=(const BNodeInfo &);
78105106Smike	BNodeInfo(const BNodeInfo &);
7951791Smarcel
8051791Smarcel	BNode *fNode; //< The Node in question
81105106Smike	uint32 _reserved[2]; //< FBC
8251791Smarcel	status_t fCStatus; //< The status to return from InitCheck
83105106Smike};
8451791Smarcel
85105106Smike#ifdef USE_OPENBEOS_NAMESPACE
86105106Smike}
8751791Smarcel#endif // USE_OPENBEOS_NAMESPACE
8851791Smarcel
8951791Smarcel#endif // _NODE_INFO_H
9051791Smarcel
9151791Smarcel
9251791Smarcel