1 /* 2 * This file is part of Licq, an instant messaging client for UNIX. 3 * Copyright (C) 2010 Licq developers 4 * 5 * Licq 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 2 of the License, or 8 * (at your option) any later version. 9 * 10 * Licq 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 Licq; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 */ 19 20 #ifndef LICQDAEMON_SARMANAGER_H 21 #define LICQDAEMON_SARMANAGER_H 22 23 #include <licq/sarmanager.h> 24 25 #include <licq/thread/mutex.h> 26 27 namespace LicqDaemon 28 { 29 30 class SarManager : public Licq::SarManager 31 { 32 public: 33 SarManager(); 34 ~SarManager(); 35 36 /** 37 * Initialize the auto response manager 38 */ 39 void initialize(); 40 41 // From Licq::SarManager 42 Licq::SarList& getList(List list); 43 void releaseList(bool save = false); 44 45 private: 46 /** 47 * Save configuration to file 48 */ 49 void writeConfig(); 50 51 static const char* const SectionNames[NumLists]; 52 static const int NumDefaults = 7; 53 static const char* const DefaultNames[NumLists][NumDefaults]; 54 static const char* const DefaultTexts[NumLists][NumDefaults]; 55 56 Licq::SarList mySarLists[NumLists]; 57 Licq::Mutex myMutex; 58 }; 59 60 extern SarManager gSarManager; 61 62 } // namespace LicqDaemon 63 64 #endif 65