1 : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* ***** BEGIN LICENSE BLOCK *****
3 : * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 : *
5 : * The contents of this file are subject to the Mozilla Public License Version
6 : * 1.1 (the "License"); you may not use this file except in compliance with
7 : * the License. You may obtain a copy of the License at
8 : * http://www.mozilla.org/MPL/
9 : *
10 : * Software distributed under the License is distributed on an "AS IS" basis,
11 : * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 : * for the specific language governing rights and limitations under the
13 : * License.
14 : *
15 : * The Original Code is mozilla.org code.
16 : *
17 : * The Initial Developer of the Original Code is
18 : * Red Hat, Inc.
19 : * Portions created by the Initial Developer are Copyright (C) 2012
20 : * the Initial Developer. All Rights Reserved.
21 : *
22 : * Contributor(s):
23 : * Kai Engert <kengert@redhat.com>
24 : *
25 : * Alternatively, the contents of this file may be used under the terms of
26 : * either the GNU General Public License Version 2 or later (the "GPL"), or
27 : * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 : * in which case the provisions of the GPL or the LGPL are applicable instead
29 : * of those above. If you wish to allow use of your version of this file only
30 : * under the terms of either the GPL or the LGPL, and not to allow others to
31 : * use your version of this file under the terms of the MPL, indicate your
32 : * decision by deleting the provisions above and replace them with the notice
33 : * and other provisions required by the GPL or the LGPL. If you do not delete
34 : * the provisions above, a recipient may use your version of this file under
35 : * the terms of any one of the MPL, the GPL or the LGPL.
36 : *
37 : * ***** END LICENSE BLOCK ***** */
38 :
39 : #include "nsNSSVersion.h"
40 : #include "nsString.h"
41 : #include "prinit.h"
42 : #include "nss.h"
43 : #include "nssutil.h"
44 : #include "ssl.h"
45 : #include "smime.h"
46 :
47 0 : NS_IMPL_ISUPPORTS1(nsNSSVersion, nsINSSVersion)
48 :
49 0 : nsNSSVersion::nsNSSVersion()
50 : {
51 0 : }
52 :
53 0 : nsNSSVersion::~nsNSSVersion()
54 : {
55 0 : }
56 :
57 : NS_IMETHODIMP
58 0 : nsNSSVersion::GetNSPR_Version(nsAString & v)
59 : {
60 0 : CopyUTF8toUTF16(PR_GetVersion(), v);
61 0 : return NS_OK;
62 : }
63 :
64 : NS_IMETHODIMP
65 0 : nsNSSVersion::GetNSS_Version(nsAString & v)
66 : {
67 0 : CopyUTF8toUTF16(NSS_GetVersion(), v);
68 0 : return NS_OK;
69 : }
70 :
71 : NS_IMETHODIMP
72 0 : nsNSSVersion::GetNSSUTIL_Version(nsAString & v)
73 : {
74 0 : CopyUTF8toUTF16(NSSUTIL_GetVersion(), v);
75 0 : return NS_OK;
76 : }
77 :
78 : NS_IMETHODIMP
79 0 : nsNSSVersion::GetNSSSSL_Version(nsAString & v)
80 : {
81 0 : CopyUTF8toUTF16(NSSSSL_GetVersion(), v);
82 0 : return NS_OK;
83 : }
84 :
85 : NS_IMETHODIMP
86 0 : nsNSSVersion::GetNSSSMIME_Version(nsAString & v)
87 : {
88 0 : CopyUTF8toUTF16(NSSSMIME_GetVersion(), v);
89 0 : return NS_OK;
90 : }
91 :
92 : NS_IMETHODIMP
93 0 : nsNSSVersion::GetNSPR_MinVersion(nsAString & v)
94 : {
95 0 : CopyUTF8toUTF16(PR_VERSION, v);
96 0 : return NS_OK;
97 : }
98 :
99 : NS_IMETHODIMP
100 0 : nsNSSVersion::GetNSS_MinVersion(nsAString & v)
101 : {
102 0 : CopyUTF8toUTF16(NSS_VERSION, v);
103 0 : return NS_OK;
104 : }
105 :
106 : NS_IMETHODIMP
107 0 : nsNSSVersion::GetNSSUTIL_MinVersion(nsAString & v)
108 : {
109 0 : CopyUTF8toUTF16(NSSUTIL_VERSION, v);
110 0 : return NS_OK;
111 : }
112 :
113 : NS_IMETHODIMP
114 0 : nsNSSVersion::GetNSSSSL_MinVersion(nsAString & v)
115 : {
116 0 : CopyUTF8toUTF16(NSS_VERSION, v);
117 0 : return NS_OK;
118 : }
119 :
120 : NS_IMETHODIMP
121 0 : nsNSSVersion::GetNSSSMIME_MinVersion(nsAString & v)
122 : {
123 0 : CopyUTF8toUTF16(NSS_VERSION, v);
124 0 : return NS_OK;
125 : }
|