To test protocol v2, the build tests are added.
Change-Id: I41bc494cfbc5bfa6e62135e148829c3bad9fc33b
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
BuildRequires: pkgconfig(cion)
BuildRequires: pkgconfig(capi-appfw-event)
BuildRequires: pkgconfig(capi-appfw-app-common)
+BuildRequires: pkgconfig(capi-appfw-app-manager)
+BuildRequires: pkgconfig(capi-appfw-package-manager)
%if 0%{?gcov:1}
BuildRequires: lcov
cion
capi-appfw-event
capi-appfw-app-common
+ capi-appfw-app-manager
+ capi-appfw-package-manager
)
FOREACH(flag ${PKGS_CFLAGS})
FILES[3]="DataPort"
FILES[4]="Foo"
+FILES_V2[0]="Message_v2"
+FILES_V2[1]="Buffer_v2"
+FILES_V2[2]="Ex_v2"
+FILES_V2[3]="DataPort_v2"
+FILES_V2[4]="Foo_v2"
+
FILES_CION[0]="Message"
FILES_CION[1]="Buffer"
FILES_CION[2]="ExCion"
${TIDLC} -s -n -l C -i ${SCRIPT_DIR}/tidl/${INPUT} -o ${TARGET_DIR}/${OUTPUT}
done
+ for index in ${!FILES_V2[*]}; do
+ echo "Generate ${FILES_V2[index]}"
+
+ INPUT="${FILES_V2[index]}.tidl"
+
+ OUTPUT="${FILES_V2[index]}ProxyC"
+ ${TIDLC} -p -n -l C -i ${SCRIPT_DIR}/tidl/${INPUT} -o ${TARGET_DIR}/${OUTPUT}
+
+ OUTPUT="${FILES_V2[index]}StubC"
+ ${TIDLC} -s -n -l C -i ${SCRIPT_DIR}/tidl/${INPUT} -o ${TARGET_DIR}/${OUTPUT}
+ done
+
for index in ${!FILES_FOR_GROUP[*]}; do
echo "Generate ${FILES_FOR_GROUP[index]}"
--- /dev/null
+protocol 2
+
+interface IRemoteBuffer {
+ void BufEvent(array<char> buf) delegate;
+
+ int GetFirst(string id, BufEvent ev, int max_size);
+ int GetNext(string id);
+}
--- /dev/null
+protocol 2
+
+struct CursorContext {
+ int Handle;
+ enum position {
+ LEFT,
+ RIGHT,
+ CENTER,
+ TOP,
+ BOTTOM,
+ }
+}
+
+struct Pair {
+ string Key;
+ string Value;
+}
+
+interface DataPort {
+ CursorContext Query(string uri, list<string> projection, string selection, list<string> selectionArgs, string sortOrder);
+ int Insert(string uri, list<Pair> values);
+ int Update(string uri, list<Pair> values, string selection, list<string> selectionArgs);
+ int Delete(string uri, string selection, list<string> selectionArgs);
+
+ bool CursorIsLast(CursorContext cxt);
+ bool CursorMoveToFirst(CursorContext cxt);
+ bool CursorMoveToNext(CursorContext cxt);
+ string CursorGetString(CursorContext cxt, int column);
+ void CursorDispose(CursorContext cxt) async;
+}
--- /dev/null
+protocol 2
+
+struct StructTest {
+ int Int;
+ short Short;
+ char Char;
+ bundle Bd;
+ bool Fg;
+ string Str;
+ float Float;
+ double Double;
+ long Long;
+}
+
+struct Student {
+ string name;
+ int num;
+ bundle data;
+ array<char> extra;
+}
+
+struct Class {
+ string name;
+ list<Student> students;
+}
+
+[privilege = "http://tizen.org/privilege/appmanager.launch", privilege = "http://tizen.org/privilege/mediastorage",
+trusted = "true"]
+interface School {
+ void ClassAddedCB(int ret) delegate;
+ int T1(out bool b);
+ int T2(out char c);
+ int T3(out int l);
+ int T4(ref bool b);
+ int T5(ref char c);
+ int T6(ref int l);
+ int T7(out string str);
+ int T8(ref string str);
+ int Test1(out StructTest st);
+ int Test2(StructTest st);
+ int Test3(ref StructTest st);
+ int Test4(out list<StructTest> st);
+ int Test5(list<StructTest> st);
+ int Test6(ref list<StructTest> st);
+ int Test7(string st);
+ [privilege = "http://tizen.org/privilege/appmanager.launch", privilege = "http://tizen.org/privilege/alarm.set"]
+ int Test8(bundle st);
+
+ /// <summary>
+ /// Add class
+ /// </summary>
+ int AddClass(in Class cls);
+
+ /// <summary>
+ /// Add class async
+ /// </summary>
+ void AddClassAsync(Class cls, ClassAddedCB cb) async;
+
+ int GetStudent(in string c_name, in string s_name, out Student student);
+ int SetAllIds(list<list<int>> nums);
+ int SetExtra(string s_name, array<char> extra);
+}
--- /dev/null
+protocol 2
+
+struct Foo {
+ int Age;
+ string Name;
+}
+
+interface Runnable {
+ int Run(Foo foo);
+ list<string> GetNames();
+}
--- /dev/null
+protocol 2
+
+struct Envelope {
+ map<string, int> string_map;
+ set<double> double_set;
+ list<string> string_list;
+ array<bundle> bundle_array;
+}
+
+interface Message {
+ void NotifyCB(string sender, string msg) delegate;
+
+ int Register(string name, NotifyCB cb);
+ void Unregister() async;
+ int Send(string msg);
+ [privilege = "http://tizen.org/privilege/alarm.set"]
+ int SendEnvelope(string name, map<string, Envelope> envelope_map);
+}