Initial merge-commit of the OIC code. Should successfully do discovery for single...
[platform/upstream/iotivity.git] / csdk / android / UnitTests / src / com / oc / unittests / UnitTestControlItf.java
1 //******************************************************************
2 //
3 // Copyright 2014 Intel Corporation All Rights Reserved.
4 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
5
6 package com.oc.unittests;
7
8 import com.oc.OCObserver;
9 import com.oc.annotations.OCInterface;
10 import com.oc.annotations.OCProperty;
11
12 @OCInterface
13 public interface UnitTestControlItf {
14   /**
15    * APPLICATION NOTE: This is a synchronous request. It will throw immediately if the stack is down
16    * or the network is otherwise not available. It may throw if the remote side does not responds or
17    * returns an error.
18    * 
19    * @param state - The new state of this implemented interface.
20    */
21   @OCProperty(name = "UnitTestName")
22   void setState(boolean state);
23
24   /**
25    * APPLICATION NOTE: This is a synchronous request. It will throw immediately if the stack is down
26    * or the network is otherwise not available. It may throw is the remote side does not responds or
27    * returns an error.
28    * 
29    * @return Returns state of this implemented interface.
30    */
31   @OCProperty(name = "UnitTestName")
32   boolean isTrue();
33
34   /**
35    * APPLICATION NOTE: It is the objects responsibility to throw an exception if it cannot handle
36    * any additional observers which will in turn return an error to the requestor.
37    * 
38    * @param observer the observer that will be notified when a change to the state property has
39    *        occurred.
40    */
41   @OCProperty(name = "UnitTestName")
42   void addMyUnitTestObserver(OCObserver<Boolean> observer);
43 }