source: SMSSender/src/persistence/dagroupmanager.cpp @ 236:4ae05876cecb

Last change on this file since 236:4ae05876cecb was 236:4ae05876cecb, checked in by Sämy Zehnder <saemy.zehnder@…>, 8 years ago
  • Added missing visibility macros in some class definitions.
  • Subclassing some interfaces from QObject since they had only inline functions and therefore were not made visible in the shared library by g++ on windows (why?!).
  • Using de_DE instead of de_CH if no locale is defined yet.
File size: 1.5 KB
Line 
1/*
2 smssender - A frontend for fast and easy SMS sending over different gateways.
3 Copyright (C) 2007-2012, gorrión. See http://smssender.gorrion.ch
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 */
18#include "dagroupmanager.h"
19
20#include <istorage.h>
21#include <sgroup.h>
22
23#include "persistencefactory.h"
24
25S_SINGLETON_IMPL(DAGroupManager)
26
27DAGroupManager::DAGroupManager()
28    : IGroupStorageManager(NULL) // singleton
29{
30}
31
32SGroup DAGroupManager::getGroup(int groupId){
33    return storage()->readGroup(groupId);
34}
35
36QSet<SGroup> DAGroupManager::getGroupList(){
37    return storage()->readGroupList();
38}
39
40
41void DAGroupManager::saveGroup(SGroup& group){
42    storage()->writeGroup(group);
43}
44
45void DAGroupManager::removeGroup(const SGroup& group){
46    removeGroup(group.id());
47}
48
49void DAGroupManager::removeGroup(int groupId){
50    storage()->removeGroup(groupId);
51}
52
53
54IStorage* DAGroupManager::storage(){
55    return PersistenceFactory::instance()->storage();
56}
Note: See TracBrowser for help on using the repository browser.