Ejemplo n.º 1
0
 public void listApps(final ServiceResponseListener<ListApps.Response> callback) {
   try {
     ServiceClient<ListApps.Request, ListApps.Response> listAppsClient =
         node.newServiceClient(resolver.resolve("list_apps"), "app_manager/ListApps");
     listAppsClient.call(new ListApps.Request(), callback);
   } catch (Throwable ex) {
     callback.onFailure(new RemoteException(ERROR_STATUS, ex.toString()));
   }
 }
Ejemplo n.º 2
0
 public void uninstallApp(
     final String appName, final ServiceResponseListener<UninstallApp.Response> callback) {
   try {
     ServiceClient<UninstallApp.Request, UninstallApp.Response> uninstallAppClient =
         node.newServiceClient(resolver.resolve("uninstall_app"), "app_manager/UninstallApp");
     UninstallApp.Request request = new UninstallApp.Request();
     request.name = appName;
     uninstallAppClient.call(request, callback);
   } catch (Throwable ex) {
     callback.onFailure(new RemoteException(ERROR_STATUS, ex.toString()));
   }
 }
Ejemplo n.º 3
0
 public void listExchangeApps(
     boolean remoteUpdate, final ServiceResponseListener<GetInstallationState.Response> callback) {
   try {
     ServiceClient<GetInstallationState.Request, GetInstallationState.Response> listAppsClient =
         node.newServiceClient(
             resolver.resolve("list_exchange_apps"), "app_manager/GetInstallationState");
     GetInstallationState.Request request = new GetInstallationState.Request();
     request.remote_update = remoteUpdate;
     listAppsClient.call(request, callback);
   } catch (Throwable ex) {
     callback.onFailure(new RemoteException(ERROR_STATUS, ex.toString()));
   }
 }
Ejemplo n.º 4
0
 public void getAppDetails(
     final String appName, final ServiceResponseListener<GetAppDetails.Response> callback) {
   try {
     ServiceClient<GetAppDetails.Request, GetAppDetails.Response> startAppClient =
         node.newServiceClient(resolver.resolve("get_app_details"), "app_manager/GetAppDetails");
     Log.i("AppManager", "Start app service client created");
     GetAppDetails.Request request = new GetAppDetails.Request();
     request.name = appName;
     startAppClient.call(request, callback);
     Log.i("AppManager", "Done call");
   } catch (Throwable ex) {
     Log.i("AppManager", "Get app details failed: " + ex.toString());
     callback.onFailure(new RemoteException(ERROR_STATUS, ex.toString()));
   }
 }