haiku/headers/private/notification/AppUsage.h
Brian Hill 6aa0587222 Notifications preflet and notification_server
Notifications preflet:
-Use sliders instead of text fields for width and timeout
-Remove icon size choice (mini icon looks horrible)
-Consolidate both "Enable" checkboxes into one
-Fix Revert button, remove Apply button, add Defaults button
-All changes to settings saved immediately
-Live example notification message shown when settings changes are made
-Add setting for individual apps to specify whether their notifications
	should be muted
-Remove history list (to be implemented later)

BNotification class:
-BNotification records the signature and name of application that
	created it
-New functions to get source application signature and name

Notification Server:
-Notification pop up view layout fixes and bold font size fix
-Remove notifications history from AppUsage class (will be saved in
	cache instead)
-Remove vector of NotificationView objects which isn't needed
-Get source application info from notification object, not the received
	message which is not reliable
2017-09-23 11:41:33 -04:00

48 lines
1.2 KiB
C++

/*
* Copyright 2010-2017, Haiku, Inc. All Rights Reserved.
* Copyright 2008-2009, Pier Luigi Fiorini. All Rights Reserved.
* Copyright 2004-2008, Michael Davidson. All Rights Reserved.
* Copyright 2004-2007, Mikael Eiman. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _APP_USAGE_H
#define _APP_USAGE_H
#include <map>
#include <Entry.h>
#include <Flattenable.h>
#include <Notification.h>
#include <Roster.h>
#include <String.h>
class BMessage;
class AppUsage : public BFlattenable {
public:
AppUsage();
AppUsage(const char* name,
const char* signature,
bool allow = true);
virtual bool AllowsTypeCode(type_code code) const;
virtual status_t Flatten(void* buffer, ssize_t numBytes) const;
virtual ssize_t FlattenedSize() const;
virtual bool IsFixedSize() const;
virtual type_code TypeCode() const;
virtual status_t Unflatten(type_code code, const void* buffer,
ssize_t numBytes);
const char* AppName();
const char* Signature();
bool Allowed();
void SetAllowed(bool allow);
private:
BString fAppName;
BString fSignature;
bool fAllow;
};
#endif // _APP_USAGE_H