2009-11-06 23:43:39 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
|
|
* vim: set ts=8 sw=4 et tw=80:
|
|
|
|
*
|
2012-05-21 15:12:37 +04:00
|
|
|
* 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/. */
|
2009-11-06 23:43:39 +03:00
|
|
|
|
2010-04-27 11:12:38 +04:00
|
|
|
include protocol PContextWrapper;
|
2009-11-06 23:43:39 +03:00
|
|
|
|
|
|
|
include "mozilla/jsipc/CPOWTypes.h";
|
|
|
|
|
2010-05-24 18:45:59 +04:00
|
|
|
using mozilla::void_t;
|
2009-11-06 23:43:39 +03:00
|
|
|
using JSType;
|
|
|
|
using JSBool;
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace jsipc {
|
|
|
|
|
|
|
|
union JSVariant {
|
|
|
|
void_t;
|
|
|
|
nullable PObjectWrapper;
|
|
|
|
nsString;
|
|
|
|
int;
|
|
|
|
double;
|
2012-02-11 06:07:35 +04:00
|
|
|
bool; // We'd like to use JSBool here, but IPC::ParamTraits would
|
|
|
|
// treat JSBool as int.
|
2009-11-06 23:43:39 +03:00
|
|
|
};
|
|
|
|
|
2010-01-22 23:52:57 +03:00
|
|
|
union OperationStatus {
|
|
|
|
JSBool;
|
|
|
|
JSVariant; // Exception thrown.
|
|
|
|
};
|
|
|
|
|
2009-11-06 23:43:39 +03:00
|
|
|
rpc protocol PObjectWrapper
|
|
|
|
{
|
|
|
|
manager PContextWrapper;
|
|
|
|
|
|
|
|
child:
|
|
|
|
__delete__(); // unroot
|
|
|
|
|
|
|
|
rpc AddProperty(nsString id)
|
2010-01-22 23:52:57 +03:00
|
|
|
returns (OperationStatus status);
|
2009-11-06 23:43:39 +03:00
|
|
|
|
|
|
|
rpc GetProperty(nsString id)
|
2010-01-22 23:52:57 +03:00
|
|
|
returns (OperationStatus status,
|
2009-11-06 23:43:39 +03:00
|
|
|
JSVariant vp);
|
|
|
|
|
|
|
|
rpc SetProperty(nsString id,
|
|
|
|
JSVariant v)
|
2010-01-22 23:52:57 +03:00
|
|
|
returns (OperationStatus status,
|
2009-11-06 23:43:39 +03:00
|
|
|
JSVariant vp);
|
|
|
|
|
|
|
|
rpc DelProperty(nsString id)
|
2010-01-22 23:52:57 +03:00
|
|
|
returns (OperationStatus status,
|
2009-11-06 23:43:39 +03:00
|
|
|
JSVariant vp);
|
|
|
|
|
|
|
|
rpc NewEnumerateInit()
|
2010-01-22 23:52:57 +03:00
|
|
|
returns (OperationStatus status,
|
2009-11-06 23:43:39 +03:00
|
|
|
JSVariant statep,
|
|
|
|
int idp);
|
|
|
|
|
|
|
|
rpc NewEnumerateNext(JSVariant in_state)
|
2010-01-22 23:52:57 +03:00
|
|
|
returns (OperationStatus status,
|
2009-11-06 23:43:39 +03:00
|
|
|
JSVariant statep,
|
|
|
|
nsString idp);
|
|
|
|
|
|
|
|
async NewEnumerateDestroy(JSVariant in_state);
|
|
|
|
|
|
|
|
rpc NewResolve(nsString id,
|
|
|
|
int flags)
|
2010-01-22 23:52:57 +03:00
|
|
|
returns (OperationStatus status,
|
2009-11-06 23:43:39 +03:00
|
|
|
nullable PObjectWrapper obj2);
|
|
|
|
|
|
|
|
rpc Convert(JSType type)
|
2010-01-22 23:52:57 +03:00
|
|
|
returns (OperationStatus status,
|
2009-11-06 23:43:39 +03:00
|
|
|
JSVariant vp);
|
|
|
|
|
|
|
|
rpc Call(PObjectWrapper receiver,
|
|
|
|
JSVariant[] argv)
|
2010-01-22 23:52:57 +03:00
|
|
|
returns (OperationStatus status,
|
2009-11-06 23:43:39 +03:00
|
|
|
JSVariant rval);
|
|
|
|
|
|
|
|
rpc Construct(JSVariant[] argv)
|
2010-01-22 23:52:57 +03:00
|
|
|
returns (OperationStatus status,
|
2009-11-06 23:43:39 +03:00
|
|
|
nullable PObjectWrapper rval);
|
|
|
|
|
|
|
|
rpc HasInstance(JSVariant v)
|
2010-01-22 23:52:57 +03:00
|
|
|
returns (OperationStatus status,
|
2009-11-06 23:43:39 +03:00
|
|
|
JSBool bp);
|
|
|
|
};
|
|
|
|
|
|
|
|
}}
|