#ifndef LauncherWriter_hpp
#define LauncherWriter_hpp

#include <libgnome/gnome-desktop-item.h>

#include <TreeElements.hpp>

namespace apoc { namespace legacy { namespace plugins { namespace launchers {

    static const char* kPrefix = "SUNW";

    class LauncherWriter: public apoc::legacy::NodeVisitor
    { 
        public: 
            LauncherWriter(const std::string& aBaseDir) ; 
            virtual ~LauncherWriter(); 

            virtual bool preChildrenProcess(Node& aNode) ; 
            virtual bool postChildrenProcess(Node& aNode) ; 
        
        private: 
            std::string mBaseDir; 
            bool mIsLinkType; 
            bool mNoType; 
            GnomeDesktopItem *mDesktopItem; 
            std::string mFileName; 
            std::string mLauncherValue; 
            
            void saveLauncher();
    };    
} } } }; // apoc.legacy.plugins.launchers


#endif
