You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

110 lines
3.6 KiB

pEpACIDLang {
include pEpACIDLang.yml2
package example {
version 1.0;
license "License text";
api api1 {
// deftype is used for two things:
// * create a type-alias for any type with optional
// properties to narrow the definition of the type.
// * instantiate a "generic type" into a (concrete) type
deftype deftype1 as size;
deftype deftype2 as string;
deftype stringlist as list<string>;
deftype stringlist2 as stringlist;
enum enum1 {
item item1 doc="item with automatic value";
item item2 23 doc="item with explicit decimal value";
item item3 "0xff"
doc=
"""
hex enum item
-------------
specify value in quotes
""";
};
struct struct1 {
field int int1;
field size size1 doc="short doc";
field string string1
doc="""
Multiline
Doc
""";
};
// Param Passing Modes
// * borrow
// * mborrow
// * claim
// * provide
method method1
brief="""
Send a ping message from the given from identity, fhdsajfghdjghkldhgsjhjhgjkdfslkghfhdsjklghkhkjfhsdkjlhgkdhskjh
which must be own,
to the given to identity.
"""
note="""
This automatically builds a message and sends it by calling
messageToSend on it; if messageToSend fails then its return
status is returned to the caller.
"""
{
param borrow struct1 param1
doc="session";
param mborrow struct1 param2
doc="""
This automatically builds a message and sends it by calling
messageToSend on it; if messageToSend fails then its return
status is returned to the caller. This automatically builds a message and sends it by calling
messageToSend on it; if messageToSend fails then its return
status is returned to the caller. This automatically builds a message and sends it by calling
messageToSend on it; if messageToSend fails then its return
status is returned to the caller.
""";
param claim struct1 param3;
param provide struct1 param4;
throws illegal_value
doc="""
This automatically builds a message and sends it by calling
messageToSend on it; if messageToSend fails then its return
status is returned to the caller.
""";
throws shrt_err
doc="""
This automatically builds a message and sends it by calling
messageToSend on it; if messageToSend fails then its return
status is returned to the caller.
""";
throws out_of_memory;
}
method method2 {
param mborrow struct1 param1;
}
method method3 {
param claim struct1 param1;
}
method method4 {
param provide struct1 param1;
}
};
};
};