| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final String | |
| private static List | |
| private static Callback | |
| private static boolean | |
| private static final String | |
| private static Callback | |
| private static Callback | |
| private static Callback | |
| pack-priv static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static Object[] | convertGVariantToJava(long
a pointer to the native GVariant gVariant)Converts the given GVariant(s) to Java Object(s). |
| private static Object | |
| public static long | Returns: pointer GVariant *Converts the given Java Object to a GVariant * representation. |
| private static long | handleMethod(long
GDBusConnection connection, long const gchar sender, long const gchar object_path, long const gchar interface_name, long const gchar method_name, long GVariant gvar_parameters, long GDBusMethodInvocation invocation, long gpointer user_data)This is called when a client calls one of the GDBus methods. |
| public static void | init(GDBus.
GDBus methods that we should handle. methods,appName to append to GDBus object name if not null appName)Instantiate GDBus for use by SWT. |
| private static long | Returns: void. (No return value actually returned to OS. Just SWT mechanism dicates 'long' is returned.
|
| private static long | |
| private static long | |
| pack-priv static void |
| DBUS_OBJECT_NAME | back to summary |
|---|---|
| private static final String DBUS_OBJECT_NAME | |
| DBUS_SERVICE_NAME | back to summary |
|---|---|
| private static final String DBUS_SERVICE_NAME | |
| gdbusMethods | back to summary |
|---|---|
| private static List<GDBus. | |
| handleMethod | back to summary |
|---|---|
| private static Callback handleMethod | |
| initialized | back to summary |
|---|---|
| private static boolean initialized | |
| INTERFACE_NAME | back to summary |
|---|---|
| private static final String INTERFACE_NAME | |
| onBusAcquired | back to summary |
|---|---|
| private static Callback onBusAcquired | |
| onNameAcquired | back to summary |
|---|---|
| private static Callback onNameAcquired | |
| onNameLost | back to summary |
|---|---|
| private static Callback onNameLost | |
| SWT_GDBUS_VERSION_INFO | back to summary |
|---|---|
| pack-priv static final String SWT_GDBUS_VERSION_INFO | |
| GDBus | back to summary |
|---|---|
| public GDBus() | |
| convertGVariantToJava | back to summary |
|---|---|
| public static Object[] convertGVariantToJava(long gVariant) Converts the given GVariant(s) to Java Object(s). If GVariant is not an array, this returns an Object[] array with one element. Only subset of types is currently supported, add type(s) as/when you need them. For inspiration, see WebkitGDBus.java:convert..()
| |
| convertGVariantToJavaHelper | back to summary |
|---|---|
| private static Object convertGVariantToJavaHelper(long gVariant) | |
| convertJavaToGVariant | back to summary |
|---|---|
| public static long convertJavaToGVariant(Object javaObject) throws SWTException Converts the given Java Object to a GVariant * representation. (Only subset of types is currently supported). We assume that input Object may contain invalid types.
| |
| handleMethod | back to summary |
|---|---|
| private static long handleMethod(long connection, long sender, long object_path, long interface_name, long method_name, long gvar_parameters, long invocation, long user_data) This is called when a client calls one of the GDBus methods.
Developer note:
This method can be reached directly from GDBus cmd utility:
gdbus call --session --dest org.eclipse.swt --object-path /org/eclipse/swt --method org.eclipse.swt. GDBusConnection
const gchar
const gchar
const gchar
const gchar
GVariant
GDBusMethodInvocation
gpointer
| |
| init | back to summary |
|---|---|
| public static void init(GDBus. Instantiate GDBus for use by SWT. Note, a new SWT instance that runs this "Steals" the session bus, but upon termination it returns the session back to the previous owner. To make this more flexible we append appName (derived from the application executable but can be set with the command-line argument -name) to the session name.
| |
| onBusAcquired | back to summary |
|---|---|
private static long onBusAcquired(long gDBusConnection, long const_gchar_name, long user_data)
| |
| onNameAcquired | back to summary |
|---|---|
private static long onNameAcquired(long connection, long name, long user_data)
| |
| onNameLost | back to summary |
|---|---|
private static long onNameLost(long connection, long name, long user_data)
| |
| teardown_gdbus | back to summary |
|---|---|
| pack-priv static void teardown_gdbus() | |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final String | |
| private final Function |
| Access | Constructor and Description |
|---|---|
| public | GDBusMethod(String
of the method. It will be part of 'org.eclipse.swt.NAME' name, String[][] 2D array pair of Strings in the format of: (DBUS_TYPE_*, argument_name).
Where argument_name is only so that it's seen by command line by user. inputArgs, String[][] Same as inputArgs, but for returning values. outputArgs, Function<Object[], Object[]> A Function userFunction)Create a method that GDBus will listen to. |
| Modifier and Type | Method and Description |
|---|---|
| private String | |
| private String | |
| private Function |
| methodArgsXmlSignature | back to summary |
|---|---|
| private final String methodArgsXmlSignature | |
| name | back to summary |
|---|---|
| private final String name | |
| userFunction | back to summary |
|---|---|
| private final Function<Object[], Object[]> userFunction | |
| GDBusMethod | back to summary |
|---|---|
| public GDBusMethod(String name, String[][] inputArgs, String[][] outputArgs, Function<Object[], Object[]> userFunction) Create a method that GDBus will listen to.
| |
| getMethodArgsXmlSignature | back to summary |
|---|---|
| private String getMethodArgsXmlSignature() | |
| getName | back to summary |
|---|---|
| private String getName() | |
| getUserFunction | back to summary |
|---|---|
| private Function | |