# Generated from the Telepathy spec
""" Copyright (C) 2005, 2006 Collabora Limited 
 Copyright (C) 2005, 2006 Nokia Corporation 
 Copyright (C) 2006 INdT 

This library 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 2.1 of the License, or (at your option) any later version.

This library 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
Library General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  
"""

import dbus.service


class ChannelInterfaceHold(dbus.service.Interface):
    """\
      THIS INTERFACE IS DEPRECATED AND SHOULD NOT BE USED. Hold functionality
        should be added to the StreamedMedia channel in due course.

      Interface for channels where members may put you on hold, or you may put
    members on hold. This usually only makes sense for channels where you are
    streaming media to or from the members. Hold is defined as requesting
    that you are not sent any media streams by another, so these states
    indicate whether or not you are sending and receiving media streams
    to each member of the channel.
    """

    def __init__(self):
        self._interfaces.add('org.freedesktop.Telepathy.Channel.Interface.Hold')

    @dbus.service.method('org.freedesktop.Telepathy.Channel.Interface.Hold', in_signature='u', out_signature='u')
    def GetHoldState(self, member):
        """
        Given a member of the channel, return their current hold state.
      
        """
        raise NotImplementedError
  
    @dbus.service.method('org.freedesktop.Telepathy.Channel.Interface.Hold', in_signature='ub', out_signature='')
    def RequestHold(self, member, hold):
        """
        Request that a certain member be put on hold (be instructed not to send
        any media streams to you) or be taken off hold. Success is indicated
        by the HoldStateChanged signal being emitted.
      
        """
        raise NotImplementedError
  
    @dbus.service.signal('org.freedesktop.Telepathy.Channel.Interface.Hold', signature='uu')
    def HoldStateChanged(self, member, state):
        """
        Emitted to indicate that the hold state (as defined in GetHoldState
        above) has changed for a member of this channel. This may occur as
        a consequence of you requesting a change with RequestHold, or the
        state changing as a result of a request from the remote member
        or another process.
      
        """
        pass
  