aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/EphyXULAppInfo.cpp
blob: 1319431ece4628dc2afc22c6de6423ce23e9916f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
/*
 *  Copyright © 2008 Christian Persch
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2, or (at your option)
 *  any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */

#include "mozilla-config.h"
#include "config.h"

#include <nsStringGlue.h>

#include "EphyXULAppInfo.h"

NS_IMPL_ISUPPORTS2 (EphyXULAppInfo, nsIXULRuntime, nsIXULAppInfo)

EphyXULAppInfo::EphyXULAppInfo ()
  : mLogConsoleErrors (PR_TRUE)
{
}

EphyXULAppInfo::~EphyXULAppInfo ()
{
}

/* readonly attribute ACString vendor; */
NS_IMETHODIMP
EphyXULAppInfo::GetVendor(nsACString & aVendor)
{
  aVendor.Assign ("GNOME");
  return NS_OK;
}

/* readonly attribute ACString name; */
NS_IMETHODIMP
EphyXULAppInfo::GetName(nsACString & aName)
{
  aName.Assign ("GNOME Web Browser");
  return NS_OK;
}

/* readonly attribute ACString ID; */
NS_IMETHODIMP
EphyXULAppInfo::GetID(nsACString & aID)
{
  aID.Assign ("{8cbd4d83-3182-4d7e-9889-a8d77bf1f205}");
  return NS_OK;
}

/* readonly attribute ACString version; */
NS_IMETHODIMP
EphyXULAppInfo::GetVersion(nsACString & aVersion)
{
  aVersion.Assign (VERSION);
  return NS_OK;
}

/* readonly attribute ACString appBuildID; */
NS_IMETHODIMP
EphyXULAppInfo::GetAppBuildID(nsACString & aAppBuildID)
{
  aAppBuildID.Assign (EPHY_BUILD_ID);
  return NS_OK;
}

/* readonly attribute ACString platformVersion; */
NS_IMETHODIMP
EphyXULAppInfo::GetPlatformVersion(nsACString & aPlatformVersion)
{
  aPlatformVersion.Assign ("1.9");
  return NS_OK;
}

/* readonly attribute ACString platformBuildID; */
NS_IMETHODIMP
EphyXULAppInfo::GetPlatformBuildID(nsACString & aPlatformBuildID)
{
  aPlatformBuildID.Assign (EPHY_BUILD_ID);
  return NS_OK;
}

/* readonly attribute boolean inSafeMode; */
NS_IMETHODIMP
EphyXULAppInfo::GetInSafeMode(PRBool *aInSafeMode)
{
  *aInSafeMode = PR_FALSE;
  return NS_OK;
}

/* attribute boolean logConsoleErrors; */
NS_IMETHODIMP
EphyXULAppInfo::GetLogConsoleErrors(PRBool *aLogConsoleErrors)
{
  *aLogConsoleErrors = mLogConsoleErrors;
  return NS_OK;
}

NS_IMETHODIMP
EphyXULAppInfo::SetLogConsoleErrors(PRBool aLogConsoleErrors)
{
  mLogConsoleErrors = aLogConsoleErrors;
  return NS_OK;
}

/* readonly attribute AUTF8String OS; */
NS_IMETHODIMP
EphyXULAppInfo::GetOS(nsACString & aOS)
{
  aOS.Assign (EPHY_HOST_OS);
  return NS_OK;
}

/* readonly attribute AUTF8String XPCOMABI; */
NS_IMETHODIMP
EphyXULAppInfo::GetXPCOMABI(nsACString & aXPCOMABI)
{
  aXPCOMABI.Assign (EPHY_HOST_CPU "-gcc3");
  return NS_OK;
}