Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [DBus (name="org.freedesktop.Notifications")]
- public class NotifyServer : Object {
- public NotifyServer() {
- }
- public uint32 Notify(string app_name, uint32 replaces_id, string app_icon, string summary, string body, string[] actions, HashTable<string, Variant> hints, int32 expire_timeout) {
- return 0;
- }
- }
- int main(string[] args) {
- Bus.own_name(
- BusType.SESSION,
- "org.freedesktop.Notifications",
- BusNameOwnerFlags.NONE,
- (connection) => {
- try {
- connection.register_object("/org/freedesktop/Notifications", new NotifyServer());
- } catch (Error e) {
- warning(e.message);
- }
- },
- () => {},
- (connection, name) => {warning("Unable to acquire bus %s", name);}
- );
- new MainLoop().run();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement