| 1 |
namespace Dino.Plugins.NotificationSound { |
| 2 |
|
| 3 |
public class Plugin : RootInterface, Object { |
| 4 |
|
| 5 |
public Dino.Application app; |
| 6 |
private Canberra.Context sound_context; |
| 7 |
|
| 8 |
public void registered(Dino.Application app) { |
| 9 |
this.app = app; |
| 10 |
Canberra.Context.create(out sound_context); |
| 11 |
|
| 12 |
app.stream_interactor.get_module(NotificationEvents.IDENTITY).notify_content_item.connect((item, conversation) => { |
| 13 |
sound_context.play(0, Canberra.PROP_EVENT_ID, "message-new-instant", Canberra.PROP_EVENT_DESCRIPTION, "New Dino message"); |
| 14 |
}); |
| 15 |
} |
| 16 |
|
| 17 |
public void shutdown() { } |
| 18 |
} |
| 19 |
|
| 20 |
} |