BridgeInterface.aidl (3030B) - raw


      1 package me.rhunk.snapenhance.bridge;
      2 
      3 import java.util.List;
      4 import me.rhunk.snapenhance.bridge.DownloadCallback;
      5 import me.rhunk.snapenhance.bridge.SyncCallback;
      6 import me.rhunk.snapenhance.bridge.scripting.IScripting;
      7 import me.rhunk.snapenhance.bridge.e2ee.E2eeInterface;
      8 import me.rhunk.snapenhance.bridge.logger.LoggerInterface;
      9 import me.rhunk.snapenhance.bridge.logger.TrackerInterface;
     10 import me.rhunk.snapenhance.bridge.ConfigStateListener;
     11 import me.rhunk.snapenhance.bridge.snapclient.MessagingBridge;
     12 import me.rhunk.snapenhance.bridge.AccountStorage;
     13 import me.rhunk.snapenhance.bridge.storage.FileHandleManager;
     14 import me.rhunk.snapenhance.bridge.location.LocationManager;
     15 
     16 interface BridgeInterface {
     17     /**
     18     * Get the SnapEnhance APK path (used in LSPatch updater and for auto bridge restart)
     19     */
     20     String getApplicationApkPath();
     21 
     22     /**
     23     * broadcast a log message
     24     */
     25     oneway void broadcastLog(String tag, String level, String message);
     26 
     27     /**
     28      * Enqueue a download
     29      */
     30     oneway void enqueueDownload(in Intent intent, DownloadCallback callback);
     31 
     32     /**
     33      * File conversation
     34      */
     35     @nullable ParcelFileDescriptor convertMedia(in ParcelFileDescriptor input, String inputExtension, String outputExtension, @nullable String audioCodec, @nullable String videoCodec);
     36 
     37     /**
     38     * Get rules for a given user or conversation
     39     * @return list of rules (MessagingRuleType)
     40     */
     41     List<String> getRules(String uuid);
     42 
     43     /**
     44     * Get all ids for a specific rule
     45     * @param type rule type (MessagingRuleType)
     46     * @return list of ids
     47     */
     48     List<String> getRuleIds(String type);
     49 
     50     /**
     51     * Update rule for a giver user or conversation
     52     *
     53     * @param type rule type (MessagingRuleType)
     54     */
     55     oneway void setRule(String uuid, String type, boolean state);
     56 
     57     /**
     58     * Sync groups and friends
     59     */
     60     oneway void sync(SyncCallback callback);
     61 
     62     /**
     63     * Trigger sync for an id
     64     */
     65     oneway void triggerSync(String scope, String id);
     66 
     67     /**
     68     * Pass all groups and friends to be able to add them to the database
     69     * @param groups list of groups (MessagingGroupInfo as parcelable)
     70     * @param friends list of friends (MessagingFriendInfo as parcelable)
     71     */
     72     oneway void passGroupsAndFriends(in List<String> groups, in List<String> friends);
     73 
     74     @nullable String getScopeNotes(String id);
     75 
     76     oneway void setScopeNotes(String id, String content);
     77 
     78     IScripting getScriptingInterface();
     79 
     80     E2eeInterface getE2eeInterface();
     81 
     82     LoggerInterface getLogger();
     83 
     84     TrackerInterface getTracker();
     85 
     86     AccountStorage getAccountStorage();
     87 
     88     FileHandleManager getFileHandleManager();
     89 
     90     LocationManager getLocationManager();
     91 
     92     oneway void registerMessagingBridge(MessagingBridge bridge);
     93 
     94     oneway void openOverlay(String type);
     95 
     96     oneway void closeOverlay();
     97 
     98     oneway void registerConfigStateListener(in ConfigStateListener listener);
     99 
    100     @nullable String getDebugProp(String key, @nullable String defaultValue);
    101 }