mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
ControlPoint: Namespace konfigurierbar gemacht
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@18187 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5f47a9b89d
commit
ee0054c463
@ -52,6 +52,7 @@ our @IGNOREIP;
|
||||
our @USEDONLYIP;
|
||||
our $LogLevel;
|
||||
our $EnvPrefix;
|
||||
our $EnvNamespace;
|
||||
|
||||
sub isIgnoreIP($) {
|
||||
my($ip) = @_;
|
||||
@ -104,6 +105,7 @@ sub new {
|
||||
@USEDONLYIP = @{$args{UsedOnlyIP}};
|
||||
$LogLevel = $args{LogLevel} || 0;
|
||||
$EnvPrefix = $args{EnvPrefix} || $SOAP::Constants::PREFIX_ENV;
|
||||
$EnvNamespace = $args{EnvNamespace} || 'u';
|
||||
|
||||
my $reuseport = $args{ReusePort};
|
||||
$reuseport = 0 if (!defined($reuseport));
|
||||
@ -710,15 +712,26 @@ sub queryStateVariable {
|
||||
|
||||
my $result;
|
||||
if ($SOAP::Lite::VERSION >= 0.67) {
|
||||
if ($EnvNamespace eq '<undef>') {
|
||||
$result = SOAP::Lite
|
||||
->envprefix($EnvPrefix)
|
||||
->ns("u")
|
||||
->uri('urn:schemas-upnp-org:control-1-0')
|
||||
->proxy($self->controlURL)
|
||||
->call('QueryStateVariable' =>
|
||||
SOAP::Data->name('varName')
|
||||
->uri('urn:schemas-upnp-org:control-1-0')
|
||||
->value($name));
|
||||
} else {
|
||||
$result = SOAP::Lite
|
||||
->envprefix($EnvPrefix)
|
||||
->ns($EnvNamespace)
|
||||
->uri('urn:schemas-upnp-org:control-1-0')
|
||||
->proxy($self->controlURL)
|
||||
->call('QueryStateVariable' =>
|
||||
SOAP::Data->name('varName')
|
||||
->uri('urn:schemas-upnp-org:control-1-0')
|
||||
->value($name));
|
||||
}
|
||||
} else {
|
||||
$result = SOAP::Lite
|
||||
->envprefix($EnvPrefix)
|
||||
@ -882,10 +895,20 @@ sub new {
|
||||
my($class, $service) = @_;
|
||||
|
||||
if ($SOAP::Lite::VERSION >= 0.67) {
|
||||
if ($EnvNamespace eq '<undef>') {
|
||||
return bless {
|
||||
_service => $service,
|
||||
_proxy => SOAP::Lite->envprefix($EnvPrefix)->ns("u")->uri($service->serviceType)->proxy($service->controlURL),
|
||||
_proxy => SOAP::Lite->envprefix($EnvPrefix)
|
||||
->uri($service->serviceType)->proxy($service->controlURL),
|
||||
}, $class;
|
||||
} else {
|
||||
return bless {
|
||||
_service => $service,
|
||||
_proxy => SOAP::Lite->envprefix($EnvPrefix)
|
||||
->ns($EnvNamespace)
|
||||
->uri($service->serviceType)->proxy($service->controlURL),
|
||||
}, $class;
|
||||
}
|
||||
} else {
|
||||
return bless {
|
||||
_service => $service,
|
||||
|
Loading…
x
Reference in New Issue
Block a user