2010-05-27 18:48:27 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2010, Haiku, Inc. All Rights Reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _NOTIFICATION_H
|
|
|
|
#define _NOTIFICATION_H
|
|
|
|
|
2010-05-27 19:53:35 +04:00
|
|
|
|
2010-05-27 18:48:27 +04:00
|
|
|
#include <Entry.h>
|
|
|
|
|
2010-05-27 19:53:35 +04:00
|
|
|
|
|
|
|
class BBitmap;
|
|
|
|
class BList;
|
|
|
|
|
|
|
|
|
2010-05-27 18:48:27 +04:00
|
|
|
// notification types
|
|
|
|
enum notification_type {
|
|
|
|
B_INFORMATION_NOTIFICATION,
|
|
|
|
B_IMPORTANT_NOTIFICATION,
|
|
|
|
B_ERROR_NOTIFICATION,
|
|
|
|
B_PROGRESS_NOTIFICATION
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class BNotification {
|
|
|
|
public:
|
2010-05-27 19:53:35 +04:00
|
|
|
BNotification(notification_type type);
|
|
|
|
~BNotification();
|
2010-05-27 18:48:27 +04:00
|
|
|
|
2010-05-27 19:53:35 +04:00
|
|
|
notification_type Type() const;
|
2010-05-27 18:48:27 +04:00
|
|
|
|
2010-05-27 19:53:35 +04:00
|
|
|
const char* Application() const;
|
|
|
|
void SetApplication(const char* app);
|
2010-05-27 18:48:27 +04:00
|
|
|
|
2010-05-27 19:53:35 +04:00
|
|
|
const char* Title() const;
|
|
|
|
void SetTitle(const char* title);
|
2010-05-27 18:48:27 +04:00
|
|
|
|
2010-05-27 19:53:35 +04:00
|
|
|
const char* Content() const;
|
|
|
|
void SetContent(const char* content);
|
2010-05-27 18:48:27 +04:00
|
|
|
|
2010-05-27 19:53:35 +04:00
|
|
|
const char* MessageID() const;
|
|
|
|
void SetMessageID(const char* id);
|
2010-05-27 18:48:27 +04:00
|
|
|
|
2010-05-27 19:53:35 +04:00
|
|
|
float Progress() const;
|
|
|
|
void SetProgress(float progress);
|
2010-05-27 18:48:27 +04:00
|
|
|
|
2010-05-27 19:53:35 +04:00
|
|
|
const char* OnClickApp() const;
|
|
|
|
void SetOnClickApp(const char* app);
|
2010-05-27 18:48:27 +04:00
|
|
|
|
2010-05-27 19:53:35 +04:00
|
|
|
entry_ref* OnClickFile() const;
|
|
|
|
void SetOnClickFile(const entry_ref* file);
|
2010-05-27 18:48:27 +04:00
|
|
|
|
2010-05-27 19:53:35 +04:00
|
|
|
BList* OnClickRefs() const;
|
|
|
|
void AddOnClickRef(const entry_ref* ref);
|
2010-05-27 18:48:27 +04:00
|
|
|
|
2010-05-27 19:53:35 +04:00
|
|
|
BList* OnClickArgv() const;
|
|
|
|
void AddOnClickArg(const char* arg);
|
2010-05-27 18:48:27 +04:00
|
|
|
|
2010-05-27 19:53:35 +04:00
|
|
|
BBitmap* Icon() const;
|
|
|
|
void SetIcon(BBitmap* icon);
|
2010-05-27 18:48:27 +04:00
|
|
|
|
|
|
|
private:
|
2010-05-27 19:53:35 +04:00
|
|
|
notification_type fType;
|
|
|
|
char* fAppName;
|
|
|
|
char* fTitle;
|
|
|
|
char* fContent;
|
|
|
|
char* fID;
|
|
|
|
float fProgress;
|
|
|
|
char* fApp;
|
|
|
|
entry_ref* fFile;
|
|
|
|
BList* fRefs;
|
|
|
|
BList* fArgv;
|
|
|
|
BBitmap* fBitmap;
|
2010-05-27 18:48:27 +04:00
|
|
|
};
|
|
|
|
|
2010-05-27 19:53:35 +04:00
|
|
|
|
2010-05-27 18:48:27 +04:00
|
|
|
#endif // _NOTIFICATION_H
|