From 1af9266673bb0197815914a0bbea41ccc426fe12 Mon Sep 17 00:00:00 2001
From: Dario Casalinuovo <b.vitruvio@gmail.com>
Date: Mon, 2 Mar 2015 23:34:34 +0100
Subject: [PATCH 1/2] Fix style issues in MediaAddonServer
---
src/servers/media_addon/MediaAddonServer.cpp | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/src/servers/media_addon/MediaAddonServer.cpp b/src/servers/media_addon/MediaAddonServer.cpp
index 7a1244f..1ffec50 100644
a
|
b
|
typedef std::vector<media_node> NodeVector;
|
67 | 67 | |
68 | 68 | |
69 | 69 | struct AddOnInfo { |
70 | | media_addon_id id; |
71 | | bool wants_autostart; |
72 | | int32 flavor_count; |
| 70 | media_addon_id id; |
| 71 | bool wants_autostart; |
| 72 | int32 flavor_count; |
73 | 73 | |
74 | | NodeVector active_flavors; |
| 74 | NodeVector active_flavors; |
75 | 75 | |
76 | | BMediaAddOn* addon; |
77 | | // if != NULL, need to call gDormantNodeManager->PutAddOn(id) |
| 76 | // if != NULL, need to call gDormantNodeManager->PutAddOn(id) |
| 77 | BMediaAddOn* addon; |
78 | 78 | }; |
79 | 79 | |
80 | 80 | |
… |
… |
private:
|
126 | 126 | |
127 | 127 | class MediaAddonServer::MonitorHandler : public AddOnMonitorHandler { |
128 | 128 | public: |
129 | | MonitorHandler(MediaAddonServer* server); |
| 129 | MonitorHandler(MediaAddonServer* server); |
130 | 130 | |
131 | | virtual void AddOnEnabled(const add_on_entry_info* info); |
132 | | virtual void AddOnDisabled(const add_on_entry_info* info); |
| 131 | virtual void AddOnEnabled(const add_on_entry_info* info); |
| 132 | virtual void AddOnDisabled(const add_on_entry_info* info); |
133 | 133 | |
134 | 134 | private: |
135 | | MediaAddonServer* fServer; |
| 135 | MediaAddonServer* fServer; |
136 | 136 | }; |
137 | 137 | |
138 | 138 | |
… |
… |
MediaAddonServer::ReadyToRun()
|
274 | 274 | AddHandler(fMonitorHandler); |
275 | 275 | |
276 | 276 | BMessage pulse(B_PULSE); |
| 277 | // the monitor handler needs a pulse to check if add-ons are ready |
277 | 278 | fPulseRunner = new BMessageRunner(fMonitorHandler, &pulse, 1000000LL); |
278 | | // the monitor handler needs a pulse to check if add-ons are ready |
279 | 279 | |
280 | 280 | fMonitorHandler->AddAddOnDirectories("media"); |
281 | 281 | |
… |
… |
MediaAddonServer::MessageReceived(BMessage* message)
|
339 | 339 | |
340 | 340 | PlayMediaFile(type, name); |
341 | 341 | message->SendReply((uint32)B_OK); |
342 | | // TODO: don't know which reply is expected |
| 342 | // TODO: don't know which reply is expected |
343 | 343 | return; |
344 | 344 | } |
345 | 345 | |
… |
… |
MediaAddonServer::_AddOnAdded(const char* path, ino_t fileNode)
|
533 | 533 | AddOnInfo& info = found->second; |
534 | 534 | |
535 | 535 | info.id = id; |
536 | | info.wants_autostart = false; // temporary default |
| 536 | // temporary default |
| 537 | info.wants_autostart = false; |
537 | 538 | info.flavor_count = 0; |
538 | 539 | info.addon = addon; |
539 | 540 | |