Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
longbai committed Jun 24, 2015
1 parent 645d426 commit d92c6b3
Show file tree
Hide file tree
Showing 32 changed files with 1,427 additions and 2 deletions.
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# System
.DS_Store

# Xcode
#
build/
Expand All @@ -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
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#Changelog

## 0.0.1 (2015-06-21)

### 增加
* localdns
* httpdns


32 changes: 32 additions & 0 deletions Contributing.md
Original file line number Diff line number Diff line change
@@ -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


```
40 changes: 40 additions & 0 deletions HappyDNS.podspec
Original file line number Diff line number Diff line change
@@ -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 => [email protected]'
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
865 changes: 865 additions & 0 deletions HappyDNS.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions HappyDNS.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions HappyDNS/Common/QNDnsManager.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// QNDnsManager.h
// HappyDNS
//
// Created by bailong on 15/6/23.
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface QNDnsManager : NSObject
-(NSArray*)query:(NSString*)domain;
@end
15 changes: 15 additions & 0 deletions HappyDNS/Common/QNDnsManager.m
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions HappyDNS/Common/QNDomain.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// QNDomain.h
// HappyDNS
//
// Created by bailong on 15/6/23.
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface QNDomain : NSObject

@end
13 changes: 13 additions & 0 deletions HappyDNS/Common/QNDomain.m
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions HappyDNS/Common/QNRecord.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// QNRecord.h
// HappyDNS
//
// Created by bailong on 15/6/23.
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface QNRecord : NSObject

@end
13 changes: 13 additions & 0 deletions HappyDNS/Common/QNRecord.m
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions HappyDNS/Common/QNResolverDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// QNResolverDelegate.h
// HappyDNS
//
// Created by bailong on 15/6/23.
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved.
//

#import <Foundation/Foundation.h>

@class QNDomain;
@protocol QNResolverDelegate <NSObject>
-(NSArray*)query:(QNDomain*)domain;
@end
Empty file added HappyDNS/Common/abc
Empty file.
13 changes: 13 additions & 0 deletions HappyDNS/HappyDNS.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// HappyDNS.h
// HappyDNS
//
// Created by bailong on 15/6/24.
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface HappyDNS : NSObject

@end
13 changes: 13 additions & 0 deletions HappyDNS/HappyDNS.m
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions HappyDNS/Http/QNDnspodFree.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// QNDnspodFree.h
// HappyDNS
//
// Created by bailong on 15/6/23.
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "QNResolverDelegate.h"

@interface QNDnspodFree : NSObject <QNResolverDelegate>
-(NSArray*)query:(QNDomain*)domain;
@end
15 changes: 15 additions & 0 deletions HappyDNS/Http/QNDnspodFree.m
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions HappyDNS/Local/QNDnsMessage.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// QNDnsMessage.h
// HappyDNS
//
// Created by bailong on 15/6/23.
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface QNDnsMessage : NSObject

+(int)buildQuery;
+(int)parseResponse;

@end
19 changes: 19 additions & 0 deletions HappyDNS/Local/QNDnsMessage.m
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions HappyDNS/Local/QNHosts.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// QNHosts.h
// HappyDNS
//
// Created by bailong on 15/6/23.
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "QNResolverDelegate.h"

@interface QNHosts : NSObject <QNResolverDelegate>
-(NSArray*)query:(QNDomain*)domain;
@end
15 changes: 15 additions & 0 deletions HappyDNS/Local/QNHosts.m
Original file line number Diff line number Diff line change
@@ -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
15 changes: 15 additions & 0 deletions HappyDNS/Local/QNResolver.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// QNResolver.h
// HappyDNS
//
// Created by bailong on 15/6/23.
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "QNResolverDelegate.h"

@interface QNResolver : NSObject <QNResolverDelegate>
-(NSArray*)query:(QNDomain*)domain;
-(instancetype)initWithAddres:(NSString *)address;
@end
Loading

0 comments on commit d92c6b3

Please sign in to comment.