API CHANGE: remove com.sun.star.system.XProxySettings

... and related services:

com.sun.star.system.SOffice52ProxySettings
com.sun.star.system.ProxySettings
com.sun.star.system.SystemProxySettings

The implementation for these has apparently been removed in
OpenOffice.org 2.0 or thereabouts.

EXISTENCE: published key
"/UCR/com/sun/star/system/SOffice52ProxySettings" exists only in
registry 1
EXISTENCE: published key "/UCR/com/sun/star/system/ProxySettings" exists
only in registry 1
EXISTENCE: published key "/UCR/com/sun/star/system/XProxySettings"
exists only in registry 1
EXISTENCE: published key "/UCR/com/sun/star/system/SystemProxySettings"
exists only in registry 1

Change-Id: If00c332edf08619fcad12ed07d0d8a13a714045e
This commit is contained in:
Michael Stahl 2012-11-29 23:40:26 +01:00
parent ded6f06ec5
commit 28327c28ce
15 changed files with 0 additions and 1032 deletions

View File

@ -64,7 +64,6 @@ job63=mcnttype.MimeContentTypeFactory
job64=namingservice.uno.NamingService
job65=nestedreg.uno.NestedRegistry
job66=proxyfac.uno.ProxyFactory
job67=proxyset.SOffice52ProxySettings
job68=regtypeprov.uno.RegistryTypeDescriptionProvider
job69=remotebridge.uno.various
job70=sc.AccessibleEditableTextPara_HeaderFooter

View File

@ -17,7 +17,6 @@
#
job=cmdmail.SimpleCommandMail
job=fileacc.SimpleFileAccess
job=proxyset.SOffice52ProxySettings
job=sc.ScCellFieldObj
job=sc.ScCellFieldsObj
job=sc.XMLImporter

View File

@ -269,7 +269,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/smarttags,
SmartTagRecognizer \
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/system,\
ProxySettings \
SimpleCommandMail \
SimpleSystemMail \
SystemShellExecute \
@ -1180,10 +1179,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/style,\
StyleFamilies \
StyleFamily \
))
$(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/system,\
SOffice52ProxySettings \
SystemProxySettings \
))
$(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/table,\
AccessibleCellView \
AccessibleTableView \
@ -3477,7 +3472,6 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/system,\
SimpleMailClientFlags \
SystemShellExecuteException \
SystemShellExecuteFlags \
XProxySettings \
XSimpleMailClient \
XSimpleMailClientSupplier \
XSimpleMailMessage \

View File

@ -1,44 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef __com_sun_star_system_ProxySettings_idl__
#define __com_sun_star_system_ProxySettings_idl__
module com { module sun { module star { module system {
published interface XProxySettings;
/** Specifies a service for reading the proxy settings from an old office
installation or a central system database.
@see com::sun::star::system::XProxySettings
@deprecated
*/
published service ProxySettings : XProxySettings;
}; }; }; };
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -1,46 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef __com_sun_star_system_SOffice52ProxySettings_idl__
#define __com_sun_star_system_SOffice52ProxySettings_idl__
#include <com/sun/star/system/ProxySettings.idl>
module com { module sun { module star { module system {
/** Specifies a service for reading the proxy settings from an old
StarOffice 5.2 installation.
@see com::sun::star::system::ProxySettings
@deprecated
*/
published service SOffice52ProxySettings
{
service ProxySettings;
};
}; }; }; };
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -1,44 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef __com_sun_star_system_SystemProxySettings_idl__
#define __com_sun_star_system_SystemProxySettings_idl__
#include <com/sun/star/system/ProxySettings.idl>
module com { module sun { module star { module system {
/** Specifies a service for reading the system proxy settings. Some systems
store this information in a central configuration database.
@deprecated
*/
published service SystemProxySettings
{
service ProxySettings;
};
}; }; }; };
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -1,117 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef __com_sun_star_system_XProxySettings_idl__
#define __com_sun_star_system_XProxySettings_idl__
#include <com/sun/star/uno/RuntimeException.idl>
#include <com/sun/star/uno/XInterface.idl>
module com { module sun { module star { module system {
/** Enables access to different proxy settings. If particular settings are not
available an empty string will be returned.
@deprecated
*/
published interface XProxySettings: com::sun::star::uno::XInterface
{
/** Access to the FTP proxy address.
@returns
The address of the FTP proxy server, if any has been specified.
*/
string getFtpProxyAddress( );
/** Access to the FTP proxy port.
@returns
The port of the FTP proxy server, if any has been specified.
*/
string getFtpProxyPort( );
/** Access to the Gopher proxy address.
@returns
The address of the gopher proxy server, if any has been specified.
*/
string getGopherProxyAddress( );
/** Access to the Gopher proxy port.
@returns
The port of the gopher proxy server, if any has been specified.
*/
string getGopherProxyPort( );
/** Access to the Http proxy address.
@returns
The address of the http proxy server, if any has been specified.
*/
string getHttpProxyAddress( );
/** Access to the Http proxy port.
@returns
The port of the http proxy server, if any has been specified.
*/
string getHttpProxyPort( );
/** Access to the HTTPS proxy address.
@returns
The address of the HTTPS proxy server, if any has been specified.
*/
string getHttpsProxyAddress( );
/** Access to the HTTPS proxy port.
@returns
The port of the HTTPS proxy server, if any has been specified.
*/
string getHttpsProxyPort( );
/** Access to the Socks proxy address.
@returns
The address of the socks proxy server, if any has been specified.
*/
string getSocksProxyAddress( );
/** Access to the Socks proxy port.
@returns
The port of the socks proxy server, if any has been specified.
*/
string getSocksProxyPort( );
/** Access to the Proxy-Bypass address.
@returns
A string of ";" separated addresses for which no proxy server
should be used.
*/
string getProxyBypassAddress( );
/** Either a proxy is enabled or not.
@returns
A value of <TRUE/> if a proxy is enabled.
<p>A value of <FALSE/> if a proxy is disabled.</p>
*/
boolean isProxyEnabled( );
};
}; }; }; };
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Binary file not shown.

View File

@ -788,7 +788,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
qadevOOo/tests/java/ifc/style/_Style \
qadevOOo/tests/java/ifc/style/_XStyle \
qadevOOo/tests/java/ifc/style/_XStyleFamiliesSupplier \
qadevOOo/tests/java/ifc/system/_XProxySettings \
qadevOOo/tests/java/ifc/system/_XSimpleMailClientSupplier \
qadevOOo/tests/java/ifc/system/_XSystemShellExecute \
qadevOOo/tests/java/ifc/table/_CellProperties \
@ -1127,8 +1126,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
qadevOOo/tests/java/mod/_pcr/ObjectInspectorModel \
qadevOOo/tests/java/mod/_proxyfac/ProxyFactory \
qadevOOo/tests/java/mod/_proxyfac/uno/ProxyFactory \
qadevOOo/tests/java/mod/_proxyset/SOffice52ProxySettings \
qadevOOo/tests/java/mod/_proxyset/SystemProxySettings \
qadevOOo/tests/java/mod/_qadevOOo/SelfTest \
qadevOOo/tests/java/mod/_rdbtdp/RegistryTypeDescriptionProvider \
qadevOOo/tests/java/mod/_regtypeprov/uno/RegistryTypeDescriptionProvider \

View File

@ -1,17 +0,0 @@
"SystemProxySettings";"com::sun::star::lang::XServiceInfo";"getImplementationName()"
"SystemProxySettings";"com::sun::star::lang::XServiceInfo";"supportsService()"
"SystemProxySettings";"com::sun::star::lang::XServiceInfo";"getSupportedServiceNames()"
"SystemProxySettings";"com::sun::star::lang::XTypeProvider";"getTypes()"
"SystemProxySettings";"com::sun::star::lang::XTypeProvider";"getImplementationId()"
"SystemProxySettings";"com::sun::star::system::XProxySettings";"getFtpProxyAddress()"
"SystemProxySettings";"com::sun::star::system::XProxySettings";"getFtpProxyPort()"
"SystemProxySettings";"com::sun::star::system::XProxySettings";"getGopherProxyAddress()"
"SystemProxySettings";"com::sun::star::system::XProxySettings";"getGopherProxyPort()"
"SystemProxySettings";"com::sun::star::system::XProxySettings";"getHttpProxyAddress()"
"SystemProxySettings";"com::sun::star::system::XProxySettings";"getHttpProxyPort()"
"SystemProxySettings";"com::sun::star::system::XProxySettings";"getHttpsProxyAddress()"
"SystemProxySettings";"com::sun::star::system::XProxySettings";"getHttpsProxyPort()"
"SystemProxySettings";"com::sun::star::system::XProxySettings";"getSocksProxyAddress()"
"SystemProxySettings";"com::sun::star::system::XProxySettings";"getSocksProxyPort()"
"SystemProxySettings";"com::sun::star::system::XProxySettings";"getProxyBypassAddress()"
"SystemProxySettings";"com::sun::star::system::XProxySettings";"isProxyEnabled()"
1 SystemProxySettings com::sun::star::lang::XServiceInfo getImplementationName()
2 SystemProxySettings com::sun::star::lang::XServiceInfo supportsService()
3 SystemProxySettings com::sun::star::lang::XServiceInfo getSupportedServiceNames()
4 SystemProxySettings com::sun::star::lang::XTypeProvider getTypes()
5 SystemProxySettings com::sun::star::lang::XTypeProvider getImplementationId()
6 SystemProxySettings com::sun::star::system::XProxySettings getFtpProxyAddress()
7 SystemProxySettings com::sun::star::system::XProxySettings getFtpProxyPort()
8 SystemProxySettings com::sun::star::system::XProxySettings getGopherProxyAddress()
9 SystemProxySettings com::sun::star::system::XProxySettings getGopherProxyPort()
10 SystemProxySettings com::sun::star::system::XProxySettings getHttpProxyAddress()
11 SystemProxySettings com::sun::star::system::XProxySettings getHttpProxyPort()
12 SystemProxySettings com::sun::star::system::XProxySettings getHttpsProxyAddress()
13 SystemProxySettings com::sun::star::system::XProxySettings getHttpsProxyPort()
14 SystemProxySettings com::sun::star::system::XProxySettings getSocksProxyAddress()
15 SystemProxySettings com::sun::star::system::XProxySettings getSocksProxyPort()
16 SystemProxySettings com::sun::star::system::XProxySettings getProxyBypassAddress()
17 SystemProxySettings com::sun::star::system::XProxySettings isProxyEnabled()

View File

@ -1,286 +0,0 @@
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
package ifc.system;
import java.util.Map;
import lib.MultiMethodTest;
import lib.Status;
import lib.StatusException;
import com.sun.star.system.XProxySettings;
/**
* Tests <code>com.sun.star.system.XProxySettings</code> interface. The result
* of each method is compared with expected settings which is specified by the
* caller of the tests via object relation "XProxySettings.proxaSettings". That
* should be a HashMap containing the following keys:
* <ul>
* <li>ftpProxyAddress</li>
* <li>ftpProxyPort</li>
* <li>gopherProxyAddress</li>
* <li>gopherProxyPort</li>
* <li>httpProxyAddress</li>
* <li>httpProxyPort</li>
* <li>httpsProxyAddress</li>
* <li>httpsProxyPort</li>
* <li>socksProxyAddress</li>
* <li>socksProxyPort</li>
* <li>proxyBypassAddress</li>
* <li>proxyEnabled</li>
* </ul>.
* Each value for a key, should be a String specifying the correct result of
* the corresponding getXXX() method of XProxySettings interface.
* <p>If the object relation is not specified the test failes.
*
*/
public class _XProxySettings extends MultiMethodTest {
public XProxySettings oObj;
/**
* Contains a HashMap with correct results of the tested methods. See
* the class description.
*/
Map<String,String> expectedProxies;
/**
* Checks that the "XProxySettings.proxySettings" object relation is
* specified and stores its value to <code>expectedProxies</code> field.
*
* @throws StatusException is the object relation is not specified.
*
* @see #expectedProxies
*/
@SuppressWarnings("unchecked")
public void before() {
expectedProxies = (Map<String,String>)tEnv.getObjRelation(
"XProxySettings.proxySettings");
if (expectedProxies == null) {
throw new StatusException(
Status.failed("Expected proxy settings are not specified"));
}
}
/**
* Calls <code>getFtpProxyAddress()</code> and verifies its result with
* "ftpProxyAddress" value of <code>expectedProxies</code>.
*
* @see #expectedProxies
*/
public void _getFtpProxyAddress() {
String ftpProxyAddress = oObj.getFtpProxyAddress();
String expectedFtpProxyAddress = expectedProxies.get("ftpProxyAddress");
log.println("getFtpProxyAddress");
log.println("getting: "+ftpProxyAddress);
log.println("expected: "+expectedFtpProxyAddress);
tRes.tested("getFtpProxyAddress()",
ftpProxyAddress.equals(expectedFtpProxyAddress));
}
/**
* Calls <code>getFtpProxyPort()</code> and verifies its result with
* "ftpProxyPort" value of <code>expectedProxies</code>.
*
* @see #expectedProxies
*/
public void _getFtpProxyPort() {
String ftpProxyPort = oObj.getFtpProxyPort();
String expectedFtpProxyPort = expectedProxies.get("ftpProxyPort");
log.println("getFtpProxyPort");
log.println("getting: "+ftpProxyPort);
log.println("expected: "+expectedFtpProxyPort);
tRes.tested("getFtpProxyPort()",
ftpProxyPort.equals(expectedFtpProxyPort));
}
/**
* Calls <code>getGopherProxyAddress()</code> and verifies its result with
* "gopherProxyAddress" value of <code>expectedProxies</code>.
*
* @see #expectedProxies
*/
public void _getGopherProxyAddress() {
String gopherProxyAddress = oObj.getGopherProxyAddress();
String expectedGopherProxyAddress = expectedProxies.get("gopherProxyAddress");
tRes.tested("getGopherProxyAddress()",
gopherProxyAddress.equals(expectedGopherProxyAddress));
}
/**
* Calls <code>getGopherProxyPort()</code> and verifies its result with
* "gopherProxyPort" value of <code>expectedProxies</code>.
*
* @see #expectedProxies
*/
public void _getGopherProxyPort() {
String gopherProxyPort = oObj.getGopherProxyPort();
String expectedGopherProxyPort = expectedProxies.get("gopherProxyPort");
tRes.tested("getGopherProxyPort()",
gopherProxyPort.equals(expectedGopherProxyPort));
}
/**
* Calls <code>getHttpProxyAddress()</code> and verifies its result with
* "httpProxyAddress" value of <code>expectedProxies</code>.
*
* @see #expectedProxies
*/
public void _getHttpProxyAddress() {
String httpProxyAddress = oObj.getHttpProxyAddress();
String expectedHttpProxyAddress = expectedProxies.get("httpProxyAddress");
log.println("getHttpProxyAddress");
log.println("getting: "+httpProxyAddress);
log.println("expected: "+expectedHttpProxyAddress);
tRes.tested("getHttpProxyAddress()",
httpProxyAddress.equals(expectedHttpProxyAddress));
}
/**
* Calls <code>getHttpProxyPort()</code> and verifies its result with
* "httpProxyPort" value of <code>expectedProxies</code>.
*
* @see #expectedProxies
*/
public void _getHttpProxyPort() {
String httpProxyPort = oObj.getHttpProxyPort();
String expectedHttpProxyPort = expectedProxies.get("httpProxyPort");
log.println("getHttpProxyPort");
log.println("getting: "+httpProxyPort);
log.println("expected: "+expectedHttpProxyPort);
tRes.tested("getHttpProxyPort()",
httpProxyPort.equals(expectedHttpProxyPort));
}
/**
* Calls <code>getHttpsProxyAddress()</code> and verifies its result with
* "httpsProxyAddress" value of <code>expectedProxies</code>.
*
* @see #expectedProxies
*/
public void _getHttpsProxyAddress() {
String httpsProxyAddress = oObj.getHttpsProxyAddress();
String expectedHttpsProxyAddress = expectedProxies.get("httpsProxyAddress");
log.println("getHttpsProxyAddress");
log.println("getting: "+httpsProxyAddress);
log.println("expected: "+expectedHttpsProxyAddress);
tRes.tested("getHttpsProxyAddress()",
httpsProxyAddress.equals(expectedHttpsProxyAddress));
}
/**
* Calls <code>getHttpsProxyPort()</code> and verifies its result with
* "httpsProxyPort" value of <code>expectedProxies</code>.
*
* @see #expectedProxies
*/
public void _getHttpsProxyPort() {
String httpsProxyPort = oObj.getHttpsProxyPort();
String expectedHttpsProxyPort = expectedProxies.get("httpsProxyPort");
log.println("getHttpsProxyPort");
log.println("getting: "+httpsProxyPort);
log.println("expected: "+expectedHttpsProxyPort);
tRes.tested("getHttpsProxyPort()",
httpsProxyPort.equals(expectedHttpsProxyPort));
}
/**
* Calls <code>getProxyBypassAddress()</code> and verifies its result with
* "proxyBypassAddress" value of <code>expectedProxies</code>.
*
* @see #expectedProxies
*/
public void _getProxyBypassAddress() {
String proxyBypassAddress = oObj.getProxyBypassAddress();
String expectedProxyBypassAddress = expectedProxies.get("proxyBypassAddress");
log.println("getProxyBypassAddress");
log.println("getting: "+proxyBypassAddress);
log.println("expected: "+expectedProxyBypassAddress);
tRes.tested("getProxyBypassAddress()",
proxyBypassAddress.equals(expectedProxyBypassAddress));
}
/**
* Calls <code>getSocksProxyAddress()</code> and verifies its result with
* "socksProxyAddress" value of <code>expectedProxies</code>.
*
* @see #expectedProxies
*/
public void _getSocksProxyAddress() {
String socksProxyAddress = oObj.getSocksProxyAddress();
String expectedSocksProxyAddress = expectedProxies.get("socksProxyAddress");
log.println("getSocksProxyAddress");
log.println("getting: "+socksProxyAddress);
log.println("expected: "+expectedSocksProxyAddress);
tRes.tested("getSocksProxyAddress()",
socksProxyAddress.equals(expectedSocksProxyAddress));
}
/**
* Calls <code>getSocksProxyPort()</code> and verifies its result with
* "socksProxyPort" value of <code>expectedProxies</code>.
*
* @see #expectedProxies
*/
public void _getSocksProxyPort() {
String socksProxyPort = oObj.getSocksProxyPort();
String expectedSocksProxyPort = expectedProxies.get("socksProxyPort");
log.println("getSocksProxyPort");
log.println("getting: "+socksProxyPort);
log.println("expected: "+expectedSocksProxyPort);
tRes.tested("getSocksProxyPort()",
socksProxyPort.equals(expectedSocksProxyPort));
}
/**
* Calls <code>isProxyEnabled()</code> and verifies its result with
* "proxyEnabled" value of <code>expectedProxies</code>.
*
* @see #expectedProxies
*/
public void _isProxyEnabled() {
boolean proxyEnabled = oObj.isProxyEnabled();
String proxyEnabledStr = expectedProxies.get("proxyEnabled");
boolean expected = proxyEnabledStr != null
&& proxyEnabledStr.equalsIgnoreCase("true");
tRes.tested("isProxyEnabled()", proxyEnabled == expected);
}
}

View File

@ -1,135 +0,0 @@
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
package mod._proxyset;
import java.io.PrintWriter;
import java.util.HashMap;
import lib.StatusException;
import lib.TestCase;
import lib.TestEnvironment;
import lib.TestParameters;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.uno.XInterface;
/**
* Test for object which is represented by service
* <code>com.sun.star.system.SOffice52ProxySettings</code>. <p>
* Object implements the following interfaces :
* <ul>
* <li> <code>com::sun::star::lang::XServiceInfo</code></li>
* <li> <code>com::sun::star::system::XProxySettings</code></li>
* <li> <code>com::sun::star::lang::XTypeProvider</code></li>
* </ul> <p>
*
* This object test <b> is NOT </b> designed to be run in several
* threads concurently.
*
* @see com.sun.star.lang.XServiceInfo
* @see com.sun.star.system.XProxySettings
* @see com.sun.star.lang.XTypeProvider
* @see ifc.lang._XServiceInfo
* @see ifc.system._XProxySettings
* @see ifc.lang._XTypeProvider
*/
public class SOffice52ProxySettings extends TestCase {
/**
* Creating a Testenvironment for the interfaces to be tested.
* Creates an instance of
* <code>com.sun.star.system.SOffice52ProxySettings</code>,for testing.
*
* Object relations created :
* <ul>
* <li> <code>'XProxySettings.proxySettings'</code> for
* {@link ifc.system._XProxySettings} : </li>
* <p>It passes a HashMap with expected proxy settings as object
* relation "XProxySettings.proxySettings", to verify results. The expected
* settings are taken from parameters. The following parameters are recognized:
* <ul>
* <li>test.proxy.soffice52.ftpProxyAddress</li>
* <li>test.proxy.soffice52.ftpProxyPort</li>
* <li>test.proxy.soffice52.gopherProxyAddress</li>
* <li>test.proxy.soffice52.gopherProxyPort</li>
* <li>test.proxy.soffice52.httpProxyAddress</li>
* <li>test.proxy.soffice52.httpProxyPort</li>
* <li>test.proxy.soffice52.httpsProxyAddress</li>
* <li>test.proxy.soffice52.httpsProxyPort</li>
* <li>test.proxy.soffice52.socksProxyAddress</li>
* <li>test.proxy.soffice52.socksProxyPort</li>
* <li>test.proxy.soffice52.proxyBypassAddress</li>
* <li>test.proxy.soffice52.proxyEnabled</li>
* </ul>.
* </ul>
*/
protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) {
XMultiServiceFactory xMSF = (XMultiServiceFactory)tParam.getMSF();
XInterface oObj = null;
try {
oObj = (XInterface)xMSF.createInstance(
"com.sun.star.system.SOffice52ProxySettings");
} catch (com.sun.star.uno.Exception e) {
e.printStackTrace(log);
throw new StatusException("Unexpected exception", e);
}
String Iname = util.utils.getImplName(oObj);
log.println("Implementation Name: "+Iname);
TestEnvironment tEnv = new TestEnvironment(oObj);
// extracting parameters to proxy settings
HashMap<String, String> proxySettings = new HashMap<String, String>(12);
String prefix = "test.proxy.soffice52.";
final String[] names = {
"ftpProxyAddress",
"ftpProxyPort",
"gopherProxyAddress",
"gopherProxyPort",
"httpProxyAddress",
"httpProxyPort",
"httpsProxyAddress",
"httpsProxyPort",
"socksProxyAddress",
"socksProxyPort",
"proxyBypassAddress",
"proxyEnabled"
};
for (int i = 0; i < names.length; i++) {
String name = prefix + names[i];
String value = (String) tParam.get(name);
if (value == null) {
value = "";
}
proxySettings.put(names[i], value);
}
tEnv.addObjRelation("XProxySettings.proxySettings", proxySettings);
return tEnv;
}
} // finish class TestCase

View File

@ -1,136 +0,0 @@
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
package mod._proxyset;
import java.io.PrintWriter;
import java.util.HashMap;
import lib.TestCase;
import lib.TestEnvironment;
import lib.TestParameters;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.uno.XInterface;
/**
* Test for object which is represented by service
* <code>com.sun.star.system.SystemProxySettings</code>. <p>
* Object implements the following interfaces :
* <ul>
* <li> <code>com::sun::star::lang::XServiceInfo</code></li>
* <li> <code>com::sun::star::system::XProxySettings</code></li>
* <li> <code>com::sun::star::lang::XTypeProvider</code></li>
* </ul> <p>
*
* This object test <b> is NOT </b> designed to be run in several
* threads concurently.
*
* @see com.sun.star.lang.XServiceInfo
* @see com.sun.star.system.XProxySettings
* @see com.sun.star.lang.XTypeProvider
* @see ifc.lang._XServiceInfo
* @see ifc.system._XProxySettings
* @see ifc.lang._XTypeProvider
*/
public class SystemProxySettings extends TestCase {
/**
* Creating a Testenvironment for the interfaces to be tested.
* Creates an instance of
* <code>com.sun.star.system.SystemProxySettings</code>,for testing.
*
* Object relations created :
* <ul>
* <li> <code>'XProxySettings.proxySettings'</code> for
* {@link ifc.system._XProxySettings} : </li>
* <p>It passes a HashMap with expected proxy settings as object
* relation "XProxySettings.proxySettings", to verify results. The expected
* settings are taken from parameters. The following parameters are recognized:
* <ul>
* <li>test.proxy.soffice52.ftpProxyAddress</li>
* <li>test.proxy.soffice52.ftpProxyPort</li>
* <li>test.proxy.soffice52.gopherProxyAddress</li>
* <li>test.proxy.soffice52.gopherProxyPort</li>
* <li>test.proxy.soffice52.httpProxyAddress</li>
* <li>test.proxy.soffice52.httpProxyPort</li>
* <li>test.proxy.soffice52.httpsProxyAddress</li>
* <li>test.proxy.soffice52.httpsProxyPort</li>
* <li>test.proxy.soffice52.socksProxyAddress</li>
* <li>test.proxy.soffice52.socksProxyPort</li>
* <li>test.proxy.soffice52.proxyBypassAddress</li>
* <li>test.proxy.soffice52.proxyEnabled</li>
* </ul>.
* </ul>
*/
protected TestEnvironment createTestEnvironment
(TestParameters tParam, PrintWriter log) {
XInterface oObj = null;
Object oInterface = null;
try {
XMultiServiceFactory xMSF = (XMultiServiceFactory)tParam.getMSF();
oInterface = xMSF.createInstance
( "com.sun.star.system.SystemProxySettings" );
}
catch( com.sun.star.uno.Exception e ) {
log.println("Service not available" );
}
oObj = (XInterface) oInterface;
log.println( " creating a new environment for object" );
TestEnvironment tEnv = new TestEnvironment( oObj );
// extracting parameters to proxy settings
HashMap<String, String> proxySettings = new HashMap<String, String>(12);
String prefix = "test.proxy.system.";
final String[] names = {
"ftpProxyAddress",
"ftpProxyPort",
"gopherProxyAddress",
"gopherProxyPort",
"httpProxyAddress",
"httpProxyPort",
"httpsProxyAddress",
"httpsProxyPort",
"socksProxyAddress",
"socksProxyPort",
"proxyBypassAddress",
"proxyEnabled"
};
for (int i = 0; i < names.length; i++) {
String name = prefix + names[i];
String value = (String) tParam.get(name);
if (value == null) {
value = "";
}
proxySettings.put(names[i], value);
}
tEnv.addObjRelation("XProxySettings.proxySettings", proxySettings);
return tEnv;
}
}

View File

@ -1,183 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/registry/XSimpleRegistry.hpp>
#include <com/sun/star/system/XProxySettings.hpp>
#include <cppuhelper/servicefactory.hxx>
#include <cppuhelper/servicefactory.hxx>
#include <rtl/ustring.hxx>
#include <sal/types.h>
#include <osl/diagnose.h>
#ifdef WNT
#include <stdio.h>
#if defined _MSC_VER
#pragma warning(push, 1)
#endif
#include <windows.h>
#if defined _MSC_VER
#pragma warning(pop)
#endif
#endif
//--------------------------------------------------------------
// namesapces
//--------------------------------------------------------------
using namespace ::rtl ;
using namespace ::cppu ;
using namespace ::com::sun::star::uno ;
using namespace ::com::sun::star::lang ;
using namespace std ;
using namespace com::sun::star::system;
#ifdef WNT
#define RDB_SYSPATH "D:\\Projects\\gsl\\shell\\wntmsci7\\bin\\applicat.rdb"
#endif
//--------------------------------------------------------------
// global variables
//--------------------------------------------------------------
Reference< XMultiServiceFactory > g_xFactory;
//--------------------------------------------------------------
// main
//--------------------------------------------------------------
// int SAL_CALL main(int nArgc, char* Argv[], char* Env[] )
int SAL_CALL main(int, char*, char* )
{
//-------------------------------------------------
// get the global service-manager
//-------------------------------------------------
// Get global factory for uno services.
OUString rdbName = OUString( RDB_SYSPATH );
Reference< XMultiServiceFactory > g_xFactory( createRegistryServiceFactory( rdbName ) );
// Print a message if an error occurred.
if ( g_xFactory.is() == sal_False )
{
OSL_FAIL("Can't create RegistryServiceFactory");
return(-1);
}
printf("Creating RegistryServiceFactory successful\n");
//-------------------------------------------------
// try to get an Interface to a XFilePicker Service
//-------------------------------------------------
try
{
Reference< XProxySettings > xProxySettings(
g_xFactory->createInstance( OUString("com.sun.star.system.SystemProxySettings") ), UNO_QUERY );
if ( !xProxySettings.is() )
{
OSL_FAIL( "Error creating SystemProxySettings Service" );
return(-1);
}
printf( "Creating instance of SystemProxySettings successful\n" );
OUString ftpProxy = xProxySettings->getFtpProxyAddress( );
OUString httpProxy = xProxySettings->getHttpProxyAddress( );
OUString httpsProxy = xProxySettings->getHttpsProxyAddress( );
OUString socksProxy = xProxySettings->getSocksProxyAddress( );
OUString gopherProxy = xProxySettings->getGopherProxyAddress( );
OUString ftpProxyPort = xProxySettings->getFtpProxyPort( );
OUString httpProxyPort = xProxySettings->getHttpProxyPort( );
OUString httpsProxyPort = xProxySettings->getHttpsProxyPort( );
OUString socksProxyPort = xProxySettings->getSocksProxyPort( );
OUString gopherProxyPort = xProxySettings->getGopherProxyPort( );
OUString proxyBypass = xProxySettings->getProxyBypassAddress( );
printf( "Test of SystemProxySettings successful\n" );
xProxySettings = Reference< XProxySettings >(
g_xFactory->createInstance( OUString("com.sun.star.system.SOProxySettings") ), UNO_QUERY );
if ( !xProxySettings.is() )
{
OSL_FAIL( "Error creating SystemProxySettings Service" );
return(-1);
}
printf( "Creating instance of SOProxySettings successful\n" );
ftpProxy = xProxySettings->getFtpProxyAddress( );
httpProxy = xProxySettings->getHttpProxyAddress( );
httpsProxy = xProxySettings->getHttpsProxyAddress( );
socksProxy = xProxySettings->getSocksProxyAddress( );
gopherProxy = xProxySettings->getGopherProxyAddress( );
ftpProxyPort = xProxySettings->getFtpProxyPort( );
httpProxyPort = xProxySettings->getHttpProxyPort( );
httpsProxyPort = xProxySettings->getHttpsProxyPort( );
socksProxyPort = xProxySettings->getSocksProxyPort( );
gopherProxyPort = xProxySettings->getGopherProxyPort( );
proxyBypass = xProxySettings->getProxyBypassAddress( );
sal_Bool bProxyEnabled = xProxySettings->isProxyEnabled( );
if (bProxyEnabled)
{
printf("Test ProxyEnabled true\n");
}
printf( "Test of SOProxySettings successful\n" );
}
catch( Exception& )
{
}
//--------------------------------------------------
// shutdown
//--------------------------------------------------
// Cast factory to XComponent
Reference< XComponent > xComponent( g_xFactory, UNO_QUERY );
// Print a message if an error occurred.
if ( xComponent.is() == sal_False )
{
OSL_FAIL("Error shuting down");
}
// Dispose and clear factory
xComponent->dispose();
g_xFactory.clear();
g_xFactory = Reference< XMultiServiceFactory >();
printf("Test successful\n");
return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -21,7 +21,6 @@ PRJ=..$/..$/..
PRJNAME=shell
TARGET=testsyssh
TARGET1=testsmplmail
TARGET2=testprx
TARGET4=testfopen
LIBTARGET=NO
TARGETTYPE=CUI
@ -36,7 +35,6 @@ CFLAGS+=/GX
OBJFILES1=$(OBJ)$/TestSysShExec.obj
OBJFILES2=$(OBJ)$/TestSmplMail.obj
OBJFILES3=$(OBJ)$/TestProxySet.obj
OBJFILES4=$(OBJ)$/Testfopen.obj
OBJFILES=$(OBJFILES1)\
@ -65,17 +63,6 @@ APP2STDLIBS+= $(CPPULIB) \
APP2DEF= $(MISC)$/$(APP2TARGET).def
# --- TestProxy ---
APP3TARGET=$(TARGET2)
APP3OBJS=$(OBJFILES3)
APP3STDLIBS+= $(CPPULIB) \
$(CPPUHELPERLIB) \
$(SALLIB)
APP3DEF= $(MISC)$/$(APP3TARGET).def
# --- Testfopen ---
APP4TARGET=$(TARGET4)