+++ /dev/null
-/***************************************************************************
-*
-* Copyright 2010,2011 BMW Car IT GmbH
-*
-*
-* Licensed 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
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-****************************************************************************/
-
-#ifndef _LAYERGROUPGETOPACITYCOMMAND_H_
-#define _LAYERGROUPGETOPACITYCOMMAND_H_
-
-#include "BaseCommandSynchronous.h"
-
-
-class LayergroupGetOpacityCommand : public BaseCommandSynchronous
-{
-public:
- LayergroupGetOpacityCommand(int id, double* returnOpacity);
- virtual ~LayergroupGetOpacityCommand() {}
-
- virtual ExecutionResult execute(ICommandExecutor* executor);
- virtual const std::string getString();
-
-private:
- const unsigned m_id;
- double* m_pReturnOpacity;
-
- // for unit testing
- template <typename id_type> friend class LayergroupGetOpacityCommandEqMatcherP;
-};
-
-
-#endif /* _LAYERGROUPGETOPACITYCOMMAND_H_ */
+++ /dev/null
-/***************************************************************************
-*
-* Copyright 2010,2011 BMW Car IT GmbH
-*
-*
-* Licensed 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
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-****************************************************************************/
-
-#ifndef _LAYERGROUPGETVISIBILITYCOMMAND_H_
-#define _LAYERGROUPGETVISIBILITYCOMMAND_H_
-
-#include "BaseCommandSynchronous.h"
-
-class LayergroupGetVisibilityCommand : public BaseCommandSynchronous
-{
-public:
- LayergroupGetVisibilityCommand(int id, bool* visibility);
- virtual ~LayergroupGetVisibilityCommand() {}
-
- virtual ExecutionResult execute(ICommandExecutor* executor);
- virtual const std::string getString();
-
-private:
- const unsigned m_id;
- bool* m_pVisibility;
-
- // for unit testing
- template <typename id_type> friend class LayergroupGetVisibilityCommandEqMatcherP;
-};
-
-
-#endif /* _LAYERGROUPGETVISIBILITYCOMMAND_H_ */
+++ /dev/null
-/***************************************************************************
-*
-* Copyright 2010,2011 BMW Car IT GmbH
-*
-*
-* Licensed 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
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-****************************************************************************/
-
-#ifndef _SURFACEGROUPGETOPACITYCOMMAND_H_
-#define _SURFACEGROUPGETOPACITYCOMMAND_H_
-
-#include "BaseCommandSynchronous.h"
-
-
-class SurfacegroupGetOpacityCommand : public BaseCommandSynchronous
-{
-public:
- SurfacegroupGetOpacityCommand(int id, double* returnOpacity);
- virtual ~SurfacegroupGetOpacityCommand() {}
-
- virtual ExecutionResult execute(ICommandExecutor* executor);
- virtual const std::string getString();
-
-private:
- const unsigned m_id;
- double* m_pReturnOpacity;
-
- // for unit testing
- template <typename id_type> friend class SurfacegroupGetOpacityCommandEqMatcherP;
-};
-
-
-#endif /* _SURFACEGROUPGETOPACITYCOMMAND_H_ */
+++ /dev/null
-/***************************************************************************
-*
-* Copyright 2010,2011 BMW Car IT GmbH
-*
-*
-* Licensed 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
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-****************************************************************************/
-
-#ifndef _SURFACEGROUPGETVISIBILITYCOMMAND_H_
-#define _SURFACEGROUPGETVISIBILITYCOMMAND_H_
-
-#include "BaseCommandSynchronous.h"
-
-class SurfacegroupGetVisibilityCommand : public BaseCommandSynchronous
-{
-public:
- SurfacegroupGetVisibilityCommand(int id, bool* visibility);
- virtual ~SurfacegroupGetVisibilityCommand() {}
-
- virtual ExecutionResult execute(ICommandExecutor* executor);
- virtual const std::string getString();
-
-private:
- const unsigned m_id;
- bool* m_pVisibility;
-
- // for unit testing
- template <typename id_type> friend class SurfacegroupGetVisibilityCommandEqMatcherP;
-};
-
-
-#endif /* _SURFACEGROUPGETVISIBILITYCOMMAND_H_ */
+++ /dev/null
-/***************************************************************************
-*
-* Copyright 2010,2011 BMW Car IT GmbH
-*
-*
-* Licensed 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
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-****************************************************************************/
-#include "LayergroupGetOpacityCommand.h"
-#include "ICommandExecutor.h"
-#include "Scene.h"
-#include "Log.h"
-
-LayergroupGetOpacityCommand::LayergroupGetOpacityCommand(int id, double* returnOpacity)
-: m_id(id)
-, m_pReturnOpacity(returnOpacity)
-{
-}
-
-ExecutionResult LayergroupGetOpacityCommand::execute(ICommandExecutor* executor)
-{
- Scene& scene = *(executor->getScene());
-
- ExecutionResult result = ExecutionFailed;
-
- LayerGroup* layergroup = scene.getLayerGroup(m_id);
-
- if (layergroup)
- {
- *m_pReturnOpacity = layergroup->getOpacity();
- result = ExecutionSuccess;
- }
-
- return result;
-}
-
-const std::string LayergroupGetOpacityCommand::getString()
-{
- std::stringstream description;
- description << "LayergroupGetOpacityCommand("
- << "id=" << m_id
- << ", pReturnOpacity=" << m_pReturnOpacity << "=" << *m_pReturnOpacity
- << ")";
- return description.str();
-}
-
+++ /dev/null
-/***************************************************************************
-*
-* Copyright 2010,2011 BMW Car IT GmbH
-*
-*
-* Licensed 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
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-****************************************************************************/
-#include "LayergroupGetVisibilityCommand.h"
-#include "ICommandExecutor.h"
-#include "Scene.h"
-#include "Log.h"
-
-LayergroupGetVisibilityCommand::LayergroupGetVisibilityCommand(int id, bool* visibility)
-: m_id(id)
-, m_pVisibility(visibility)
-{
-}
-
-ExecutionResult LayergroupGetVisibilityCommand::execute(ICommandExecutor* executor)
-{
- Scene& scene = *(executor->getScene());
-
- LOG_DEBUG("LayergroupGetVisibilityCommand", "start of");
-
- ExecutionResult result = ExecutionFailed;
-
- LayerGroup* layergroup = scene.getLayerGroup(m_id);
-
- if (layergroup)
- {
- *m_pVisibility = layergroup->getVisibility();
- LOG_DEBUG("LayergroupGetVisibilityCommand", "returned:" << *m_pVisibility);
- result = ExecutionSuccess;
- }
- return result;
-}
-
-const std::string LayergroupGetVisibilityCommand::getString()
-{
- std::stringstream description;
- description << "LayergroupGetVisibilityCommand("
- << "id=" << m_id
- << ", pVisibility=" << m_pVisibility << "=" << *m_pVisibility
- << ")";
- return description.str();
-}
+++ /dev/null
-/***************************************************************************
-*
-* Copyright 2010,2011 BMW Car IT GmbH
-*
-*
-* Licensed 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
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-****************************************************************************/
-#include "SurfacegroupGetOpacityCommand.h"
-#include "ICommandExecutor.h"
-#include "Scene.h"
-#include "Log.h"
-
-SurfacegroupGetOpacityCommand::SurfacegroupGetOpacityCommand(int id, double* returnOpacity)
-: m_id(id)
-, m_pReturnOpacity(returnOpacity)
-{
-}
-
-ExecutionResult SurfacegroupGetOpacityCommand::execute(ICommandExecutor* executor)
-{
- Scene& scene = *(executor->getScene());
-
- ExecutionResult result = ExecutionFailed;
-
- SurfaceGroup* surfacegroup = scene.getSurfaceGroup(m_id);
-
- if (surfacegroup)
- {
- *m_pReturnOpacity = surfacegroup->getOpacity();
- result = ExecutionSuccess;
- }
-
- return result;
-}
-
-const std::string SurfacegroupGetOpacityCommand::getString()
-{
- std::stringstream description;
- description << "SurfacegroupGetOpacityCommand("
- << "id=" << m_id
- << ", pReturnOpacity=" << m_pReturnOpacity << "=" << *m_pReturnOpacity
- << ")";
- return description.str();
-}
-
+++ /dev/null
-/***************************************************************************
-*
-* Copyright 2010,2011 BMW Car IT GmbH
-*
-*
-* Licensed 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
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-****************************************************************************/
-#include "SurfacegroupGetVisibilityCommand.h"
-#include "ICommandExecutor.h"
-#include "Scene.h"
-#include "Log.h"
-
-SurfacegroupGetVisibilityCommand::SurfacegroupGetVisibilityCommand(int id,bool* visibility)
-: m_id(id)
-, m_pVisibility(visibility)
-{
-}
-
-ExecutionResult SurfacegroupGetVisibilityCommand::execute(ICommandExecutor* executor)
-{
- Scene& scene = *(executor->getScene());
-
- LOG_DEBUG("SurfacegroupGetVisibilityCommand", "start of");
-
- ExecutionResult result = ExecutionFailed;
-
- SurfaceGroup* surfacegroup = scene.getSurfaceGroup(m_id);
-
- if (surfacegroup)
- {
- *m_pVisibility = surfacegroup->getVisibility();
- LOG_DEBUG("SurfacegroupGetVisibilityCommand", "returned:" << *m_pVisibility);
- result = ExecutionSuccess;
- }
- return result;
-}
-
-const std::string SurfacegroupGetVisibilityCommand::getString()
-{
- std::stringstream description;
- description << "SurfacegroupGetVisibilityCommand("
- << "id=" << m_id
- << ", pVisibility=" << m_pVisibility << "=" << *m_pVisibility
- << ")";
- return description.str();
-}
#include "LayerGetDimensionCommand.h"
#include "SurfaceGetOpacityCommand.h"
#include "LayerGetOpacityCommand.h"
-#include "SurfacegroupGetOpacityCommand.h"
-#include "LayergroupGetOpacityCommand.h"
#include "SurfaceGetPixelformatCommand.h"
#include "LayerGetVisibilityCommand.h"
-//#include "LayergroupGetVisibilityCommand.h"
#include "SurfaceGetVisibilityCommand.h"
-//#include "SurfacegroupGetVisibilityCommand.h"
#include "LayerAddSurfaceCommand.h"
#include "LayerRemoveSurfaceCommand.h"
#include "LayerRemoveCommand.h"
{ "SetLayergroupOpacity", "ud", "", &DBUSCommunicator::SetLayergroupOpacity },
{ "GetSurfaceOpacity", "u", "d", &DBUSCommunicator::GetSurfaceOpacity },
{ "GetLayerOpacity", "u", "d", &DBUSCommunicator::GetLayerOpacity },
- { "GetSurfacegroupOpacity", "u", "d", &DBUSCommunicator::GetSurfacegroupOpacity },
- { "GetLayergroupOpacity", "u", "d", &DBUSCommunicator::GetLayergroupOpacity },
{ "SetSurfaceOrientation", "uu", "", &DBUSCommunicator::SetSurfaceOrientation },
{ "GetSurfaceOrientation", "uu", "", &DBUSCommunicator::GetSurfaceOrientation },
{ "SetLayerOrientation", "uu", "", &DBUSCommunicator::SetLayerOrientation },
}
}
-void DBUSCommunicator::GetSurfacegroupOpacity(DBusConnection* conn, DBusMessage* msg)
-{
- (void)conn; // TODO: remove, only prevents warning
-
- g_pDbusMessage->initReceive(msg);
- uint id = g_pDbusMessage->getUInt();
- double param = 0.0;
-
- bool status = m_executor->execute(new SurfacegroupGetOpacityCommand(id, ¶m));
- if (status)
- {
- g_pDbusMessage->initReply(msg);
- g_pDbusMessage->appendDouble(param);
- g_pDbusMessage->closeReply();
- }
- else
- {
- g_pDbusMessage->ReplyError(msg, SERVICE_ERROR, RESSOURCE_NOT_FOUND);
- }
-}
-
-void DBUSCommunicator::GetLayergroupOpacity(DBusConnection* conn, DBusMessage* msg)
-{
- (void)conn; // TODO: remove, only prevents warning
-
- g_pDbusMessage->initReceive(msg);
- uint id = g_pDbusMessage->getUInt();
- double param = 0.0;
-
- bool status = m_executor->execute(new LayergroupGetOpacityCommand(id, ¶m));
- if (status)
- {
- g_pDbusMessage->initReply(msg);
- g_pDbusMessage->appendDouble(param);
- g_pDbusMessage->closeReply();
- }
- else
- {
- g_pDbusMessage->ReplyError(msg, SERVICE_ERROR, RESSOURCE_NOT_FOUND);
- }
-}
-
void DBUSCommunicator::SetSurfaceOrientation(DBusConnection* conn, DBusMessage* msg)
{
(void)conn; // TODO: remove, only prevents warning