~ubuntu-branches/ubuntu/trusty/jreen/trusty

« back to all changes in this revision

Viewing changes to src/parser_p.h

  • Committer: Package Import Robot
  • Author(s): Prasad Murthy
  • Date: 2013-03-08 00:00:33 UTC
  • Revision ID: package-import@ubuntu.com-20130308000033-x8thp6syo1kkh63s
Tags: upstream-1.1.1
Import upstream version 1.1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/****************************************************************************
 
2
**
 
3
** Jreen
 
4
**
 
5
** Copyright © 2003 Justin Karneges <justin@affinix.com>
 
6
** Copyright © 2011 Ruslan Nigmatullin <euroelessar@yandex.ru>
 
7
**
 
8
*****************************************************************************
 
9
**
 
10
** $JREEN_BEGIN_LICENSE$
 
11
** This program is free software: you can redistribute it and/or modify
 
12
** it under the terms of the GNU General Public License as published by
 
13
** the Free Software Foundation, either version 2 of the License, or
 
14
** (at your option) any later version.
 
15
**
 
16
** This program is distributed in the hope that it will be useful,
 
17
** but WITHOUT ANY WARRANTY; without even the implied warranty of
 
18
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
19
** See the GNU General Public License for more details.
 
20
**
 
21
** You should have received a copy of the GNU General Public License
 
22
** along with this program.  If not, see http://www.gnu.org/licenses/.
 
23
** $JREEN_END_LICENSE$
 
24
**
 
25
****************************************************************************/
 
26
 
 
27
#ifndef PARSER_P_H
 
28
#define PARSER_P_H
 
29
 
 
30
#include "jreen.h"
 
31
#include "parser.h"
 
32
#include "streamfeature_p.h"
 
33
#include "stanzaextension.h"
 
34
#include "stanza.h"
 
35
#include "stanzafactory_p.h"
 
36
#include "client_p.h"
 
37
#include <QStack>
 
38
 
 
39
// #define PARSER_DEBUG_SPEED 1
 
40
#undef PARSER_DEBUG_SPEED
 
41
#define PARSER_SPLIT_STANZAS_EVENTS 1
 
42
 
 
43
/*
 
44
 * WARNING!
 
45
 * This file is not a part of JReen API, it may be chagned or even removed
 
46
 * without any notification.
 
47
 */
 
48
 
 
49
namespace Jreen
 
50
{
 
51
class ParserPrivate
 
52
{
 
53
public:
 
54
        QXmlStreamReader *reader;
 
55
        QXmlStreamReader nullReader;
 
56
        Parser::State state;
 
57
        QStack<XmlStreamParser*> parsers;
 
58
        QStack<int> parsersCount;
 
59
        QByteArray buffer;
 
60
        int depth;
 
61
        bool atParsing;
 
62
        bool first;
 
63
        ClientPrivate *client;
 
64
#ifdef PARSER_DEBUG_SPEED
 
65
        int parsingTime;
 
66
        int totalParsingTime;
 
67
        int totalLogicTime;
 
68
        int stanzaLogicTime[4];
 
69
#endif
 
70
};
 
71
}
 
72
 
 
73
#endif // PARSER_P_H