From ab42853558326fe4eed43de3936153eeb3fe87bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sun, 19 Oct 2008 13:17:29 +0000 Subject: [PATCH] * Cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28240 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/os/interface/Input.h | 51 +++++++++---------- headers/private/storage/AddOnMonitorHandler.h | 42 ++++++++------- 2 files changed, 49 insertions(+), 44 deletions(-) diff --git a/headers/os/interface/Input.h b/headers/os/interface/Input.h index 364e0f015d..9522e38378 100644 --- a/headers/os/interface/Input.h +++ b/headers/os/interface/Input.h @@ -1,12 +1,12 @@ /* - * Copyright (c) 2008, Haiku, Inc. + * Copyright 2008, Haiku, Inc. * Distributed under the terms of the MIT license. * */ - #ifndef _INPUT_H #define _INPUT_H + #include #include #include @@ -45,33 +45,32 @@ status_t watch_input_devices(BMessenger target, bool start); class BInputDevice { public: - ~BInputDevice(); + ~BInputDevice(); - const char* Name() const; - input_device_type Type() const; - bool IsRunning() const; + const char* Name() const; + input_device_type Type() const; + bool IsRunning() const; - status_t Start(); - status_t Stop(); - status_t Control(uint32 code, BMessage* message); - - static status_t Start(input_device_type type); - static status_t Stop(input_device_type type); - static status_t Control(input_device_type type, - uint32 code, + status_t Start(); + status_t Stop(); + status_t Control(uint32 code, BMessage* message); + + static status_t Start(input_device_type type); + static status_t Stop(input_device_type type); + static status_t Control(input_device_type type, uint32 code, BMessage* message); - -private: - friend BInputDevice* find_input_device(const char* name); - friend status_t get_input_devices(BList* list); - BInputDevice(); - void _SetNameAndType(const char* name, - input_device_type type); - - char* fName; - input_device_type fType; - uint32 _reserved[4]; +private: + friend BInputDevice* find_input_device(const char* name); + friend status_t get_input_devices(BList* list); + + BInputDevice(); + void _SetNameAndType(const char* name, + input_device_type type); + + char* fName; + input_device_type fType; + uint32 _reserved[4]; }; -#endif +#endif // _INPUT_H diff --git a/headers/private/storage/AddOnMonitorHandler.h b/headers/private/storage/AddOnMonitorHandler.h index 7eec157b91..52b2860e16 100644 --- a/headers/private/storage/AddOnMonitorHandler.h +++ b/headers/private/storage/AddOnMonitorHandler.h @@ -1,9 +1,15 @@ +/* + * Copyright 2004-2008, Haiku, Inc. All rights reserved. + * Distributed under the terms of the MIT License. + */ #ifndef _ADD_ON_MONITOR_HANDLER_H #define _ADD_ON_MONITOR_HANDLER_H #include + #include "NodeMonitorHandler.h" + namespace BPrivate { namespace Storage { @@ -19,33 +25,33 @@ struct add_on_directory_info { }; class AddOnMonitorHandler : public NodeMonitorHandler { -private: - typedef NodeMonitorHandler inherited; public: - AddOnMonitorHandler(const char * name = "AddOnMonitorHandler"); - virtual ~AddOnMonitorHandler(); + AddOnMonitorHandler(const char* name = NULL); + virtual ~AddOnMonitorHandler(); - virtual void MessageReceived(BMessage * msg); + virtual void MessageReceived(BMessage* msg); - // supply the add on directories here, in the order you want them checked - virtual status_t AddDirectory(const node_ref * nref); + // supply the add-on directories here, in the order you want them checked + virtual status_t AddDirectory(const node_ref* nref); protected: // hooks for subclass - virtual void AddOnCreated(const add_on_entry_info * entry_info); - virtual void AddOnEnabled(const add_on_entry_info * entry_info); - virtual void AddOnDisabled(const add_on_entry_info * entry_info); - virtual void AddOnRemoved(const add_on_entry_info * entry_info); + virtual void AddOnCreated(const add_on_entry_info* entryInfo); + virtual void AddOnEnabled(const add_on_entry_info* entryInfo); + virtual void AddOnDisabled(const add_on_entry_info* entryInfo); + virtual void AddOnRemoved(const add_on_entry_info* entryInfo); protected: - virtual void EntryCreated(const char *name, ino_t directory, - dev_t device, ino_t node); - virtual void EntryRemoved(ino_t directory, dev_t device, ino_t node); - virtual void EntryMoved(const char *name, ino_t from_directory, - ino_t to_directory, dev_t device, ino_t node); + virtual void EntryCreated(const char* name, ino_t directory, + dev_t device, ino_t node); + virtual void EntryRemoved(ino_t directory, dev_t device, ino_t node); + virtual void EntryMoved(const char* name, ino_t fromDirectory, + ino_t toDirectory, dev_t device, ino_t node); private: - void _HandlePulse(); + typedef NodeMonitorHandler inherited; + + void _HandlePulse(); std::list fDirectories; std::list fPendingEntries; @@ -58,4 +64,4 @@ private: using namespace BPrivate::Storage; -#endif // _ADD_ON_MONITOR_HANDLER_H +#endif // _ADD_ON_MONITOR_HANDLER_H