plugin / com.github.shadowsocks.plugin / NativePluginProvider

NativePluginProvider

abstract class NativePluginProvider : ContentProvider

Base class for a native plugin provider. A native plugin provider offers read-only access to files that are required to run a plugin, such as binary files and other configuration files. To create a native plugin provider, extend this class, implement the abstract methods, and add it to your manifest like this:

Constructors

<init>

NativePluginProvider()

Base class for a native plugin provider. A native plugin provider offers read-only access to files that are required to run a plugin, such as binary files and other configuration files. To create a native plugin provider, extend this class, implement the abstract methods, and add it to your manifest like this:

Functions

call

open fun call(method: String, arg: String?, extras: Bundle?): Bundle?

delete

open fun delete(p0: Uri?, p1: String?, p2: Array<out String>?): Int

getExecutable

open fun getExecutable(): String

Returns executable entry absolute path. This is used if plugin is sharing UID with the host.

getType

open fun getType(p0: Uri?): String

insert

open fun insert(p0: Uri?, p1: ContentValues?): Uri

onCreate

open fun onCreate(): Boolean

openFile

abstract fun openFile(uri: Uri?): ParcelFileDescriptor
open fun openFile(uri: Uri?, mode: String?): ParcelFileDescriptor

populateFiles

abstract fun populateFiles(provider: PathProvider): Unit

Provide all files needed for native plugin.

query

open fun query(uri: Uri, projection: Array<out String>?, selection: String?, selectionArgs: Array<out String>?, sortOrder: String?): Cursor

update

open fun update(p0: Uri?, p1: ContentValues?, p2: String?, p3: Array<out String>?): Int