/* * 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_H #define PLACE_FACTORY_H #include #include #include #include #include "Place.h" class PlaceFactory : public sigc::trackable { public: static PlaceFactory * GetDefault (); // For testing static void SetDefault (PlaceFactory *factory); // This could be empty, if the loading of places is async, so you // should be listening to the signals too virtual std::vector& GetPlaces () = 0; // If the implementation supports it, you'll get a refreshed list of // Indicators (probably though a bunch of removed/added events) virtual void ForceRefresh () = 0; // For adding factory-specific properties virtual void AddProperties (GVariantBuilder *builder) = 0; // Signals sigc::signal place_added; sigc::signal place_removed; protected: std::vector _places; }; #endif // PLACE_FACTORY_H