libqutim  0.3.1.0
extensioninfo.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** qutIM - instant messenger
4 **
5 ** Copyright © 2011 Ruslan Nigmatullin <euroelessar@yandex.ru>
6 **
7 *****************************************************************************
8 **
9 ** $QUTIM_BEGIN_LICENSE$
10 ** This program is free software: you can redistribute it and/or modify
11 ** it under the terms of the GNU General Public License as published by
12 ** the Free Software Foundation, either version 3 of the License, or
13 ** (at your option) any later version.
14 **
15 ** This program is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 ** See the GNU General Public License for more details.
19 **
20 ** You should have received a copy of the GNU General Public License
21 ** along with this program. If not, see http://www.gnu.org/licenses/.
22 ** $QUTIM_END_LICENSE$
23 **
24 ****************************************************************************/
25 
26 #ifndef EXTENSIONINFO_H
27 #define EXTENSIONINFO_H
28 
29 #include "personinfo.h"
30 #include "extensionicon.h"
31 #include "objectgenerator.h"
32 #include <QMetaType>
33 #include <QtGui/QIcon>
34 
35 namespace qutim_sdk_0_3
36 {
37 class ExtensionInfoData;
38 
40 {
41 public:
43  const LocalizedString &description = LocalizedString(),
44  const ObjectGenerator *generator = 0, ExtensionIcon icon = ExtensionIcon());
45  ExtensionInfo(const ExtensionInfo &other);
46  ~ExtensionInfo();
47  ExtensionInfo &operator =(const ExtensionInfo &other);
48  ExtensionInfo &setName(const LocalizedString &name);
49  ExtensionInfo &setDescription(const LocalizedString &description);
50  ExtensionInfo &setIcon(const ExtensionIcon &icon);
51  ExtensionInfo &setGenerator(const ObjectGenerator *generator);
52  QList<PersonInfo> authors() const;
53  LocalizedString name() const;
54  LocalizedString description() const;
55  const ObjectGenerator *generator() const;
56  ExtensionIcon icon() const;
57 private:
58  QSharedDataPointer<ExtensionInfoData> d;
59 public:
60  typedef ExtensionInfoData Data;
61  Data *data() const;
62 };
63 
64 typedef QList<ExtensionInfo> ExtensionInfoList;
65 
67 
68 // TODO: Add possibility for getting ExtensionInfoList of avalaible modules
69 //
70 // LIBQUTIM_EXPORT ExtensionInfoList extensionList(const QMetaObject *module);
71 // LIBQUTIM_EXPORT ExtensionInfoList extensionList(const char *iid);
72 // template<typename T> inline ExtensionInfoList extensionList(const QObject *)
73 // { return moduleGenerators(&T::staticMetaObject); }
74 // template<typename T> inline ExtensionInfoList extensionList(const void *)
75 // { return moduleGenerators(qobject_interface_iid<T *>()); }
76 // template<typename T> inline ExtensionInfoList moduleGenerators()
77 // { return extensionList<T>(reinterpret_cast<T *>(0)); }
78 }
79 
81 
82 #endif // EXTENSIONINFO_H
83 

Generated by Doxygen