gecko-dev/js/ipc/PObjectWrapper.ipdl

93 строки
2.2 KiB
Plaintext

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: set ts=8 sw=4 et tw=80:
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
include protocol PContextWrapper;
include "mozilla/jsipc/CPOWTypes.h";
using mozilla::void_t;
using JSType;
using JSBool;
namespace mozilla {
namespace jsipc {
union JSVariant {
void_t;
nullable PObjectWrapper;
nsString;
int;
double;
bool; // We'd like to use JSBool here, but IPC::ParamTraits would
// treat JSBool as int.
};
union OperationStatus {
JSBool;
JSVariant; // Exception thrown.
};
rpc protocol PObjectWrapper
{
manager PContextWrapper;
child:
__delete__(); // unroot
rpc AddProperty(nsString id)
returns (OperationStatus status);
rpc GetProperty(nsString id)
returns (OperationStatus status,
JSVariant vp);
rpc SetProperty(nsString id,
JSVariant v)
returns (OperationStatus status,
JSVariant vp);
rpc DelProperty(nsString id)
returns (OperationStatus status,
JSVariant vp);
rpc NewEnumerateInit()
returns (OperationStatus status,
JSVariant statep,
int idp);
rpc NewEnumerateNext(JSVariant in_state)
returns (OperationStatus status,
JSVariant statep,
nsString idp);
async NewEnumerateDestroy(JSVariant in_state);
rpc NewResolve(nsString id,
int flags)
returns (OperationStatus status,
nullable PObjectWrapper obj2);
rpc Convert(JSType type)
returns (OperationStatus status,
JSVariant vp);
rpc Call(PObjectWrapper receiver,
JSVariant[] argv)
returns (OperationStatus status,
JSVariant rval);
rpc Construct(JSVariant[] argv)
returns (OperationStatus status,
nullable PObjectWrapper rval);
rpc HasInstance(JSVariant v)
returns (OperationStatus status,
JSBool bp);
};
}}