Skip to content

Commit

Permalink
[ofono] Add OemRaw to D-Bus access control framework. JB#49309
Browse files Browse the repository at this point in the history
Even though it's RIL specific, it makes sense to reuse the
existing access control mechanism.
  • Loading branch information
monich committed May 15, 2020
1 parent 22197b5 commit 1053577
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ofono/include/dbus-access.h
Expand Up @@ -40,6 +40,7 @@ enum ofono_dbus_access_intf {
OFONO_DBUS_ACCESS_INTF_MODEM, /* org.ofono.Modem */
OFONO_DBUS_ACCESS_INTF_RADIOSETTINGS, /* org.ofono.RadioSettings */
OFONO_DBUS_ACCESS_INTF_STK, /* org.ofono.SimToolkit */
OFONO_DBUS_ACCESS_INTF_OEMRAW, /* org.ofono.OemRaw */
OFONO_DBUS_ACCESS_INTF_COUNT
};

Expand Down Expand Up @@ -124,6 +125,12 @@ enum ofono_dbus_access_stk_method {
OFONO_DBUS_ACCESS_STK_METHOD_COUNT
};

/* OFONO_DBUS_ACCESS_INTF_OEMRAW */
enum ofono_dbus_access_oemraw_method {
OFONO_DBUS_ACCESS_OEMRAW_SEND,
OFONO_DBUS_ACCESS_OEMRAW_METHOD_COUNT
};

#define OFONO_DBUS_ACCESS_PRIORITY_LOW (-100)
#define OFONO_DBUS_ACCESS_PRIORITY_DEFAULT (0)
#define OFONO_DBUS_ACCESS_PRIORITY_HIGH (100)
Expand Down
10 changes: 10 additions & 0 deletions ofono/src/dbus-access.c
Expand Up @@ -44,6 +44,8 @@ const char *ofono_dbus_access_intf_name(enum ofono_dbus_access_intf intf)
return OFONO_RADIO_SETTINGS_INTERFACE;
case OFONO_DBUS_ACCESS_INTF_STK:
return OFONO_STK_INTERFACE;
case OFONO_DBUS_ACCESS_INTF_OEMRAW:
return "org.ofono.OemRaw";
case OFONO_DBUS_ACCESS_INTF_COUNT:
break;
}
Expand Down Expand Up @@ -176,6 +178,14 @@ const char *ofono_dbus_access_method_name(enum ofono_dbus_access_intf intf,
break;
}
break;
case OFONO_DBUS_ACCESS_INTF_OEMRAW:
switch ((enum ofono_dbus_access_oemraw_method)method) {
case OFONO_DBUS_ACCESS_OEMRAW_SEND:
return "Send";
case OFONO_DBUS_ACCESS_OEMRAW_METHOD_COUNT:
break;
}
break;
case OFONO_DBUS_ACCESS_INTF_COUNT:
break;
}
Expand Down

0 comments on commit 1053577

Please sign in to comment.