package com.icontrols.service.control;

/**
 * This callback interface used by ILightControlService 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 ILightControlServiceCallback {

    /*
    * This is notifying async result for requests such as GET, POST
    * @param result_code 0-OK, 1-FAIL, 2-ERROR
    * @param result_data json format as string (eg.
    * {"tid":"3481704581734918",                                     // Transaction ID
    * "sn":"15ba3c25-8cdd-41f8-6f9e-fe49105dce0a",                  // Device UUID
    * "uri":"/light",                                               // Resource URI
    * "res_type":"GET",                                             // Response Type
    * "res_data":{"n":"Light Switch","value":false}}                // Response Data for each resource properties
    *)*/
    void onResultReceived(int result_code, String result_data);

}
