libktorrent  2.2.0
version.h
1 /***************************************************************************
2  * Copyright (C) 2007 by Joris Guisson and Ivan Vasic *
3  * joris.guisson@gmail.com *
4  * ivasic@gmail.com *
5  * *
6  * This program is free software; you can redistribute it and/or modify *
7  * it under the terms of the GNU General Public License as published by *
8  * the Free Software Foundation; either version 2 of the License, or *
9  * (at your option) any later version. *
10  * *
11  * This program is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License *
17  * along with this program; if not, write to the *
18  * Free Software Foundation, Inc., *
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
20  ***************************************************************************/
21 #ifndef BTVERSION_H
22 #define BTVERSION_H
23 
24 #include <ktorrent_export.h>
25 #include <util/constants.h>
26 
27 #define LIBKTORRENT_MAJOR 1
28 #define LIBKTORRENT_MINOR 9
29 #define LIBKTORRENT_RELEASE 50
30 #define LIBKTORRENT_VERSION ((LIBKTORRENT_MAJOR << 16) | (LIBKTORRENT_MINOR << 8) | LIBKTORRENT_RELEASE)
31 
32 class QString;
33 
34 namespace bt
35 {
36  enum VersionType
37  {
38  ALPHA,
39  BETA,
40  RELEASE_CANDIDATE,
41  DEVEL,
42  NORMAL
43  };
44 
55  KTORRENT_EXPORT void SetClientInfo(const QString & name,int major,int minor,int release,VersionType type,const QString & peer_id_code);
56 
61  KTORRENT_EXPORT QString PeerIDPrefix();
62 
66  KTORRENT_EXPORT QString GetVersionString();
67 
68 
70  const Uint32 MAJOR = LIBKTORRENT_MAJOR;
72  const Uint32 MINOR = LIBKTORRENT_MINOR;
74  const VersionType VERSION_TYPE = DEVEL;
76  const Uint32 BETA_ALPHA_RC_RELEASE = 0;
78  const Uint32 RELEASE = LIBKTORRENT_RELEASE;
79 }
80 
81 #endif