Skip to content

Commit

Permalink
Add _scproxy Python module (resolves #166)
Browse files Browse the repository at this point in the history
  • Loading branch information
LubosD committed Oct 6, 2016
1 parent 9dc2c94 commit 640a49e
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 35 deletions.
2 changes: 2 additions & 0 deletions etc/dylib.conf
Expand Up @@ -106,3 +106,5 @@ A=libIOKit.so
[AppKit.framework]
C=libAppKit.so

[SystemConfiguration.framework]
A=libSystemConfiguration.so
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Expand Up @@ -81,6 +81,7 @@ add_subdirectory(external/cfnetwork)
add_subdirectory(external/pcre)
add_subdirectory(external/sqlite)
add_subdirectory(CFF)
add_subdirectory(SystemConfiguration)
add_subdirectory(CoreServices)
add_subdirectory(ApplicationServices)
add_subdirectory(VideoDecodeAcceleration)
Expand Down
10 changes: 5 additions & 5 deletions src/SystemConfiguration/CMakeLists.txt
Expand Up @@ -5,25 +5,25 @@ if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

#if (NOT "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}" MATCHES ".*clang")
# message(FATAL_ERROR "Clang is the only supported compiler.")
#endif (NOT "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}" MATCHES ".*clang")

#configure_file(config.h.in config.h)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fblocks")

include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../util)
include_directories(${DARLING_TOP_DIRECTORY}/src/external/corefoundation/Headers)
include_directories(${CMAKE_BINARY_DIR}/src/external/corefoundation/Headers)
include_directories(${DARLING_TOP_DIRECTORY}/src/external/foundation/Headers)
include_directories(${DARLING_TOP_DIRECTORY}/basic-headers)

set(SystemConfiguration_SRCS
SCDynamicStoreCopySpecific.cpp
SCSchemaDefinitions.cpp
)

add_library(SystemConfiguration SHARED ${SystemConfiguration_SRCS})
target_link_libraries(SystemConfiguration -lgnustep-corebase)
target_link_libraries(SystemConfiguration CFF)

install(TARGETS SystemConfiguration DESTINATION "${CMAKE_INSTALL_LIBDIR}/darling")

8 changes: 4 additions & 4 deletions src/SystemConfiguration/SCDynamicStoreCopySpecific.cpp
Expand Up @@ -3,15 +3,15 @@
#include <stdlib.h>
#include <pwd.h>
#include <sys/utsname.h>
#include "log.h"
//#include "log.h"

#include <CoreFoundation/CFString.h>
#include <SystemConfiguration/SCDynamicStoreCopySpecific.h>

#define MAX_PASSENTRY_LENGTH 4096

CFStringRef SCDynamicStoreCopyComputerName (SCDynamicStoreRef store, CFStringEncoding *nameEncoding){
LOG << "fixme: SCDynamicStoreCopyComputerName() - stub" << std::endl;
//LOG << "fixme: SCDynamicStoreCopyComputerName() - stub" << std::endl;
return NULL;
}

Expand Down Expand Up @@ -43,12 +43,12 @@ CFStringRef SCDynamicStoreCopyLocalHostName (SCDynamicStoreRef store){
}

CFStringRef SCDynamicStoreCopyLocation (SCDynamicStoreRef store){
LOG << "fixme: SCDynamicStoreCopyLocation() - stub" << std::endl;
//LOG << "fixme: SCDynamicStoreCopyLocation() - stub" << std::endl;
return NULL;
}

CFDictionaryRef SCDynamicStoreCopyProxies (SCDynamicStoreRef store){
LOG << "fixme: SCDynamicStoreCopyComputerName() - stub" << std::endl;
//LOG << "fixme: SCDynamicStoreCopyComputerName() - stub" << std::endl;
/* No Proxy support yet */
return NULL;
}
54 changes: 29 additions & 25 deletions src/SystemConfiguration/SCSchemaDefinitions.cpp
@@ -1,28 +1,32 @@
#include "SCSchemaDefinitions.h"
#include "../CFF/CFStringConst.h"

const CFStringRef kSCPropNetProxiesExceptionsList = CFSTR("ExceptionsList");
const CFStringRef kSCPropNetProxiesExcludeSimpleHostnames = CFSTR("ExcludeSimpleHostnames");
const CFStringRef kSCPropNetProxiesFTPEnable = CFSTR("FTPEnable");
const CFStringRef kSCPropNetProxiesFTPPassive = CFSTR("FTPPassive");
const CFStringRef kSCPropNetProxiesFTPPort = CFSTR("FTPPort");
const CFStringRef kSCPropNetProxiesFTPProxy = CFSTR("FTPProxy");
const CFStringRef kSCPropNetProxiesGopherEnable = CFSTR("GopherEnable");
const CFStringRef kSCPropNetProxiesGopherPort = CFSTR("GopherPort");
const CFStringRef kSCPropNetProxiesGopherProxy = CFSTR("GopherProxy");
const CFStringRef kSCPropNetProxiesHTTPEnable = CFSTR("HTTPEnable");
const CFStringRef kSCPropNetProxiesHTTPPort = CFSTR("HTTPPort");
const CFStringRef kSCPropNetProxiesHTTPProxy = CFSTR("HTTPProxy");
const CFStringRef kSCPropNetProxiesHTTPSEnable = CFSTR("HTTPSEnable");
const CFStringRef kSCPropNetProxiesHTTPSPort = CFSTR("HTTPSPort");
const CFStringRef kSCPropNetProxiesHTTPSProxy = CFSTR("HTTPSProxy");
const CFStringRef kSCPropNetProxiesRTSPEnable = CFSTR("RTSPEnable");
const CFStringRef kSCPropNetProxiesRTSPPort = CFSTR("RTSPPort");
const CFStringRef kSCPropNetProxiesRTSPProxy = CFSTR("RTSPProxy");
const CFStringRef kSCPropNetProxiesSOCKSEnable = CFSTR("SOCKSEnable");
const CFStringRef kSCPropNetProxiesSOCKSPort = CFSTR("SOCKSPort");
const CFStringRef kSCPropNetProxiesSOCKSProxy = CFSTR("SOCKSProxy");
const CFStringRef kSCPropNetProxiesProxyAutoConfigEnable = CFSTR("ProxyAutoConfigEnable");
const CFStringRef kSCPropNetProxiesProxyAutoConfigJavaScript = CFSTR("ProxyAutoConfigJavaScript");
const CFStringRef kSCPropNetProxiesProxyAutoConfigURLString = CFSTR("ProxyAutoConfigURLString");
const CFStringRef kSCPropNetProxiesProxyAutoDiscoveryEnable = CFSTR("ProxyAutoDiscoveryEnable");
extern "C" {

CONST_STRING_DECL(kSCPropNetProxiesExceptionsList, "ExceptionsList");
CONST_STRING_DECL(kSCPropNetProxiesExcludeSimpleHostnames, "ExcludeSimpleHostnames");
CONST_STRING_DECL(kSCPropNetProxiesFTPEnable, "FTPEnable");
CONST_STRING_DECL(kSCPropNetProxiesFTPPassive, "FTPPassive");
CONST_STRING_DECL(kSCPropNetProxiesFTPPort, "FTPPort");
CONST_STRING_DECL(kSCPropNetProxiesFTPProxy, "FTPProxy");
CONST_STRING_DECL(kSCPropNetProxiesGopherEnable, "GopherEnable");
CONST_STRING_DECL(kSCPropNetProxiesGopherPort, "GopherPort");
CONST_STRING_DECL(kSCPropNetProxiesGopherProxy, "GopherProxy");
CONST_STRING_DECL(kSCPropNetProxiesHTTPEnable, "HTTPEnable");
CONST_STRING_DECL(kSCPropNetProxiesHTTPPort, "HTTPPort");
CONST_STRING_DECL(kSCPropNetProxiesHTTPProxy, "HTTPProxy");
CONST_STRING_DECL(kSCPropNetProxiesHTTPSEnable, "HTTPSEnable");
CONST_STRING_DECL(kSCPropNetProxiesHTTPSPort, "HTTPSPort");
CONST_STRING_DECL(kSCPropNetProxiesHTTPSProxy, "HTTPSProxy");
CONST_STRING_DECL(kSCPropNetProxiesRTSPEnable, "RTSPEnable");
CONST_STRING_DECL(kSCPropNetProxiesRTSPPort, "RTSPPort");
CONST_STRING_DECL(kSCPropNetProxiesRTSPProxy, "RTSPProxy");
CONST_STRING_DECL(kSCPropNetProxiesSOCKSEnable, "SOCKSEnable");
CONST_STRING_DECL(kSCPropNetProxiesSOCKSPort, "SOCKSPort");
CONST_STRING_DECL(kSCPropNetProxiesSOCKSProxy, "SOCKSProxy");
CONST_STRING_DECL(kSCPropNetProxiesProxyAutoConfigEnable, "ProxyAutoConfigEnable");
CONST_STRING_DECL(kSCPropNetProxiesProxyAutoConfigJavaScript, "ProxyAutoConfigJavaScript");
CONST_STRING_DECL(kSCPropNetProxiesProxyAutoConfigURLString, "ProxyAutoConfigURLString");
CONST_STRING_DECL(kSCPropNetProxiesProxyAutoDiscoveryEnable, "ProxyAutoDiscoveryEnable");

}
9 changes: 9 additions & 0 deletions src/SystemConfiguration/SystemConfiguration.h
@@ -0,0 +1,9 @@
#ifndef _SYSTEMCONFIGURATION_H
#define _SYSTEMCONFIGURATION_H

#include <SystemConfiguration/SCDynamicStoreCopySpecific.h>
#include <SystemConfiguration/SCDynamicStore.h>
#include <SystemConfiguration/SCSchemaDefinitions.h>

#endif

2 changes: 1 addition & 1 deletion src/external/python

0 comments on commit 640a49e

Please sign in to comment.