~didrocks/unity/launcher-bug-fix-fest

« back to all changes in this revision

Viewing changes to src/FavoriteStoreGSettings.h

Import the work done so far with Compiz

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
* Copyright (C) 2010 Canonical Ltd
 
3
*
 
4
* This program is free software: you can redistribute it and/or modify
 
5
* it under the terms of the GNU General Public License version 3 as
 
6
* published by the Free Software Foundation.
 
7
*
 
8
* This program is distributed in the hope that it will be useful,
 
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
* GNU General Public License for more details.
 
12
*
 
13
* You should have received a copy of the GNU General Public License
 
14
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
*
 
16
* Authored by: Neil Jagdish Patel <neil.patel@canonical.com>
 
17
*/
 
18
 
 
19
#ifndef FAVORITE_STORE_GSETTINGS_H
 
20
#define FAVORITE_STORE_GSETTINGS_H
 
21
 
 
22
#include <gio/gio.h>
 
23
 
 
24
#include "FavoriteStore.h"
 
25
 
 
26
// An abstract object that facilitates getting and modifying the list of favorites
 
27
// Use GetDefault () to get the correct store for the session
 
28
 
 
29
class FavoriteStoreGSettings : public FavoriteStore
 
30
{
 
31
public:
 
32
 
 
33
  FavoriteStoreGSettings  ();
 
34
  ~FavoriteStoreGSettings ();
 
35
 
 
36
  //Methods
 
37
  virtual GSList * GetFavorites ();
 
38
  virtual void     AddFavorite    (const char *desktop_path, guint32 position);
 
39
  virtual void     RemoveFavorite (const char *desktop_path);
 
40
  virtual void     MoveFavorite   (const char *desktop_path, guint32 position);
 
41
 
 
42
private:
 
43
  void Refresh ();
 
44
 
 
45
  GSList    *m_favorites;
 
46
  GSettings *m_settings;
 
47
};
 
48
 
 
49
#endif // FAVORITE_STORE_GSETTINGS_H