2009-07-13 22:12:50 -07:00
|
|
|
#include "mozilla/test/TestChild.h"
|
|
|
|
|
|
|
|
using mozilla::test::TestChild;
|
|
|
|
|
|
|
|
// C++ file contents
|
2009-07-17 21:00:01 -07:00
|
|
|
TestChild::TestChild()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
TestChild::~TestChild()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
#if 1
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// "Hello world" example
|
|
|
|
nsresult TestChild::RecvHello()
|
|
|
|
{
|
|
|
|
puts("[TestChild] Hello, ");
|
|
|
|
SendWorld();
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#elif 0
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// Example solution to exercise
|
2009-07-17 16:10:10 -07:00
|
|
|
nsresult TestChild::RecvPing()
|
2009-07-13 22:12:50 -07:00
|
|
|
{
|
2009-07-17 16:10:10 -07:00
|
|
|
return SendPong(42);
|
|
|
|
}
|
|
|
|
|
|
|
|
nsresult TestChild::RecvPong(const int& status)
|
|
|
|
{
|
|
|
|
return NS_ERROR_NOT_IMPLEMENTED;
|
2009-07-13 22:12:50 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
nsresult TestChild::RecvTellValue(
|
|
|
|
const String& key,
|
|
|
|
const String& val)
|
|
|
|
{
|
|
|
|
return NS_ERROR_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsresult TestChild::RecvTellValues(
|
|
|
|
const StringArray& keys,
|
|
|
|
const StringArray& vals)
|
|
|
|
{
|
|
|
|
return NS_ERROR_NOT_IMPLEMENTED;
|
|
|
|
}
|
2009-07-17 21:00:01 -07:00
|
|
|
#endif
|