From d92c6b3535c9054c0bfa1b24a9b2e556aa0929a3 Mon Sep 17 00:00:00 2001 From: longbai Date: Wed, 24 Jun 2015 11:04:27 +0800 Subject: [PATCH] init --- .gitignore | 13 +- .travis.yml | 10 + CHANGELOG.md | 9 + Contributing.md | 32 + HappyDNS.podspec | 40 + HappyDNS.xcodeproj/project.pbxproj | 865 ++++++++++++++++++ HappyDNS.xcworkspace/contents.xcworkspacedata | 10 + HappyDNS/Common/QNDnsManager.h | 13 + HappyDNS/Common/QNDnsManager.m | 15 + HappyDNS/Common/QNDomain.h | 13 + HappyDNS/Common/QNDomain.m | 13 + HappyDNS/Common/QNRecord.h | 13 + HappyDNS/Common/QNRecord.m | 13 + HappyDNS/Common/QNResolverDelegate.h | 14 + HappyDNS/Common/abc | 0 HappyDNS/HappyDNS.h | 13 + HappyDNS/HappyDNS.m | 13 + HappyDNS/Http/QNDnspodFree.h | 14 + HappyDNS/Http/QNDnspodFree.m | 15 + HappyDNS/Local/QNDnsMessage.h | 16 + HappyDNS/Local/QNDnsMessage.m | 19 + HappyDNS/Local/QNHosts.h | 14 + HappyDNS/Local/QNHosts.m | 15 + HappyDNS/Local/QNResolver.h | 15 + HappyDNS/Local/QNResolver.m | 40 + HappyDNS/Local/QNSystemDnsServer.h | 15 + HappyDNS/Local/QNSystemDnsServer.m | 34 + HappyDNSTests/Info.plist | 24 + HappyDNSTests/QNSystemDnsTest.m | 33 + LICENSE | 2 +- Podfile | 11 + README.md | 63 ++ 32 files changed, 1427 insertions(+), 2 deletions(-) create mode 100644 .travis.yml create mode 100644 CHANGELOG.md create mode 100644 Contributing.md create mode 100644 HappyDNS.podspec create mode 100644 HappyDNS.xcodeproj/project.pbxproj create mode 100644 HappyDNS.xcworkspace/contents.xcworkspacedata create mode 100644 HappyDNS/Common/QNDnsManager.h create mode 100644 HappyDNS/Common/QNDnsManager.m create mode 100644 HappyDNS/Common/QNDomain.h create mode 100644 HappyDNS/Common/QNDomain.m create mode 100644 HappyDNS/Common/QNRecord.h create mode 100644 HappyDNS/Common/QNRecord.m create mode 100644 HappyDNS/Common/QNResolverDelegate.h create mode 100644 HappyDNS/Common/abc create mode 100644 HappyDNS/HappyDNS.h create mode 100644 HappyDNS/HappyDNS.m create mode 100644 HappyDNS/Http/QNDnspodFree.h create mode 100644 HappyDNS/Http/QNDnspodFree.m create mode 100644 HappyDNS/Local/QNDnsMessage.h create mode 100644 HappyDNS/Local/QNDnsMessage.m create mode 100644 HappyDNS/Local/QNHosts.h create mode 100644 HappyDNS/Local/QNHosts.m create mode 100644 HappyDNS/Local/QNResolver.h create mode 100644 HappyDNS/Local/QNResolver.m create mode 100644 HappyDNS/Local/QNSystemDnsServer.h create mode 100644 HappyDNS/Local/QNSystemDnsServer.m create mode 100644 HappyDNSTests/Info.plist create mode 100644 HappyDNSTests/QNSystemDnsTest.m create mode 100644 Podfile create mode 100644 README.md diff --git a/.gitignore b/.gitignore index c964cd8..7f447bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# System +.DS_Store + # Xcode # build/ @@ -17,10 +20,18 @@ DerivedData *.ipa *.xcuserstate + +# Subversion +.svn + +# AppCode +.idea + # CocoaPods # # We recommend against adding the Pods directory to your .gitignore. However # you should judge for yourself, the pros and cons are mentioned at: # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control # -#Pods/ +Pods/ +Podfile.lock diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..89ac53f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,10 @@ +language: objective-c +before_install: +# - brew update +# - brew upgrade xctool + - gem install cocoapods +before_script: + - export QINIU_TEST_ENV="travis" +script: + - xctool -workspace HappyDNS.xcworkspace -scheme "HappyDNS iOS" -sdk iphonesimulator -configuration Release test -test-sdk iphonesimulator7.0 -freshInstall -freshSimulator + - xctool -workspace HappyDNS.xcworkspace -scheme "HappyDNS Mac" -sdk macosx -configuration Release test -test-sdk macosx diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..6306fd2 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +#Changelog + +## 0.0.1 (2015-06-21) + +### 增加 +* localdns +* httpdns + + diff --git a/Contributing.md b/Contributing.md new file mode 100644 index 0000000..be09d49 --- /dev/null +++ b/Contributing.md @@ -0,0 +1,32 @@ +# 贡献代码指南 + +我们非常欢迎大家来贡献代码,我们会向贡献者致以最诚挚的敬意。 + +一般可以通过在Github上提交[Pull Request](https://github.com/qiniu/happy-dns-objc)来贡献代码。 + +## Pull Request要求 + +- **代码规范** 参考 https://github.com/NYTimes/objective-c-style-guide。 + +- **代码格式** 提交前请使用Xcode格式化插件 BBUncrustifyPlugin 默认风格进行格式化。 + +- **必须添加测试!** - 如果没有测试(单元测试、集成测试都可以),那么提交的补丁是不会通过的。 + +- **记得更新文档** - 保证`README.md`以及其他相关文档及时更新,和代码的变更保持一致性。 + +- **考虑我们的发布周期** - 我们的版本号会服从[SemVer v2.0.0](http://semver.org/),我们绝对不会随意变更对外的API。 + +- **创建feature分支** - 最好不要从你的master分支提交 pull request。 + +- **一个feature提交一个pull请求** - 如果你的代码变更了多个操作,那就提交多个pull请求吧。 + +- **清晰的commit历史** - 保证你的pull请求的每次commit操作都是有意义的。如果你开发中需要执行多次的即时commit操作,那么请把它们放到一起再提交pull请求。 + +## 运行测试 + +``` bash +$ xctool -workspace HappyDNS.xcworkspace -scheme "HappyDNS iOS" -sdk iphonesimulator -configuration Release test -test-sdk iphonesimulator7.0 -freshInstall -freshSimulator +$ xctool -workspace HappyDNS.xcworkspace -scheme "HappyDNS Mac" -sdk macosx -configuration Release test -test-sdk macosx + + +``` diff --git a/HappyDNS.podspec b/HappyDNS.podspec new file mode 100644 index 0000000..16d80c9 --- /dev/null +++ b/HappyDNS.podspec @@ -0,0 +1,40 @@ +Pod::Spec.new do |s| + s.name = 'HappyDNS' + s.version = '0.0.1' + s.summary = 'DNS library for iOS and Mac' + s.homepage = 'https://github.com/qiniu/happy-dns-objc' + s.social_media_url = 'http://weibo.com/qiniutek' + s.author = 'Qiniu => sdk@qiniu.com' + s.source = {:git => 'https://github.com/qiniu/happy-dns-objc.git', :tag => "v#{s.version}"} + + s.ios.deployment_target = '6.0' + s.osx.deployment_target = '10.8' + + s.source_files = 'HappyDNS/**/*.{h,m}' + s.requires_arc = true + s.license = { :type => 'MIT', :text => <<-LICENSE +The MIT License (MIT) + +Copyright (c) 2012-2015 qiniu.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + LICENSE + } + +end diff --git a/HappyDNS.xcodeproj/project.pbxproj b/HappyDNS.xcodeproj/project.pbxproj new file mode 100644 index 0000000..60bfb38 --- /dev/null +++ b/HappyDNS.xcodeproj/project.pbxproj @@ -0,0 +1,865 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 6B6090D36D2ECCD34FCE6DAE /* libPods-HappyDNS_iOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B7A5E527D9CF80E564A69D85 /* libPods-HappyDNS_iOSTests.a */; }; + 71FB87ACF7AF0163E3F8AF2F /* libPods-HappyDNS_MacTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 04A4DFEA159C0945AFABEA3A /* libPods-HappyDNS_MacTests.a */; }; + DF22C0C31B37B9B90010FEBF /* HappyDNS.h in Headers */ = {isa = PBXBuildFile; fileRef = DF22C0C21B37B9B90010FEBF /* HappyDNS.h */; }; + DF22C0CB1B37B9B90010FEBF /* libHappyDNS.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = DF22C0BF1B37B9B90010FEBF /* libHappyDNS.dylib */; }; + DF801F641B396D5100866FDE /* QNRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = DF801F621B396D5100866FDE /* QNRecord.h */; }; + DF801F651B396D5100866FDE /* QNRecord.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F631B396D5100866FDE /* QNRecord.m */; }; + DF801F661B396D5100866FDE /* QNRecord.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F631B396D5100866FDE /* QNRecord.m */; }; + DF801F691B396DA000866FDE /* QNDnsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = DF801F671B396DA000866FDE /* QNDnsManager.h */; }; + DF801F6A1B396DA000866FDE /* QNDnsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F681B396DA000866FDE /* QNDnsManager.m */; }; + DF801F6B1B396DA000866FDE /* QNDnsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F681B396DA000866FDE /* QNDnsManager.m */; }; + DF801F6E1B396E1000866FDE /* QNSystemDnsServer.h in Headers */ = {isa = PBXBuildFile; fileRef = DF801F6C1B396E1000866FDE /* QNSystemDnsServer.h */; }; + DF801F6F1B396E1000866FDE /* QNSystemDnsServer.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F6D1B396E1000866FDE /* QNSystemDnsServer.m */; }; + DF801F701B396E1000866FDE /* QNSystemDnsServer.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F6D1B396E1000866FDE /* QNSystemDnsServer.m */; }; + DF801F731B396E3C00866FDE /* QNResolver.h in Headers */ = {isa = PBXBuildFile; fileRef = DF801F711B396E3C00866FDE /* QNResolver.h */; }; + DF801F741B396E3C00866FDE /* QNResolver.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F721B396E3C00866FDE /* QNResolver.m */; }; + DF801F751B396E3C00866FDE /* QNResolver.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F721B396E3C00866FDE /* QNResolver.m */; }; + DF801F781B396E5D00866FDE /* QNDnsMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = DF801F761B396E5D00866FDE /* QNDnsMessage.h */; }; + DF801F791B396E5D00866FDE /* QNDnsMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F771B396E5D00866FDE /* QNDnsMessage.m */; }; + DF801F7A1B396E5D00866FDE /* QNDnsMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F771B396E5D00866FDE /* QNDnsMessage.m */; }; + DF801F7D1B396E7600866FDE /* QNDnspodFree.h in Headers */ = {isa = PBXBuildFile; fileRef = DF801F7B1B396E7600866FDE /* QNDnspodFree.h */; }; + DF801F7E1B396E7600866FDE /* QNDnspodFree.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F7C1B396E7600866FDE /* QNDnspodFree.m */; }; + DF801F7F1B396E7600866FDE /* QNDnspodFree.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F7C1B396E7600866FDE /* QNDnspodFree.m */; }; + DF801F821B396E9A00866FDE /* QNHosts.h in Headers */ = {isa = PBXBuildFile; fileRef = DF801F801B396E9A00866FDE /* QNHosts.h */; }; + DF801F831B396E9A00866FDE /* QNHosts.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F811B396E9A00866FDE /* QNHosts.m */; }; + DF801F841B396E9A00866FDE /* QNHosts.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F811B396E9A00866FDE /* QNHosts.m */; }; + DF801F871B396F5500866FDE /* QNResolverDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = DF801F851B396F5500866FDE /* QNResolverDelegate.h */; }; + DF801F8C1B39743200866FDE /* QNDomain.h in Headers */ = {isa = PBXBuildFile; fileRef = DF801F8A1B39743200866FDE /* QNDomain.h */; }; + DF801F8D1B39743200866FDE /* QNDomain.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F8B1B39743200866FDE /* QNDomain.m */; }; + DF801F8E1B39743200866FDE /* QNDomain.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F8B1B39743200866FDE /* QNDomain.m */; }; + DF801F901B3A378900866FDE /* QNSystemDnsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F8F1B3A378900866FDE /* QNSystemDnsTest.m */; }; + DF801F981B3A4F4D00866FDE /* HappyDNS.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DF801F971B3A4F4D00866FDE /* HappyDNS.h */; }; + DF801F9A1B3A4F4D00866FDE /* HappyDNS.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F991B3A4F4D00866FDE /* HappyDNS.m */; }; + DF801FA01B3A4F4D00866FDE /* libHappyDNS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DF801F951B3A4F4D00866FDE /* libHappyDNS.a */; }; + DF801FAC1B3A502E00866FDE /* QNSystemDnsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F8F1B3A378900866FDE /* QNSystemDnsTest.m */; }; + DF801FAD1B3A503700866FDE /* QNSystemDnsServer.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F6D1B396E1000866FDE /* QNSystemDnsServer.m */; }; + DF801FAE1B3A537800866FDE /* QNDnsManager.h in Sources */ = {isa = PBXBuildFile; fileRef = DF801F671B396DA000866FDE /* QNDnsManager.h */; }; + DF801FAF1B3A537800866FDE /* QNDnsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F681B396DA000866FDE /* QNDnsManager.m */; }; + DF801FB01B3A537800866FDE /* QNRecord.h in Sources */ = {isa = PBXBuildFile; fileRef = DF801F621B396D5100866FDE /* QNRecord.h */; }; + DF801FB11B3A537800866FDE /* QNRecord.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F631B396D5100866FDE /* QNRecord.m */; }; + DF801FB21B3A537800866FDE /* QNResolverDelegate.h in Sources */ = {isa = PBXBuildFile; fileRef = DF801F851B396F5500866FDE /* QNResolverDelegate.h */; }; + DF801FB31B3A537800866FDE /* QNDomain.h in Sources */ = {isa = PBXBuildFile; fileRef = DF801F8A1B39743200866FDE /* QNDomain.h */; }; + DF801FB41B3A537800866FDE /* QNDomain.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F8B1B39743200866FDE /* QNDomain.m */; }; + DF801FB51B3A537800866FDE /* QNSystemDnsServer.h in Sources */ = {isa = PBXBuildFile; fileRef = DF801F6C1B396E1000866FDE /* QNSystemDnsServer.h */; }; + DF801FB61B3A537800866FDE /* QNResolver.h in Sources */ = {isa = PBXBuildFile; fileRef = DF801F711B396E3C00866FDE /* QNResolver.h */; }; + DF801FB71B3A537800866FDE /* QNResolver.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F721B396E3C00866FDE /* QNResolver.m */; }; + DF801FB81B3A537800866FDE /* QNDnsMessage.h in Sources */ = {isa = PBXBuildFile; fileRef = DF801F761B396E5D00866FDE /* QNDnsMessage.h */; }; + DF801FB91B3A537800866FDE /* QNDnsMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F771B396E5D00866FDE /* QNDnsMessage.m */; }; + DF801FBA1B3A537800866FDE /* QNHosts.h in Sources */ = {isa = PBXBuildFile; fileRef = DF801F801B396E9A00866FDE /* QNHosts.h */; }; + DF801FBB1B3A537800866FDE /* QNHosts.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F811B396E9A00866FDE /* QNHosts.m */; }; + DF801FBC1B3A537800866FDE /* QNDnspodFree.h in Sources */ = {isa = PBXBuildFile; fileRef = DF801F7B1B396E7600866FDE /* QNDnspodFree.h */; }; + DF801FBD1B3A537800866FDE /* QNDnspodFree.m in Sources */ = {isa = PBXBuildFile; fileRef = DF801F7C1B396E7600866FDE /* QNDnspodFree.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + DF22C0CC1B37B9B90010FEBF /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = DF22C0B71B37B9B90010FEBF /* Project object */; + proxyType = 1; + remoteGlobalIDString = DF22C0BE1B37B9B90010FEBF; + remoteInfo = HappyDNS; + }; + DF801FA11B3A4F4D00866FDE /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = DF22C0B71B37B9B90010FEBF /* Project object */; + proxyType = 1; + remoteGlobalIDString = DF801F941B3A4F4D00866FDE; + remoteInfo = HappyDNS; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + DF801F931B3A4F4D00866FDE /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/$(PRODUCT_NAME)"; + dstSubfolderSpec = 16; + files = ( + DF801F981B3A4F4D00866FDE /* HappyDNS.h in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 04A4DFEA159C0945AFABEA3A /* libPods-HappyDNS_MacTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HappyDNS_MacTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1DEA89BB118E6B53C505D328 /* Pods-HappyDNS_MacTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HappyDNS_MacTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-HappyDNS_MacTests/Pods-HappyDNS_MacTests.release.xcconfig"; sourceTree = ""; }; + 1E328F479E1702CED8C0DDDC /* Pods-HappyDNS_MacTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HappyDNS_MacTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-HappyDNS_MacTests/Pods-HappyDNS_MacTests.debug.xcconfig"; sourceTree = ""; }; + 2A93CF6550EE709B01A78948 /* Pods-HappyDNS_iOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HappyDNS_iOSTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-HappyDNS_iOSTests/Pods-HappyDNS_iOSTests.release.xcconfig"; sourceTree = ""; }; + A7C629E8C4C0F06862464808 /* Pods-HappyDNS_iOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HappyDNS_iOSTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-HappyDNS_iOSTests/Pods-HappyDNS_iOSTests.debug.xcconfig"; sourceTree = ""; }; + B7A5E527D9CF80E564A69D85 /* libPods-HappyDNS_iOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HappyDNS_iOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + DF22C0BF1B37B9B90010FEBF /* libHappyDNS.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libHappyDNS.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; + DF22C0C21B37B9B90010FEBF /* HappyDNS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HappyDNS.h; sourceTree = ""; }; + DF22C0CA1B37B9B90010FEBF /* HappyDNSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = HappyDNSTests.xctest; path = HappyDNS_MacTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + DF22C0D01B37B9B90010FEBF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DF801F621B396D5100866FDE /* QNRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QNRecord.h; path = Common/QNRecord.h; sourceTree = ""; }; + DF801F631B396D5100866FDE /* QNRecord.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = QNRecord.m; path = Common/QNRecord.m; sourceTree = ""; }; + DF801F671B396DA000866FDE /* QNDnsManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QNDnsManager.h; path = Common/QNDnsManager.h; sourceTree = ""; }; + DF801F681B396DA000866FDE /* QNDnsManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = QNDnsManager.m; path = Common/QNDnsManager.m; sourceTree = ""; }; + DF801F6C1B396E1000866FDE /* QNSystemDnsServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QNSystemDnsServer.h; path = Local/QNSystemDnsServer.h; sourceTree = ""; }; + DF801F6D1B396E1000866FDE /* QNSystemDnsServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = QNSystemDnsServer.m; path = Local/QNSystemDnsServer.m; sourceTree = ""; }; + DF801F711B396E3C00866FDE /* QNResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QNResolver.h; path = Local/QNResolver.h; sourceTree = ""; }; + DF801F721B396E3C00866FDE /* QNResolver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = QNResolver.m; path = Local/QNResolver.m; sourceTree = ""; }; + DF801F761B396E5D00866FDE /* QNDnsMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QNDnsMessage.h; path = Local/QNDnsMessage.h; sourceTree = ""; }; + DF801F771B396E5D00866FDE /* QNDnsMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = QNDnsMessage.m; path = Local/QNDnsMessage.m; sourceTree = ""; }; + DF801F7B1B396E7600866FDE /* QNDnspodFree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QNDnspodFree.h; path = Http/QNDnspodFree.h; sourceTree = ""; }; + DF801F7C1B396E7600866FDE /* QNDnspodFree.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = QNDnspodFree.m; path = Http/QNDnspodFree.m; sourceTree = ""; }; + DF801F801B396E9A00866FDE /* QNHosts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QNHosts.h; path = Local/QNHosts.h; sourceTree = ""; }; + DF801F811B396E9A00866FDE /* QNHosts.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = QNHosts.m; path = Local/QNHosts.m; sourceTree = ""; }; + DF801F851B396F5500866FDE /* QNResolverDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QNResolverDelegate.h; path = Common/QNResolverDelegate.h; sourceTree = ""; }; + DF801F8A1B39743200866FDE /* QNDomain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QNDomain.h; path = Common/QNDomain.h; sourceTree = ""; }; + DF801F8B1B39743200866FDE /* QNDomain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = QNDomain.m; path = Common/QNDomain.m; sourceTree = ""; }; + DF801F8F1B3A378900866FDE /* QNSystemDnsTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QNSystemDnsTest.m; sourceTree = ""; }; + DF801F951B3A4F4D00866FDE /* libHappyDNS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libHappyDNS.a; sourceTree = BUILT_PRODUCTS_DIR; }; + DF801F971B3A4F4D00866FDE /* HappyDNS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HappyDNS.h; sourceTree = ""; }; + DF801F991B3A4F4D00866FDE /* HappyDNS.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HappyDNS.m; sourceTree = ""; }; + DF801F9F1B3A4F4D00866FDE /* HappyDNS_iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HappyDNS_iOSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + DF801FA51B3A4F4D00866FDE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + DF22C0BC1B37B9B90010FEBF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DF22C0C71B37B9B90010FEBF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + DF22C0CB1B37B9B90010FEBF /* libHappyDNS.dylib in Frameworks */, + 71FB87ACF7AF0163E3F8AF2F /* libPods-HappyDNS_MacTests.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DF801F921B3A4F4D00866FDE /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DF801F9C1B3A4F4D00866FDE /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + DF801FA01B3A4F4D00866FDE /* libHappyDNS.a in Frameworks */, + 6B6090D36D2ECCD34FCE6DAE /* libPods-HappyDNS_iOSTests.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 3AA9FDBAFF7915B2F079FC24 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 04A4DFEA159C0945AFABEA3A /* libPods-HappyDNS_MacTests.a */, + B7A5E527D9CF80E564A69D85 /* libPods-HappyDNS_iOSTests.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + 891FECAD5C705DE22D01165A /* Pods */ = { + isa = PBXGroup; + children = ( + 1E328F479E1702CED8C0DDDC /* Pods-HappyDNS_MacTests.debug.xcconfig */, + 1DEA89BB118E6B53C505D328 /* Pods-HappyDNS_MacTests.release.xcconfig */, + A7C629E8C4C0F06862464808 /* Pods-HappyDNS_iOSTests.debug.xcconfig */, + 2A93CF6550EE709B01A78948 /* Pods-HappyDNS_iOSTests.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + DF22C0B61B37B9B90010FEBF = { + isa = PBXGroup; + children = ( + DF22C0C11B37B9B90010FEBF /* HappyDNS */, + DF22C0CE1B37B9B90010FEBF /* HappyDNSTests */, + DF801F961B3A4F4D00866FDE /* HappyDNS */, + DF801FA31B3A4F4D00866FDE /* HappyDNSTests */, + DF22C0C01B37B9B90010FEBF /* Products */, + 891FECAD5C705DE22D01165A /* Pods */, + 3AA9FDBAFF7915B2F079FC24 /* Frameworks */, + ); + sourceTree = ""; + }; + DF22C0C01B37B9B90010FEBF /* Products */ = { + isa = PBXGroup; + children = ( + DF22C0BF1B37B9B90010FEBF /* libHappyDNS.dylib */, + DF22C0CA1B37B9B90010FEBF /* HappyDNSTests.xctest */, + DF801F951B3A4F4D00866FDE /* libHappyDNS.a */, + DF801F9F1B3A4F4D00866FDE /* HappyDNS_iOSTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + DF22C0C11B37B9B90010FEBF /* HappyDNS */ = { + isa = PBXGroup; + children = ( + DF801F5C1B3944BA00866FDE /* Util */, + DF801F5B1B3944AF00866FDE /* Common */, + DF801F5A1B3944A900866FDE /* Local */, + DF801F591B39449C00866FDE /* Http */, + DF22C0C21B37B9B90010FEBF /* HappyDNS.h */, + ); + path = HappyDNS; + sourceTree = ""; + }; + DF22C0CE1B37B9B90010FEBF /* HappyDNSTests */ = { + isa = PBXGroup; + children = ( + DF22C0CF1B37B9B90010FEBF /* Supporting Files */, + DF801F8F1B3A378900866FDE /* QNSystemDnsTest.m */, + ); + path = HappyDNSTests; + sourceTree = ""; + }; + DF22C0CF1B37B9B90010FEBF /* Supporting Files */ = { + isa = PBXGroup; + children = ( + DF22C0D01B37B9B90010FEBF /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + DF801F591B39449C00866FDE /* Http */ = { + isa = PBXGroup; + children = ( + DF801F7B1B396E7600866FDE /* QNDnspodFree.h */, + DF801F7C1B396E7600866FDE /* QNDnspodFree.m */, + ); + name = Http; + sourceTree = ""; + }; + DF801F5A1B3944A900866FDE /* Local */ = { + isa = PBXGroup; + children = ( + DF801F6C1B396E1000866FDE /* QNSystemDnsServer.h */, + DF801F6D1B396E1000866FDE /* QNSystemDnsServer.m */, + DF801F711B396E3C00866FDE /* QNResolver.h */, + DF801F721B396E3C00866FDE /* QNResolver.m */, + DF801F761B396E5D00866FDE /* QNDnsMessage.h */, + DF801F771B396E5D00866FDE /* QNDnsMessage.m */, + DF801F801B396E9A00866FDE /* QNHosts.h */, + DF801F811B396E9A00866FDE /* QNHosts.m */, + ); + name = Local; + sourceTree = ""; + }; + DF801F5B1B3944AF00866FDE /* Common */ = { + isa = PBXGroup; + children = ( + DF801F671B396DA000866FDE /* QNDnsManager.h */, + DF801F681B396DA000866FDE /* QNDnsManager.m */, + DF801F621B396D5100866FDE /* QNRecord.h */, + DF801F631B396D5100866FDE /* QNRecord.m */, + DF801F851B396F5500866FDE /* QNResolverDelegate.h */, + DF801F8A1B39743200866FDE /* QNDomain.h */, + DF801F8B1B39743200866FDE /* QNDomain.m */, + ); + name = Common; + sourceTree = ""; + }; + DF801F5C1B3944BA00866FDE /* Util */ = { + isa = PBXGroup; + children = ( + ); + name = Util; + sourceTree = ""; + }; + DF801F961B3A4F4D00866FDE /* HappyDNS */ = { + isa = PBXGroup; + children = ( + DF801F971B3A4F4D00866FDE /* HappyDNS.h */, + DF801F991B3A4F4D00866FDE /* HappyDNS.m */, + ); + path = HappyDNS; + sourceTree = ""; + }; + DF801FA31B3A4F4D00866FDE /* HappyDNSTests */ = { + isa = PBXGroup; + children = ( + DF801FA41B3A4F4D00866FDE /* Supporting Files */, + ); + path = HappyDNSTests; + sourceTree = ""; + }; + DF801FA41B3A4F4D00866FDE /* Supporting Files */ = { + isa = PBXGroup; + children = ( + DF801FA51B3A4F4D00866FDE /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + DF22C0BD1B37B9B90010FEBF /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + DF801F691B396DA000866FDE /* QNDnsManager.h in Headers */, + DF801F6E1B396E1000866FDE /* QNSystemDnsServer.h in Headers */, + DF22C0C31B37B9B90010FEBF /* HappyDNS.h in Headers */, + DF801F641B396D5100866FDE /* QNRecord.h in Headers */, + DF801F731B396E3C00866FDE /* QNResolver.h in Headers */, + DF801F871B396F5500866FDE /* QNResolverDelegate.h in Headers */, + DF801F7D1B396E7600866FDE /* QNDnspodFree.h in Headers */, + DF801F8C1B39743200866FDE /* QNDomain.h in Headers */, + DF801F781B396E5D00866FDE /* QNDnsMessage.h in Headers */, + DF801F821B396E9A00866FDE /* QNHosts.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + DF22C0BE1B37B9B90010FEBF /* HappyDNS_Mac */ = { + isa = PBXNativeTarget; + buildConfigurationList = DF22C0D31B37B9B90010FEBF /* Build configuration list for PBXNativeTarget "HappyDNS_Mac" */; + buildPhases = ( + DF22C0BB1B37B9B90010FEBF /* Sources */, + DF22C0BC1B37B9B90010FEBF /* Frameworks */, + DF22C0BD1B37B9B90010FEBF /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = HappyDNS_Mac; + productName = HappyDNS; + productReference = DF22C0BF1B37B9B90010FEBF /* libHappyDNS.dylib */; + productType = "com.apple.product-type.library.dynamic"; + }; + DF22C0C91B37B9B90010FEBF /* HappyDNS_MacTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = DF22C0D61B37B9B90010FEBF /* Build configuration list for PBXNativeTarget "HappyDNS_MacTests" */; + buildPhases = ( + 88B0FB59E227F28073D491B1 /* Check Pods Manifest.lock */, + DF22C0C61B37B9B90010FEBF /* Sources */, + DF22C0C71B37B9B90010FEBF /* Frameworks */, + DF22C0C81B37B9B90010FEBF /* Resources */, + 587D8C623415DC2765ADC3FB /* Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + DF22C0CD1B37B9B90010FEBF /* PBXTargetDependency */, + ); + name = HappyDNS_MacTests; + productName = HappyDNSTests; + productReference = DF22C0CA1B37B9B90010FEBF /* HappyDNSTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + DF801F941B3A4F4D00866FDE /* HappyDNS_iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = DF801FA61B3A4F4D00866FDE /* Build configuration list for PBXNativeTarget "HappyDNS_iOS" */; + buildPhases = ( + DF801F911B3A4F4D00866FDE /* Sources */, + DF801F921B3A4F4D00866FDE /* Frameworks */, + DF801F931B3A4F4D00866FDE /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = HappyDNS_iOS; + productName = HappyDNS; + productReference = DF801F951B3A4F4D00866FDE /* libHappyDNS.a */; + productType = "com.apple.product-type.library.static"; + }; + DF801F9E1B3A4F4D00866FDE /* HappyDNS_iOSTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = DF801FA91B3A4F4D00866FDE /* Build configuration list for PBXNativeTarget "HappyDNS_iOSTests" */; + buildPhases = ( + 9215D0CC5EAB9CCB0A43A44F /* Check Pods Manifest.lock */, + DF801F9B1B3A4F4D00866FDE /* Sources */, + DF801F9C1B3A4F4D00866FDE /* Frameworks */, + DF801F9D1B3A4F4D00866FDE /* Resources */, + 5B3D458851A38A700D83AAEE /* Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + DF801FA21B3A4F4D00866FDE /* PBXTargetDependency */, + ); + name = HappyDNS_iOSTests; + productName = HappyDNSTests; + productReference = DF801F9F1B3A4F4D00866FDE /* HappyDNS_iOSTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + DF22C0B71B37B9B90010FEBF /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0630; + ORGANIZATIONNAME = "Qiniu Cloud Storage"; + TargetAttributes = { + DF22C0BE1B37B9B90010FEBF = { + CreatedOnToolsVersion = 6.3.2; + }; + DF22C0C91B37B9B90010FEBF = { + CreatedOnToolsVersion = 6.3.2; + }; + DF801F941B3A4F4D00866FDE = { + CreatedOnToolsVersion = 6.3.2; + }; + DF801F9E1B3A4F4D00866FDE = { + CreatedOnToolsVersion = 6.3.2; + }; + }; + }; + buildConfigurationList = DF22C0BA1B37B9B90010FEBF /* Build configuration list for PBXProject "HappyDNS" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = DF22C0B61B37B9B90010FEBF; + productRefGroup = DF22C0C01B37B9B90010FEBF /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + DF22C0BE1B37B9B90010FEBF /* HappyDNS_Mac */, + DF22C0C91B37B9B90010FEBF /* HappyDNS_MacTests */, + DF801F941B3A4F4D00866FDE /* HappyDNS_iOS */, + DF801F9E1B3A4F4D00866FDE /* HappyDNS_iOSTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + DF22C0C81B37B9B90010FEBF /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DF801F9D1B3A4F4D00866FDE /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 587D8C623415DC2765ADC3FB /* Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-HappyDNS_MacTests/Pods-HappyDNS_MacTests-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 5B3D458851A38A700D83AAEE /* Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-HappyDNS_iOSTests/Pods-HappyDNS_iOSTests-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 88B0FB59E227F28073D491B1 /* Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + 9215D0CC5EAB9CCB0A43A44F /* Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + DF22C0BB1B37B9B90010FEBF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DF801F741B396E3C00866FDE /* QNResolver.m in Sources */, + DF801F6A1B396DA000866FDE /* QNDnsManager.m in Sources */, + DF801F7E1B396E7600866FDE /* QNDnspodFree.m in Sources */, + DF801F651B396D5100866FDE /* QNRecord.m in Sources */, + DF801F8D1B39743200866FDE /* QNDomain.m in Sources */, + DF801F6F1B396E1000866FDE /* QNSystemDnsServer.m in Sources */, + DF801F791B396E5D00866FDE /* QNDnsMessage.m in Sources */, + DF801F831B396E9A00866FDE /* QNHosts.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DF22C0C61B37B9B90010FEBF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DF801F751B396E3C00866FDE /* QNResolver.m in Sources */, + DF801F6B1B396DA000866FDE /* QNDnsManager.m in Sources */, + DF801F901B3A378900866FDE /* QNSystemDnsTest.m in Sources */, + DF801F7F1B396E7600866FDE /* QNDnspodFree.m in Sources */, + DF801F661B396D5100866FDE /* QNRecord.m in Sources */, + DF801F8E1B39743200866FDE /* QNDomain.m in Sources */, + DF801F701B396E1000866FDE /* QNSystemDnsServer.m in Sources */, + DF801F7A1B396E5D00866FDE /* QNDnsMessage.m in Sources */, + DF801F841B396E9A00866FDE /* QNHosts.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DF801F911B3A4F4D00866FDE /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DF801F9A1B3A4F4D00866FDE /* HappyDNS.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DF801F9B1B3A4F4D00866FDE /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DF801FAE1B3A537800866FDE /* QNDnsManager.h in Sources */, + DF801FAF1B3A537800866FDE /* QNDnsManager.m in Sources */, + DF801FB01B3A537800866FDE /* QNRecord.h in Sources */, + DF801FB11B3A537800866FDE /* QNRecord.m in Sources */, + DF801FB21B3A537800866FDE /* QNResolverDelegate.h in Sources */, + DF801FB31B3A537800866FDE /* QNDomain.h in Sources */, + DF801FB41B3A537800866FDE /* QNDomain.m in Sources */, + DF801FB51B3A537800866FDE /* QNSystemDnsServer.h in Sources */, + DF801FB61B3A537800866FDE /* QNResolver.h in Sources */, + DF801FB71B3A537800866FDE /* QNResolver.m in Sources */, + DF801FB81B3A537800866FDE /* QNDnsMessage.h in Sources */, + DF801FB91B3A537800866FDE /* QNDnsMessage.m in Sources */, + DF801FBA1B3A537800866FDE /* QNHosts.h in Sources */, + DF801FBB1B3A537800866FDE /* QNHosts.m in Sources */, + DF801FBC1B3A537800866FDE /* QNDnspodFree.h in Sources */, + DF801FBD1B3A537800866FDE /* QNDnspodFree.m in Sources */, + DF801FAD1B3A503700866FDE /* QNSystemDnsServer.m in Sources */, + DF801FAC1B3A502E00866FDE /* QNSystemDnsTest.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + DF22C0CD1B37B9B90010FEBF /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DF22C0BE1B37B9B90010FEBF /* HappyDNS_Mac */; + targetProxy = DF22C0CC1B37B9B90010FEBF /* PBXContainerItemProxy */; + }; + DF801FA21B3A4F4D00866FDE /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DF801F941B3A4F4D00866FDE /* HappyDNS_iOS */; + targetProxy = DF801FA11B3A4F4D00866FDE /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + DF22C0D11B37B9B90010FEBF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.8; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = HappyDNS; + SDKROOT = macosx; + }; + name = Debug; + }; + DF22C0D21B37B9B90010FEBF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.8; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = HappyDNS; + SDKROOT = macosx; + }; + name = Release; + }; + DF22C0D41B37B9B90010FEBF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + EXECUTABLE_PREFIX = lib; + PRODUCT_NAME = HappyDNS; + }; + name = Debug; + }; + DF22C0D51B37B9B90010FEBF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + EXECUTABLE_PREFIX = lib; + PRODUCT_NAME = HappyDNS; + }; + name = Release; + }; + DF22C0D71B37B9B90010FEBF /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 1E328F479E1702CED8C0DDDC /* Pods-HappyDNS_MacTests.debug.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(DEVELOPER_FRAMEWORKS_DIR)", + "$(inherited)", + ); + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = HappyDNSTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + DF22C0D81B37B9B90010FEBF /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 1DEA89BB118E6B53C505D328 /* Pods-HappyDNS_MacTests.release.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(DEVELOPER_FRAMEWORKS_DIR)", + "$(inherited)", + ); + INFOPLIST_FILE = HappyDNSTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + DF801FA71B3A4F4D00866FDE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = HappyDNS; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + DF801FA81B3A4F4D00866FDE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = HappyDNS; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + DF801FAA1B3A4F4D00866FDE /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = A7C629E8C4C0F06862464808 /* Pods-HappyDNS_iOSTests.debug.xcconfig */; + buildSettings = { + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = HappyDNSTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + }; + name = Debug; + }; + DF801FAB1B3A4F4D00866FDE /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 2A93CF6550EE709B01A78948 /* Pods-HappyDNS_iOSTests.release.xcconfig */; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + INFOPLIST_FILE = HappyDNSTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + DF22C0BA1B37B9B90010FEBF /* Build configuration list for PBXProject "HappyDNS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DF22C0D11B37B9B90010FEBF /* Debug */, + DF22C0D21B37B9B90010FEBF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + DF22C0D31B37B9B90010FEBF /* Build configuration list for PBXNativeTarget "HappyDNS_Mac" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DF22C0D41B37B9B90010FEBF /* Debug */, + DF22C0D51B37B9B90010FEBF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + DF22C0D61B37B9B90010FEBF /* Build configuration list for PBXNativeTarget "HappyDNS_MacTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DF22C0D71B37B9B90010FEBF /* Debug */, + DF22C0D81B37B9B90010FEBF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + DF801FA61B3A4F4D00866FDE /* Build configuration list for PBXNativeTarget "HappyDNS_iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DF801FA71B3A4F4D00866FDE /* Debug */, + DF801FA81B3A4F4D00866FDE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + DF801FA91B3A4F4D00866FDE /* Build configuration list for PBXNativeTarget "HappyDNS_iOSTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DF801FAA1B3A4F4D00866FDE /* Debug */, + DF801FAB1B3A4F4D00866FDE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = DF22C0B71B37B9B90010FEBF /* Project object */; +} diff --git a/HappyDNS.xcworkspace/contents.xcworkspacedata b/HappyDNS.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..4b8410f --- /dev/null +++ b/HappyDNS.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/HappyDNS/Common/QNDnsManager.h b/HappyDNS/Common/QNDnsManager.h new file mode 100644 index 0000000..6c08bf6 --- /dev/null +++ b/HappyDNS/Common/QNDnsManager.h @@ -0,0 +1,13 @@ +// +// QNDnsManager.h +// HappyDNS +// +// Created by bailong on 15/6/23. +// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. +// + +#import + +@interface QNDnsManager : NSObject +-(NSArray*)query:(NSString*)domain; +@end diff --git a/HappyDNS/Common/QNDnsManager.m b/HappyDNS/Common/QNDnsManager.m new file mode 100644 index 0000000..27e0537 --- /dev/null +++ b/HappyDNS/Common/QNDnsManager.m @@ -0,0 +1,15 @@ +// +// QNDnsManager.m +// HappyDNS +// +// Created by bailong on 15/6/23. +// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. +// + +#import "QNDnsManager.h" + +@implementation QNDnsManager +-(NSArray*)query:(NSString*)domain{ + return nil; +} +@end diff --git a/HappyDNS/Common/QNDomain.h b/HappyDNS/Common/QNDomain.h new file mode 100644 index 0000000..74d713c --- /dev/null +++ b/HappyDNS/Common/QNDomain.h @@ -0,0 +1,13 @@ +// +// QNDomain.h +// HappyDNS +// +// Created by bailong on 15/6/23. +// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. +// + +#import + +@interface QNDomain : NSObject + +@end diff --git a/HappyDNS/Common/QNDomain.m b/HappyDNS/Common/QNDomain.m new file mode 100644 index 0000000..3bab824 --- /dev/null +++ b/HappyDNS/Common/QNDomain.m @@ -0,0 +1,13 @@ +// +// QNDomain.m +// HappyDNS +// +// Created by bailong on 15/6/23. +// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. +// + +#import "QNDomain.h" + +@implementation QNDomain + +@end diff --git a/HappyDNS/Common/QNRecord.h b/HappyDNS/Common/QNRecord.h new file mode 100644 index 0000000..4a7d3ef --- /dev/null +++ b/HappyDNS/Common/QNRecord.h @@ -0,0 +1,13 @@ +// +// QNRecord.h +// HappyDNS +// +// Created by bailong on 15/6/23. +// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. +// + +#import + +@interface QNRecord : NSObject + +@end diff --git a/HappyDNS/Common/QNRecord.m b/HappyDNS/Common/QNRecord.m new file mode 100644 index 0000000..d6bb8b9 --- /dev/null +++ b/HappyDNS/Common/QNRecord.m @@ -0,0 +1,13 @@ +// +// QNRecord.m +// HappyDNS +// +// Created by bailong on 15/6/23. +// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. +// + +#import "QNRecord.h" + +@implementation QNRecord + +@end diff --git a/HappyDNS/Common/QNResolverDelegate.h b/HappyDNS/Common/QNResolverDelegate.h new file mode 100644 index 0000000..11be1f1 --- /dev/null +++ b/HappyDNS/Common/QNResolverDelegate.h @@ -0,0 +1,14 @@ +// +// QNResolverDelegate.h +// HappyDNS +// +// Created by bailong on 15/6/23. +// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. +// + +#import + +@class QNDomain; +@protocol QNResolverDelegate +-(NSArray*)query:(QNDomain*)domain; +@end diff --git a/HappyDNS/Common/abc b/HappyDNS/Common/abc new file mode 100644 index 0000000..e69de29 diff --git a/HappyDNS/HappyDNS.h b/HappyDNS/HappyDNS.h new file mode 100644 index 0000000..e18efa4 --- /dev/null +++ b/HappyDNS/HappyDNS.h @@ -0,0 +1,13 @@ +// +// HappyDNS.h +// HappyDNS +// +// Created by bailong on 15/6/24. +// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. +// + +#import + +@interface HappyDNS : NSObject + +@end diff --git a/HappyDNS/HappyDNS.m b/HappyDNS/HappyDNS.m new file mode 100644 index 0000000..f745f0f --- /dev/null +++ b/HappyDNS/HappyDNS.m @@ -0,0 +1,13 @@ +// +// HappyDNS.m +// HappyDNS +// +// Created by bailong on 15/6/24. +// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. +// + +#import "HappyDNS.h" + +@implementation HappyDNS + +@end diff --git a/HappyDNS/Http/QNDnspodFree.h b/HappyDNS/Http/QNDnspodFree.h new file mode 100644 index 0000000..ff52d4e --- /dev/null +++ b/HappyDNS/Http/QNDnspodFree.h @@ -0,0 +1,14 @@ +// +// QNDnspodFree.h +// HappyDNS +// +// Created by bailong on 15/6/23. +// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. +// + +#import +#import "QNResolverDelegate.h" + +@interface QNDnspodFree : NSObject +-(NSArray*)query:(QNDomain*)domain; +@end \ No newline at end of file diff --git a/HappyDNS/Http/QNDnspodFree.m b/HappyDNS/Http/QNDnspodFree.m new file mode 100644 index 0000000..2baeb1e --- /dev/null +++ b/HappyDNS/Http/QNDnspodFree.m @@ -0,0 +1,15 @@ +// +// QNDnspodFree.m +// HappyDNS +// +// Created by bailong on 15/6/23. +// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. +// + +#import "QNDnspodFree.h" + +@implementation QNDnspodFree +-(NSArray*)query:(QNDomain*)domain{ + return nil; +} +@end diff --git a/HappyDNS/Local/QNDnsMessage.h b/HappyDNS/Local/QNDnsMessage.h new file mode 100644 index 0000000..ea555f4 --- /dev/null +++ b/HappyDNS/Local/QNDnsMessage.h @@ -0,0 +1,16 @@ +// +// QNDnsMessage.h +// HappyDNS +// +// Created by bailong on 15/6/23. +// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. +// + +#import + +@interface QNDnsMessage : NSObject + ++(int)buildQuery; ++(int)parseResponse; + +@end diff --git a/HappyDNS/Local/QNDnsMessage.m b/HappyDNS/Local/QNDnsMessage.m new file mode 100644 index 0000000..66af28f --- /dev/null +++ b/HappyDNS/Local/QNDnsMessage.m @@ -0,0 +1,19 @@ +// +// QNDnsMessage.m +// HappyDNS +// +// Created by bailong on 15/6/23. +// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. +// + +#import "QNDnsMessage.h" + +@implementation QNDnsMessage ++(int)buildQuery{ + return 0; +} + ++(int)parseResponse{ + return 0; +} +@end diff --git a/HappyDNS/Local/QNHosts.h b/HappyDNS/Local/QNHosts.h new file mode 100644 index 0000000..555a76b --- /dev/null +++ b/HappyDNS/Local/QNHosts.h @@ -0,0 +1,14 @@ +// +// QNHosts.h +// HappyDNS +// +// Created by bailong on 15/6/23. +// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. +// + +#import +#import "QNResolverDelegate.h" + +@interface QNHosts : NSObject +-(NSArray*)query:(QNDomain*)domain; +@end \ No newline at end of file diff --git a/HappyDNS/Local/QNHosts.m b/HappyDNS/Local/QNHosts.m new file mode 100644 index 0000000..e3fce36 --- /dev/null +++ b/HappyDNS/Local/QNHosts.m @@ -0,0 +1,15 @@ +// +// QNHosts.m +// HappyDNS +// +// Created by bailong on 15/6/23. +// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. +// + +#import "QNHosts.h" + +@implementation QNHosts +-(NSArray*)query:(QNDomain*)domain{ + return nil; +} +@end diff --git a/HappyDNS/Local/QNResolver.h b/HappyDNS/Local/QNResolver.h new file mode 100644 index 0000000..ed54255 --- /dev/null +++ b/HappyDNS/Local/QNResolver.h @@ -0,0 +1,15 @@ +// +// QNResolver.h +// HappyDNS +// +// Created by bailong on 15/6/23. +// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. +// + +#import +#import "QNResolverDelegate.h" + +@interface QNResolver : NSObject +-(NSArray*)query:(QNDomain*)domain; +-(instancetype)initWithAddres:(NSString *)address; +@end diff --git a/HappyDNS/Local/QNResolver.m b/HappyDNS/Local/QNResolver.m new file mode 100644 index 0000000..01e12f3 --- /dev/null +++ b/HappyDNS/Local/QNResolver.m @@ -0,0 +1,40 @@ +// +// QNResolver.m +// HappyDNS +// +// Created by bailong on 15/6/23. +// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. +// + +#import "QNResolver.h" +#import "QNDomain.h" + +static int udpCommunicate(char* ip, char* buffer, int len){ + return 0; +} + +@interface QNResolver () +@property (nonatomic) NSString* address; +@end + +@implementation QNResolver +-(instancetype)initWithAddres:(NSString *)address{ + if (self = [super init]) { + self.address = address; + } + return nil; +} + +-(NSArray*)query:(QNDomain*)domain{ + int id = arc4random() & 0XFF; + +// byte[] query = DnsMessage.buildQuery(domain.domain, id); +// byte[] answer = udpCommunicate(query); +// if (answer == null) { +// throw new DnsException(domain.domain, "cant get answer"); +// } +// return DnsMessage.parseResponse(answer, id, domain.domain); + return nil; +} + +@end diff --git a/HappyDNS/Local/QNSystemDnsServer.h b/HappyDNS/Local/QNSystemDnsServer.h new file mode 100644 index 0000000..48c9ae4 --- /dev/null +++ b/HappyDNS/Local/QNSystemDnsServer.h @@ -0,0 +1,15 @@ +// +// QNSystemDnsServer.h +// HappyDNS +// +// Created by bailong on 15/6/23. +// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. +// + +#import + +@interface QNSystemDnsServer : NSObject + ++(NSArray*)servers; + +@end diff --git a/HappyDNS/Local/QNSystemDnsServer.m b/HappyDNS/Local/QNSystemDnsServer.m new file mode 100644 index 0000000..e82df55 --- /dev/null +++ b/HappyDNS/Local/QNSystemDnsServer.m @@ -0,0 +1,34 @@ +// +// QNSystemDnsServer.m +// HappyDNS +// +// Created by bailong on 15/6/23. +// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. +// + +#import "QNSystemDnsServer.h" + +@implementation QNSystemDnsServer ++(NSArray*)servers{ +#if __IPHONE_OS_VERSION_MIN_REQUIRED + return nil; +#else + NSString *fh = [NSString stringWithContentsOfFile:@"/etc/resolv.conf" encoding:NSUTF8StringEncoding error:NULL]; + if (fh == nil) { + return nil; + } + NSMutableArray *array = [[NSMutableArray alloc] init]; + for (NSString *line in [fh componentsSeparatedByString:@"\n"]) { + if ([line hasPrefix:@"nameserver"]) { + NSArray* a = [line componentsSeparatedByString:@" "]; + if ([a count] !=2) { + return nil; + } + [array addObject:[a objectAtIndex:1]]; + } + } + return array; +#endif + +} +@end diff --git a/HappyDNSTests/Info.plist b/HappyDNSTests/Info.plist new file mode 100644 index 0000000..512d824 --- /dev/null +++ b/HappyDNSTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + com.qiniu.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/HappyDNSTests/QNSystemDnsTest.m b/HappyDNSTests/QNSystemDnsTest.m new file mode 100644 index 0000000..603f2f7 --- /dev/null +++ b/HappyDNSTests/QNSystemDnsTest.m @@ -0,0 +1,33 @@ +// +// QNSystemDnsTest.m +// HappyDNS +// +// Created by bailong on 15/6/24. +// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. +// + +#import +#import "QNSystemDnsServer.h" + +@interface QNSystemDnsTest : XCTestCase + +@end + +@implementation QNSystemDnsTest + +- (void)setUp { + [super setUp]; + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +- (void)testSystem { + NSArray * servers = [QNSystemDnsServer servers]; + XCTAssertTrue([servers count] > 0); +} + +@end diff --git a/LICENSE b/LICENSE index 2f4a977..ba646be 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 Bai Long +Copyright (c) 2014 Qiniu, Ltd. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Podfile b/Podfile new file mode 100644 index 0000000..b81dd7a --- /dev/null +++ b/Podfile @@ -0,0 +1,11 @@ +source 'https://github.com/CocoaPods/Specs.git' + +target "HappyDNS_iOSTests" do + platform :ios, "6.0" + pod 'AGAsyncTestHelper/Shorthand' +end + +target "HappyDNS_MacTests" do + platform :osx, "10.8" + pod 'AGAsyncTestHelper/Shorthand' +end diff --git a/README.md b/README.md new file mode 100644 index 0000000..f26f281 --- /dev/null +++ b/README.md @@ -0,0 +1,63 @@ +# Qiniu Resource Storage SDK for Objective-C + +[![@qiniu on weibo](http://img.shields.io/badge/weibo-%40qiniutek-blue.svg)](http://weibo.com/qiniutek) +[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE.md) +[![Build Status](https://travis-ci.org/qiniu/objc-sdk.svg?branch=master)](https://travis-ci.org/qiniu/happy-dns-objc) +[![Latest Stable Version](http://img.shields.io/cocoapods/v/HappyDNS.svg)](https://github.com/qiniu/happy-dns-objc/releases) +![Platform](http://img.shields.io/cocoapods/p/HappyDNS.svg) + +## 安装 + +通过CocoaPods + +```ruby +pod "HappyDNS" +``` + +## 运行环境 + + +## 使用方法 + + +## 测试 + + +### 所有测试 + +``` bash +$ xctool -workspace HappyDNS.xcworkspace -scheme "HappyDNS Mac" -sdk macosx -configuration Release test -test-sdk macosx +``` + +### 指定测试 + +可以在单元测试上修改,熟悉使用 + +``` bash +``` + +## 常见问题 + +- 如果碰到其他编译错误,请参考 Cocoapods 的 [troubleshooting](http://guides.cocoapods.org/using/troubleshooting.html) + +## 代码贡献 + +详情参考[代码提交指南](https://github.com/qiniu/happy-dns-objc/blob/master/CONTRIBUTING.md)。 + +## 贡献记录 + +- [所有贡献者](https://github.com/qiniu/happy-dns-objc/contributors) + +## 联系我们 + +- 如果需要帮助,请提交工单(在portal右侧点击咨询和建议提交工单,或者直接向 support@qiniu.com 发送邮件) +- 如果有什么问题,可以到问答社区提问,[问答社区](http://qiniu.segmentfault.com/) +- 更详细的文档,见[官方文档站](http://developer.qiniu.com/) +- 如果发现了bug, 欢迎提交 [issue](https://github.com/qiniu/happy-dns-objc/issues) +- 如果有功能需求,欢迎提交 [issue](https://github.com/qiniu/happy-dns-objc/issues) +- 如果要提交代码,欢迎提交 pull request +- 欢迎关注我们的[微信](http://www.qiniu.com/#weixin) [微博](http://weibo.com/qiniutek),及时获取动态信息。 + +## 代码许可 + +The MIT License (MIT).详情见 [License文件](https://github.com/qiniu/happy-dns-objc/blob/master/LICENSE).