X-Git-Url: http://git.maemo.org/git/?p=remotepc;a=blobdiff_plain;f=pcremote-server-desktop-60%2Fservices%2F.svn%2Ftext-base%2Fservice.py.svn-base;fp=pcremote-server-desktop-60%2Fservices%2F.svn%2Ftext-base%2Fservice.py.svn-base;h=0000000000000000000000000000000000000000;hp=b0143a0c61009b44144e372c4c07c33469306913;hb=8817fe99db4558f122bc61276b631d4a9283deee;hpb=8eeea3225c010dea378cdc71c4e91294e04a6e9c diff --git a/pcremote-server-desktop-60/services/.svn/text-base/service.py.svn-base b/pcremote-server-desktop-60/services/.svn/text-base/service.py.svn-base deleted file mode 100755 index b0143a0..0000000 --- a/pcremote-server-desktop-60/services/.svn/text-base/service.py.svn-base +++ /dev/null @@ -1,75 +0,0 @@ -# -*- coding: utf-8 -*- - -# **************************************************************************** -# Copyright (c) 2008 INdT/Fucapi. -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation, either version 3 of the License, 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 Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program. If not, see . -# -# ============================================================================ -# Project Name : PC Remote -# Author : Nilson Silva, Jonatas Isvi -# Email : fergus.mao@gmail.com, jonatas.nona@gmail.com -# Reviewer : Jônatas Isvi -# Email : -# Version : 1.0 -# Package : Main Application -# Description : Service Application -# ============================================================================ - -from ObjectServers import * - -class Service: - - """ Service - supports all services applications - """ - - def __init__(self): - self.mouse_srv = None - self.keyboard_srv = None - self.service = "" - - #Set the Service requested by the Service Manager - def set_service(self, command): - - self.service = command - - if self.service == 'Tablet': - self.mouse_srv = Mouse_Server() - self.keyboard_srv = KeyBoard_Server() - elif self.service == 'Slideshow': - self.mouse_srv = Mouse_Server() - self.keyboard_srv = KeyBoard_Server() - elif self.service == 'Player': - print "player service." - elif self.service == 'Torrent': - print "torrent service." - - #Returns the Service which is being executed - def get_service(self): - return self.service - - #Executes the action requested by the Service Manager - def execute(self, command): - - cmd = command.split(":") - - if cmd[0] == "Mouse": - self.mouse_srv.execute(cmd[1]) - elif cmd[0] == "Keyboard": - self.keyboard_srv.execute(cmd[1]) - - # clean all button and keys pressed - def clean_all(self): - self.mouse_srv.clean_up_mouse() - self.keyboard_srv.clean_up_keyboard()