Ticket #11858: 0001-Fix-style-issues-in-MediaAddonServer.patch

File 0001-Fix-style-issues-in-MediaAddonServer.patch, 2.5 KB (added by Barrett, 10 years ago)
  • src/servers/media_addon/MediaAddonServer.cpp

    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;  
    6767
    6868
    6969struct 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;
    7373
    74     NodeVector          active_flavors;
     74            NodeVector          active_flavors;
    7575
    76     BMediaAddOn*        addon;
    77         // if != NULL, need to call gDormantNodeManager->PutAddOn(id)
     76            // if != NULL, need to call gDormantNodeManager->PutAddOn(id)
     77            BMediaAddOn*        addon;
    7878};
    7979
    8080
    private:  
    126126
    127127class MediaAddonServer::MonitorHandler : public AddOnMonitorHandler {
    128128public:
    129                             MonitorHandler(MediaAddonServer* server);
     129                                MonitorHandler(MediaAddonServer* server);
    130130
    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);
    133133
    134134private:
    135     MediaAddonServer* fServer;
     135            MediaAddonServer*   fServer;
    136136};
    137137
    138138
    MediaAddonServer::ReadyToRun()  
    274274    AddHandler(fMonitorHandler);
    275275
    276276    BMessage pulse(B_PULSE);
     277    // the monitor handler needs a pulse to check if add-ons are ready
    277278    fPulseRunner = new BMessageRunner(fMonitorHandler, &pulse, 1000000LL);
    278         // the monitor handler needs a pulse to check if add-ons are ready
    279279
    280280    fMonitorHandler->AddAddOnDirectories("media");
    281281
    MediaAddonServer::MessageReceived(BMessage* message)  
    339339
    340340            PlayMediaFile(type, name);
    341341            message->SendReply((uint32)B_OK);
    342                 // TODO: don't know which reply is expected
     342            // TODO: don't know which reply is expected
    343343            return;
    344344        }
    345345
    MediaAddonServer::_AddOnAdded(const char* path, ino_t fileNode)  
    533533    AddOnInfo& info = found->second;
    534534
    535535    info.id = id;
    536     info.wants_autostart = false; // temporary default
     536    // temporary default
     537    info.wants_autostart = false;
    537538    info.flavor_count = 0;
    538539    info.addon = addon;
    539540