1/*******************************************************************
2* productmapping.h
3* Copyright 2009 Dario Andres Rodriguez <andresbajotierra@gmail.com>
4*
5* This program is free software; you can redistribute it and/or
6* modify it under the terms of the GNU General Public License as
7* published by the Free Software Foundation; either version 2 of
8* the License, or (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******************************************************************/
19
20#ifndef PRODUCTMAPPING__H
21#define PRODUCTMAPPING__H
22
23#include <QtCore/QObject>
24#include <QtCore/QString>
25#include <QtCore/QStringList>
26
27class Product;
28class BugzillaManager;
29class CrashedApplication;
30
31class ProductMapping: public QObject
32{
33Q_OBJECT
34public:
35 explicit ProductMapping(const CrashedApplication *, BugzillaManager *, QObject * parent = 0);
36
37 QString bugzillaProduct() const;
38 QString bugzillaComponent() const;
39 QString bugzillaVersion() const;
40 QStringList relatedBugzillaProducts() const;
41
42 bool bugzillaProductDisabled() const;
43 bool bugzillaVersionDisabled() const;
44
45private Q_SLOTS:
46 void checkProductInfo(const Product &);
47
48private:
49 void map(const QString&);
50 void mapUsingInternalFile(const QString&);
51 void getRelatedProductsUsingInternalFile(const QString&);
52
53 QStringList m_relatedBugzillaProducts;
54 QString m_bugzillaProduct;
55 QString m_bugzillaComponent;
56
57 QString m_bugzillaVersionString;
58
59 const CrashedApplication * m_crashedAppPtr;
60 BugzillaManager * m_bugzillaManagerPtr;
61
62 bool m_bugzillaProductDisabled;
63 bool m_bugzillaVersionDisabled;
64
65};
66
67#endif
68