<commit_before># Copyright (C) 2004 <NAME>
# This file is necessary to make this directory a package

from twisted.python.components import Interface

class ApplicationSIPInterface(Interface):
    """This interface describes the interface to the Application that
       the SIP layer uses.
    """

    def getPref(self, pref):
        """ Return a preference setting """

    def acceptCall(self, call):
        """ Setup a new call.
            Passed a sip.Call object.
            Returns a deferred - .callback() will be invoked if
            the call is to be accepted, or .errback() if the call is to be
            rejected.  The callback will return the callcookie - callcookie
            is a unique identifier used for all dealings with the Application
            in the future about this call.
        """

    def startCall(self, callcookie, oksdp, cb):
        """ Call setup is complete, the call is now live. 
            Passed the final SDP for the call, and a callback which should
            be invoked when the application wishes to terminate the call.
            The callback will be passed a reason for the call teardown.
        """

    def endCall(self, callcookie, reason):
        """ Other end has terminated the call. Reason is a string.
        """

    def ringBack(self):
        """ The other side sent a "180 Ringing".  This is purely informational 
            -- the app may wish to, for example, play a ringback sound to the 
            user.
        """

    def notifyEvent(self, event, eventArg):
        """ Notify the app that something interesting has happened. eventArg
            depends on the event.
            discoveredIP : local IP address (a string)
            discoveredStunnedIP : externally visible address (host, port)
        """

    def authCred(self, method, uri, realm, retry=False):
        """ Get auth credentials. Will return a deferred which when triggered
            will be passed either (username, password) or None (if no auth
            is available). retry means that the auth failed (so, for instance,
            the app should re-ask for auth credentials).
        """

    def getSDP(self, callcookie, otherSDP=None):
        """ Returns a shtoom.sdp.SDP instance for this call.
            if otherSDP is not None, do an intersection with it and return
            the result.
        """

    def debugMessage(self, message):
        """ Display a debugging message
        """

    def statusMessage(self, message):
        """ Display a status message. This should replace the previous 
            status message
        """

class ApplicationRTPInterface(Interface):
    """This interface describes the interface that an RTP implementation
       uses to talk to the Application instance
    """

    def incomingRTP(self, callcookie, payloadType, payloadData):<commit_msg>one more<commit_after># Copyright (C) 2004 <NAME>
# This file is necessary to make this directory a package

from twisted.python.components import Interface

class ApplicationSIPInterface(Interface):
    """This interface describes the interface to the Application that
       the SIP layer uses.
    """

    def getPref(self, pref):
        """ Return a preference setting """

    def acceptCall(self, call):
        """ Setup a new call.
            Passed a sip.Call object.
            Returns a deferred - .callback() will be invoked if
            the call is to be accepted, or .errback() if the call is to be
            rejected.  The callback will return the callcookie - callcookie
            is a unique identifier used for all dealings with the Application
            in the future about this call.
        """

    def startCall(self, callcookie, oksdp, cb):
        """ Call setup is complete, the call is now live. 
            Passed the final SDP for the call, and a callback which should
            be invoked when the application wishes to terminate the call.
            The callback will be passed a reason for the call teardown.
        """

    def endCall(self, callcookie, reason):
        """ Other end has terminated the call. Reason is a string.
        """

    def ringBack(self):
        """ The other side sent a "180 Ringing".  This is purely informational 
            -- the app may wish to, for example, play a ringback sound to the 
            user.
        """

    def notifyEvent(self, event, eventArg):
        """ Notify the app that something interesting has happened. eventArg
            depends on the event.
            discoveredIP : local IP address (a string)
            discoveredStunnedIP : externally visible address (host, port)
            registrationOK: a Registration object
        """

    def authCred(self, method, uri, realm, retry=False):
        """ Get auth credentials. Will return a deferred which when triggered
            will be passed either (username, password) or None (if no auth
            is available). retry means that the auth failed (so, for instance,
            the app should re-ask for auth credentials).
        """

    def getSDP(self, callcookie, otherSDP=None):
        """ Returns a shtoom.sdp.SDP instance for this call.
            if otherSDP is not None, do an intersection with it and return
            the result.
        """

    def debugMessage(self, message):
        """ Display a debugging message
        """

    def statusMessage(self, message):
        """ Display a status message. This should replace the previous 
            status message
        """

class ApplicationRTPInterface(Interface):
    """This interface describes the interface that an RTP implementation
       uses to talk to the Application instance
    """

    def incomingRTP(self, callcookie, payloadType, payloadData):
{'fraction_non_alphanumeric': 0.07010559113726848, 'fraction_numerical': 0.0024234031504240957, 'mean_word_length': 2.268099547511312, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4299310', 'n_tokens_mistral': 1403, 'n_tokens_neox': 1349, 'n_words': 664}