Vnc.py revision 12230
112697Santhony.gutierrez@amd.com# Copyright (c) 2010 ARM Limited
212697Santhony.gutierrez@amd.com# All rights reserved.
311308Santhony.gutierrez@amd.com#
412697Santhony.gutierrez@amd.com# The license below extends only to copyright in the software and shall
511308Santhony.gutierrez@amd.com# not be construed as granting a license to any other intellectual
612697Santhony.gutierrez@amd.com# property including but not limited to intellectual property relating
712697Santhony.gutierrez@amd.com# to a hardware implementation of the functionality of the software
811308Santhony.gutierrez@amd.com# licensed hereunder.  You may use the software subject to the license
912697Santhony.gutierrez@amd.com# terms below provided that you ensure that this notice is replicated
1012697Santhony.gutierrez@amd.com# unmodified and in its entirety in all distributions of the software,
1111308Santhony.gutierrez@amd.com# modified or unmodified, in source code or in binary form.
1212697Santhony.gutierrez@amd.com#
1312697Santhony.gutierrez@amd.com# Redistribution and use in source and binary forms, with or without
1412697Santhony.gutierrez@amd.com# modification, are permitted provided that the following conditions are
1511308Santhony.gutierrez@amd.com# met: redistributions of source code must retain the above copyright
1612697Santhony.gutierrez@amd.com# notice, this list of conditions and the following disclaimer;
1712697Santhony.gutierrez@amd.com# redistributions in binary form must reproduce the above copyright
1812697Santhony.gutierrez@amd.com# notice, this list of conditions and the following disclaimer in the
1911308Santhony.gutierrez@amd.com# documentation and/or other materials provided with the distribution;
2012697Santhony.gutierrez@amd.com# neither the name of the copyright holders nor the names of its
2112697Santhony.gutierrez@amd.com# contributors may be used to endorse or promote products derived from
2212697Santhony.gutierrez@amd.com# this software without specific prior written permission.
2312697Santhony.gutierrez@amd.com#
2412697Santhony.gutierrez@amd.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2512697Santhony.gutierrez@amd.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2612697Santhony.gutierrez@amd.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2712697Santhony.gutierrez@amd.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2812697Santhony.gutierrez@amd.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2912697Santhony.gutierrez@amd.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3012697Santhony.gutierrez@amd.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3111308Santhony.gutierrez@amd.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3212697Santhony.gutierrez@amd.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3311308Santhony.gutierrez@amd.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3411308Santhony.gutierrez@amd.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3511308Santhony.gutierrez@amd.com#
3611308Santhony.gutierrez@amd.com# Authors: William Wang
3711308Santhony.gutierrez@amd.com
3813400Sodanrc@yahoo.com.brfrom m5.SimObject import SimObject
3911308Santhony.gutierrez@amd.comfrom m5.params import *
4011308Santhony.gutierrez@amd.comfrom Graphics import *
4111308Santhony.gutierrez@amd.com
4213400Sodanrc@yahoo.com.br
4313400Sodanrc@yahoo.com.brclass VncInput(SimObject):
4411670Sandreas.hansson@arm.com    type = 'VncInput'
4511670Sandreas.hansson@arm.com    cxx_header = "base/vnc/vncinput.hh"
4611308Santhony.gutierrez@amd.com    frame_capture = Param.Bool(False, "capture changed frames to files")
4711308Santhony.gutierrez@amd.com    img_format = Param.ImageFormat(
4811308Santhony.gutierrez@amd.com        "Bitmap", "Format of the dumped Framebuffer"
4911308Santhony.gutierrez@amd.com    )
5011308Santhony.gutierrez@amd.com
5111308Santhony.gutierrez@amd.comclass VncServer(VncInput):
5211308Santhony.gutierrez@amd.com    type = 'VncServer'
5311308Santhony.gutierrez@amd.com    cxx_header = "base/vnc/vncserver.hh"
5411308Santhony.gutierrez@amd.com    port = Param.TcpPort(5900, "listen port")
5511308Santhony.gutierrez@amd.com    number = Param.Int(0, "vnc client number")
5611308Santhony.gutierrez@amd.com