Skip to content

Commit

Permalink
[osx/ios] refactor includes and fix compiler warnings, someone really…
Browse files Browse the repository at this point in the history
… needs to learn the difference between local and system includes
  • Loading branch information
davilla committed May 15, 2012
1 parent 861d89f commit 0e511e9
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 14 deletions.
18 changes: 11 additions & 7 deletions xbmc/network/osx/ZeroconfBrowserOSX.cpp
Expand Up @@ -19,12 +19,14 @@
*
*/

#include "system.h"

#include "ZeroconfBrowserOSX.h"
#include <utils/log.h>
#include <threads/SingleLock.h>
#include <guilib/GUIWindowManager.h>
#include <guilib/GUIMessage.h>
#include <GUIUserMessages.h>
#include "GUIUserMessages.h"
#include "guilib/GUIWindowManager.h"
#include "guilib/GUIMessage.h"
#include "threads/SingleLock.h"
#include "utils/log.h"

#include <arpa/inet.h>
#include <netinet/in.h>
Expand Down Expand Up @@ -189,7 +191,8 @@ void CZeroconfBrowserOSX::BrowserCallback(CFNetServiceBrowserRef browser, CFOpti
}
} else
{
CLog::Log(LOGERROR, "CZeroconfBrowserOSX::BrowserCallback returned (domain = %d, error = %ld)\n", (int)error->domain, error->error);
CLog::Log(LOGERROR, "CZeroconfBrowserOSX::BrowserCallback returned"
"(domain = %d, error = %"PRId64")", (int)error->domain, (int64_t)error->error);
}
}

Expand Down Expand Up @@ -269,7 +272,8 @@ bool CZeroconfBrowserOSX::doAddServiceType(const CStdString& fcr_service_type)
CFNetServiceBrowserUnscheduleFromRunLoop(p_browser, m_runloop, kCFRunLoopCommonModes);
CFRelease(p_browser);
p_browser = NULL;
CLog::Log(LOGERROR, "CFNetServiceBrowserSearchForServices returned (domain = %d, error = %ld)\n", (int)error.domain, error.error);
CLog::Log(LOGERROR, "CFNetServiceBrowserSearchForServices returned"
"(domain = %d, error = %"PRId64")", (int)error.domain, (int64_t)error.error);
} else
{
//store the browser
Expand Down
12 changes: 8 additions & 4 deletions xbmc/network/osx/ZeroconfOSX.cpp
Expand Up @@ -19,12 +19,14 @@
*
*/

#include "system.h"

#include "ZeroconfOSX.h"
#include "threads/SingleLock.h"
#include "utils/log.h"

#include <string>
#include <sstream>
#include <threads/SingleLock.h>
#include <utils/log.h>

CZeroconfOSX::CZeroconfOSX():m_runloop(0)
{
Expand Down Expand Up @@ -102,7 +104,8 @@ bool CZeroconfOSX::doPublishService(const std::string& fcr_identifier,
CFNetServiceSetClient(netService, NULL, NULL);
CFRelease(netService);
netService = NULL;
CLog::Log(LOGERROR, "CZeroconfOSX::doPublishService CFNetServiceRegister returned (domain = %d, error = %ld)\n", (int)error.domain, error.error);
CLog::Log(LOGERROR, "CZeroconfOSX::doPublishService CFNetServiceRegister returned "
"(domain = %d, error = %"PRId64")", (int)error.domain, (int64_t)error.error);
} else
{
CSingleLock lock(m_data_guard);
Expand Down Expand Up @@ -144,7 +147,8 @@ void CZeroconfOSX::registerCallback(CFNetServiceRef theService, CFStreamError* e
CLog::Log(LOGERROR, "CZeroconfOSX::registerCallback name collision occured");
break;
default:
CLog::Log(LOGERROR, "CZeroconfOSX::registerCallback returned (domain = %d, error = %ld)\n", (int)error->domain, error->error);
CLog::Log(LOGERROR, "CZeroconfOSX::registerCallback returned "
"(domain = %d, error = %"PRId64")", (int)error->domain, (int64_t)error->error);
break;
}
p_this->cancelRegistration(theService);
Expand Down
7 changes: 4 additions & 3 deletions xbmc/network/osx/ZeroconfOSX.h
Expand Up @@ -21,16 +21,17 @@
*/

#include <memory>

#include "network/Zeroconf.h"
#include "threads/CriticalSection.h"

#include <CoreFoundation/CoreFoundation.h>
#if defined(TARGET_DARWIN_OSX)
#include <CoreServices/CoreServices.h>
#else
#include <CFNetwork/CFNetServices.h>
#endif

#include "network/Zeroconf.h"
#include "threads/CriticalSection.h"

class CZeroconfOSX : public CZeroconf
{
public:
Expand Down

0 comments on commit 0e511e9

Please sign in to comment.