package org.iotivity.bridge.homeserver;

/**
 * This callback interface used by IBridgeService to send
 * synchronous notifications back to its clients.  Note that this is a
 * one-way interface so the server does not block waiting for the client.
 */

interface IBridgeServiceCallback {

    /*
    * This is notifying async result for requests such as GET, OBSERVE, POST/PUT
    * @param result_code 0-OK, 1-FAIL, 2-ERROR
    * @param result_data json format as string (eg.
    * {"id":"ocf://15ba3c25-8cdd-41f8-6f9e-fe49105dce0a/light",
    * "di":"15ba3c25-8cdd-41f8-6f9e-fe49105dce0a",
    * "uri":"/light"
    * "res_type":"OBSERVE",
    * "res_data":{"n":"Light Switch","value":false}})
    */
    void onResultReceived(int result_code, String result_data);

}
