Changes

Jump to: navigation, search

IPDL/Five minute example

811 bytes added, 17:45, 13 July 2009
no edit summary
Put this in the file <code>ipc/ipdl/test-harness/Test.ipdl</code>.
namespace mozilla {
namespace test {
sync protocol Test
{
send TellValues goto HAVE_VALUES;
};
} // namespace test
} // namespace mozilla
== Hook the IPDL file into our build system ==
Test.ipdl \
$(NULL)
 
== Create the C++ implementation stubs ==
 
* Run
ipc/ipdl/test-harness$ python ../ipdl.py -d /tmp Test.ipdl
* Open <code>/tmp/mozilla/test/TestProtocolParent.h</code>. Look for the text "Skeleton implementation of abstract actor class."
** copy the "Header file contents" into the file <code>ipc/ipdl/test-harness/TestParent.h</code>
** copy the "C++ file contents" into <code>ipc/ipdl/test-harness/TestParent.cpp</code>
** globally replace the text <code>ActorImpl</code> with <code>TestParent</code> in both files.
** set up namespaces as you wish. The checked-in example puts TestParent in the mozilla::test namespace.
* Repeat the above step for <code>TestProtocolChild.h</code> and <code>TestChild.(h, cpp)</code>
Confirm
699
edits

Navigation menu