1/* 2 * Copyright (C) 2012 Google Inc. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 * use this file except in compliance with the License. You may obtain a copy of 6 * the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 * License for the specific language governing permissions and limitations under 14 * the License. 15 */ 16 17package com.googlecode.eyesfree.braille.display; 18 19import com.googlecode.eyesfree.braille.display.IBrailleServiceCallback; 20 21/** 22 * Interface for clients to talk to the braille display service. 23 */ 24interface IBrailleService { 25 /** 26 * Register a callback for the {@code callingApp} which will receive 27 * certain braille display related events. 28 */ 29 boolean registerCallback(in IBrailleServiceCallback callback); 30 31 /** 32 * Unregister a previously registered callback for the {@code callingApp}. 33 */ 34 oneway void unregisterCallback(in IBrailleServiceCallback callback); 35 36 /** 37 * Updates the main cells of the connected braille display 38 * with a given dot {@code pattern}. 39 * 40 * @return {@code true} on success and {@code false} otherwise. 41 */ 42 void displayDots(in byte[] patterns); 43} 44