NetworkProxyImport.h
Go to the documentation of this file.
1 /*
2  *=BEGIN SONGBIRD GPL
3  *
4  * This file is part of the Songbird web player.
5  *
6  * Copyright(c) 2005-2009 POTI, Inc.
7  * http://www.songbirdnest.com
8  *
9  * This file may be licensed under the terms of of the
10  * GNU General Public License Version 2 (the ``GPL'').
11  *
12  * Software distributed under the License is distributed
13  * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
14  * express or implied. See the GPL for the specific language
15  * governing rights and limitations.
16  *
17  * You should have received a copy of the GPL along with this
18  * program. If not, go to http://www.gnu.org/licenses/gpl.html
19  * or write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  *
22  *=END SONGBIRD GPL
23  */
24 
30 #ifndef __NETWORKPROXYIMPORT_H__
31 #define __NETWORKPROXYIMPORT_H__
32 
33 #include <nsISupportsPrimitives.h>
34 #include "sbINetworkProxyImport.h"
35 
36 class nsIPrefBranch;
37 
38 #ifndef NS_DECL_ISUPPORTS
39 #error
40 #endif
41 // DEFINES ====================================================================
42 #define SONGBIRD_NetworkProxyImport_CONTRACTID \
43  "@songbirdnest.com/Songbird/NetworkProxyImport;1"
44 #define SONGBIRD_NetworkProxyImport_CLASSNAME \
45  "Songbird NetworkProxy Import Component"
46 #define SONGBIRD_NetworkProxyImport_CID \
47 { /* caece57b-6634-491e-a858-9c99ab873dc4 */ \
48  0xcaece57b, 0x6634, 0x491e, \
49  { 0xa8, 0x58, 0x9c, 0x99, 0xab, 0x87, 0x3d, 0xc4 } \
50 }
51 // CLASSES ====================================================================
53 {
54 public:
56  NS_DECL_SBINETWORKPROXYIMPORT
57 
59  virtual ~CNetworkProxyImport();
60 
61  static void SetUnicharPref(const char* aPref,
62  const nsAString& aValue,
63  nsIPrefBranch* aPrefs);
64  static void ParseOverrideServers(const nsAString& aServers,
65  nsIPrefBranch* aBranch);
66  static void SetProxyPref(const nsAString& aHostPort,
67  const char* aPref,
68  const char* aPortPref,
69  nsIPrefBranch* aPrefs);
70 };
71 
72 nsresult ImportProxySettings_Auto(PRBool *_retval);
73 
74 #ifdef XP_WIN
75 nsresult ImportProxySettings_IE(PRBool *_retval);
76 #endif
77 
78 #endif // __NETWORKPROXYIMPORT_H__
79 
80 
onPageChanged aValue
Definition: FeedWriter.js:1395
static void SetProxyPref(const nsAString &aHostPort, const char *aPref, const char *aPortPref, nsIPrefBranch *aPrefs)
static void ParseOverrideServers(const nsAString &aServers, nsIPrefBranch *aBranch)
const nsIPrefBranch
static void SetUnicharPref(const char *aPref, const nsAString &aValue, nsIPrefBranch *aPrefs)
NS_DECL_ISUPPORTS NS_DECL_SBINETWORKPROXYIMPORT CNetworkProxyImport()
A service to import network proxy settings from several sources.
nsresult ImportProxySettings_Auto(PRBool *_retval)