/* * Copyright (C) 2010 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Authored by: Neil Jagdish Patel */ #ifndef PLACE_FACTORY_FILE_H #define PLACE_FACTORY_FILE_H #include #include #include #include #include #include #include "PlaceFactory.h" class PlaceFactoryFile : public PlaceFactory { public: PlaceFactoryFile (const char *directory = NULL); ~PlaceFactoryFile (); std::vector& GetPlaces (); void ForceRefresh (); void AddProperties (GVariantBuilder *builder); /* Callbacks, not interesting to others */ void OnDirectoryEnumerationReady (GObject *source, GAsyncResult *result); public: /* For Debugging */ bool read_directory; private: char *_directory; GFile *_dir; }; #endif // PLACE_FACTORY_FILE_H