parameters: (is_server, class_name, indent, rpc)
return_statement: return  s
docstring: Returns a string for the prototype of an individual RPC.
docstring_summary: Returns a string for the prototype of an individual RPC.
docstring_tokens: Returns a string for the prototype of an individual RPC .
function: def FormatRpcPrototype(is_server, class_name, indent, rpc):
    """Returns a string for the prototype of an individual RPC."""
  
    def FormatArgs(is_output, args):
      """Returns a string containing the formatted arguments for an RPC."""
  
      def FormatArg(is_output, arg):
        """Returns a string containing a formatted argument to an RPC."""
        if is_output:
          suffix = '* '
        else:
          suffix = ' '
        s = ''
        type_info = types[arg[1]]
        if type_info[3]:
          s += 'nacl_abi_size_t%s%s, %s %s' % (suffix,
                                       CountName(arg[0]),
                                       type_info[1],
                                       arg[0])
        else:
          s += '%s%s%s' % (type_info[1], suffix, arg[0])
        return s
      s = ''
      for arg in args:
        s += ',\n    %s%s' % (indent, FormatArg(is_output, arg))
      return s
    if is_server:
      ret_type = 'void'
    else:
      ret_type = 'NaClSrpcError'
    s = '%s %s%s(\n' % (ret_type, class_name, rpc['name'])
    # Until SRPC uses RPC/Closure on the client side, these must be different.
    if is_server:
      s += '    %sNaClSrpcRpc* rpc,\n' % indent
      s += '    %sNaClSrpcClosure* done' % indent
    else:
      s += '    %sNaClSrpcChannel* channel' % indent
    s += '%s' % FormatArgs(False, rpc['inputs'])
    s += '%s' % FormatArgs(True, rpc['outputs'])
    s += ')'
    return  s
function_tokens: def FormatRpcPrototype ( is_server , class_name , indent , rpc ) : def FormatArgs ( is_output , args ) : """Returns a string containing the formatted arguments for an RPC.""" def FormatArg ( is_output , arg ) : """Returns a string containing a formatted argument to an RPC.""" if is_output : suffix = '* ' else : suffix = ' ' s = '' type_info = types [ arg [ 1 ] ] if type_info [ 3 ] : s += 'nacl_abi_size_t%s%s, %s %s' % ( suffix , CountName ( arg [ 0 ] ) , type_info [ 1 ] , arg [ 0 ] ) else : s += '%s%s%s' % ( type_info [ 1 ] , suffix , arg [ 0 ] ) return s s = '' for arg in args : s += ',\n    %s%s' % ( indent , FormatArg ( is_output , arg ) ) return s if is_server : ret_type = 'void' else : ret_type = 'NaClSrpcError' s = '%s %s%s(\n' % ( ret_type , class_name , rpc [ 'name' ] ) # Until SRPC uses RPC/Closure on the client side, these must be different. if is_server : s += '    %sNaClSrpcRpc* rpc,\n' % indent s += '    %sNaClSrpcClosure* done' % indent else : s += '    %sNaClSrpcChannel* channel' % indent s += '%s' % FormatArgs ( False , rpc [ 'inputs' ] ) s += '%s' % FormatArgs ( True , rpc [ 'outputs' ] ) s += ')' return s