/*
 *******************************************************************************
 * $RCSfile: MimePlugin.hpp,v $
 *
 * Description: 
 *
 * Last change: $Date: 2005/11/09 16:02:52 $ $Revision: 1.2 $
 *
 * Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use of this 
 * product is subject to license terms. 
 *
 *******************************************************************************
 */

#ifndef MimePlugin_hpp
#define MimePlugin_hpp

#include <NodePath.hpp>
#include <INodeListener.hpp>

namespace apoc { namespace legacy { namespace plugins { namespace mimeplugin {

    static const char *kMimePackagePath = "com.sun.apoc.LegacyData.GnomeMIMETypes";
    class MimePlugin: public INodeListener 
    {
    public:
	MimePlugin( int aNbArgs, const char **aArgs ) ;
	virtual ~MimePlugin();
	void execute( void ) ;
	virtual void onNodeAdded( const NodePath& aPath ) ;
	virtual void onNodeRemoved( const NodePath& aPath ) ;
	virtual void onNodeChanged( const NodePath& aPath ) ;
    private:
	void addListener(void) ;
	void removeListener(void) ;
	void onChange(void) ;
	void setupUserMimeDir(void) ;
	std::vector<std::string> mDirs ;
	std::string mUserMimeDir;
    };

}}}} // apoc.legacy.plugins.mimeplugin
#endif
