Skip to content
This repository was archived by the owner on Aug 27, 2021. It is now read-only.

Commit 328dd27

Browse files
author
Flipp3rrr
committed
Original Cydia source code
0 parents  commit 328dd27

File tree

303 files changed

+26709
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

303 files changed

+26709
-0
lines changed

.DS_Store

10 KB
Binary file not shown.

COPYING

+674
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CFBundleName = "Cydia";

Cydia.frappliance/Info.plist

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
5+
<dict>
6+
<key>CFBundleExecutable</key>
7+
<string>CydiaAppliance</string>
8+
9+
<key>CFBundleIdentifier</key>
10+
<string>com.saurik.Cydia</string>
11+
12+
<key>CFBundleInfoDictionaryVersion</key>
13+
<string>6.0</string>
14+
15+
<key>CFBundlePackageType</key>
16+
<string>BNDL</string>
17+
18+
<key>CFBundleSignature</key>
19+
<string>fnrw</string>
20+
21+
<key>CFBundleSupportedPlatforms</key>
22+
<array>
23+
<string>iPhoneOS</string>
24+
</array>
25+
26+
<key>CFBundleVersion</key>
27+
<string>0.9</string>
28+
29+
<key>DTSDKName</key>
30+
<string>iphoneos2.0.saurik</string>
31+
32+
<key>FRApplianceDataSourceType</key>
33+
<string>All</string>
34+
35+
<key>FRAppliancePreferedOrderValue</key>
36+
<integer>1</integer>
37+
38+
<key>FRHideIfNoCategories</key>
39+
<false/>
40+
41+
<key>FRRemoteAppliance</key>
42+
<true/>
43+
44+
<key>LSRequiresIPhoneOS</key>
45+
<string>1</string>
46+
47+
<key>MinimumOSVersion</key>
48+
<string>3.0</string>
49+
50+
<key>NSPrincipalClass</key>
51+
<string>CydiaAppliance</string>
52+
53+
<key>UIDeviceFamily</key>
54+
<array>
55+
<integer>3</integer>
56+
<integer>2</integer>
57+
</array>
58+
</dict>
59+
60+
</plist>

Cydia/LoadingView.h

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/* Cydia - iPhone UIKit Front-End for Debian APT
2+
* Copyright (C) 2008-2015 Jay Freeman (saurik)
3+
*/
4+
5+
/* GNU General Public License, Version 3 {{{ */
6+
/*
7+
* Cydia is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published
9+
* by the Free Software Foundation, either version 3 of the License,
10+
* or (at your option) any later version.
11+
*
12+
* Cydia is distributed in the hope that it will be useful, but
13+
* WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with Cydia. If not, see <http://www.gnu.org/licenses/>.
19+
**/
20+
/* }}} */
21+
22+
#ifndef Cydia_LoadingView_H
23+
#define Cydia_LoadingView_H
24+
25+
#include "Menes/ObjectHandle.h"
26+
27+
#include <UIKit/UIKit.h>
28+
29+
@interface CydiaLoadingView : UIView {
30+
_H<UIActivityIndicatorView> spinner_;
31+
_H<UILabel> label_;
32+
_H<UIView> container_;
33+
}
34+
35+
@end
36+
37+
#endif//Cydia_LoadingView_H

Cydia/LoadingView.mm

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/* Cydia - iPhone UIKit Front-End for Debian APT
2+
* Copyright (C) 2008-2015 Jay Freeman (saurik)
3+
*/
4+
5+
/* GNU General Public License, Version 3 {{{ */
6+
/*
7+
* Cydia is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published
9+
* by the Free Software Foundation, either version 3 of the License,
10+
* or (at your option) any later version.
11+
*
12+
* Cydia is distributed in the hope that it will be useful, but
13+
* WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with Cydia. If not, see <http://www.gnu.org/licenses/>.
19+
**/
20+
/* }}} */
21+
22+
#include "CyteKit/UCPlatform.h"
23+
#include "CyteKit/Localize.h"
24+
25+
#include "Cydia/LoadingView.h"
26+
27+
@implementation CydiaLoadingView
28+
29+
- (id) initWithFrame:(CGRect)frame {
30+
if ((self = [super initWithFrame:frame]) != nil) {
31+
container_ = [[[UIView alloc] init] autorelease];
32+
[container_ setAutoresizingMask:UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleBottomMargin];
33+
34+
spinner_ = [[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray] autorelease];
35+
[spinner_ startAnimating];
36+
[container_ addSubview:spinner_];
37+
38+
label_ = [[[UILabel alloc] init] autorelease];
39+
[label_ setFont:[UIFont boldSystemFontOfSize:15.0f]];
40+
[label_ setBackgroundColor:[UIColor clearColor]];
41+
[label_ setTextColor:[UIColor viewFlipsideBackgroundColor]];
42+
[label_ setShadowColor:[UIColor whiteColor]];
43+
[label_ setShadowOffset:CGSizeMake(0, 1)];
44+
[label_ setText:[NSString stringWithFormat:Elision_, UCLocalize("LOADING"), nil]];
45+
[container_ addSubview:label_];
46+
47+
CGSize viewsize = frame.size;
48+
CGSize spinnersize = [spinner_ bounds].size;
49+
CGSize textsize = [[label_ text] sizeWithFont:[label_ font]];
50+
float bothwidth = spinnersize.width + textsize.width + 5.0f;
51+
52+
CGRect containrect = {
53+
CGPointMake(floorf((viewsize.width / 2) - (bothwidth / 2)), floorf((viewsize.height / 2) - (spinnersize.height / 2))),
54+
CGSizeMake(bothwidth, spinnersize.height)
55+
};
56+
CGRect textrect = {
57+
CGPointMake(spinnersize.width + 5.0f, floorf((spinnersize.height / 2) - (textsize.height / 2))),
58+
textsize
59+
};
60+
CGRect spinrect = {
61+
CGPointZero,
62+
spinnersize
63+
};
64+
65+
[container_ setFrame:containrect];
66+
[spinner_ setFrame:spinrect];
67+
[label_ setFrame:textrect];
68+
[self addSubview:container_];
69+
} return self;
70+
}
71+
72+
@end

Cydia/LoadingViewController.h

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/* Cydia - iPhone UIKit Front-End for Debian APT
2+
* Copyright (C) 2008-2015 Jay Freeman (saurik)
3+
*/
4+
5+
/* GNU General Public License, Version 3 {{{ */
6+
/*
7+
* Cydia is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published
9+
* by the Free Software Foundation, either version 3 of the License,
10+
* or (at your option) any later version.
11+
*
12+
* Cydia is distributed in the hope that it will be useful, but
13+
* WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with Cydia. If not, see <http://www.gnu.org/licenses/>.
19+
**/
20+
/* }}} */
21+
22+
#ifndef Cydia_LoadingViewController_H
23+
#define Cydia_LoadingViewController_H
24+
25+
#include "CyteKit/ViewController.h"
26+
27+
@interface CydiaLoadingViewController : CyteViewController {
28+
}
29+
30+
@end
31+
32+
#endif//Cydia_LoadingViewController_H

Cydia/LoadingViewController.mm

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/* Cydia - iPhone UIKit Front-End for Debian APT
2+
* Copyright (C) 2008-2015 Jay Freeman (saurik)
3+
*/
4+
5+
/* GNU General Public License, Version 3 {{{ */
6+
/*
7+
* Cydia is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published
9+
* by the Free Software Foundation, either version 3 of the License,
10+
* or (at your option) any later version.
11+
*
12+
* Cydia is distributed in the hope that it will be useful, but
13+
* WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with Cydia. If not, see <http://www.gnu.org/licenses/>.
19+
**/
20+
/* }}} */
21+
22+
#include "CyteKit/UCPlatform.h"
23+
24+
#include "Cydia/LoadingView.h"
25+
#include "Cydia/LoadingViewController.h"
26+
27+
@implementation CydiaLoadingViewController
28+
29+
- (void) loadView {
30+
[super loadView];
31+
32+
UITableView *table([[[UITableView alloc] initWithFrame:[[self view] bounds] style:UITableViewStyleGrouped] autorelease]);
33+
[table setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)];
34+
[[self view] addSubview:table];
35+
36+
CydiaLoadingView *indicator([[[CydiaLoadingView alloc] initWithFrame:[[self view] bounds]] autorelease]);
37+
[indicator setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)];
38+
[[self view] addSubview:indicator];
39+
}
40+
41+
@end

Cydia/MIMEAddress.h

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/* Cydia - iPhone UIKit Front-End for Debian APT
2+
* Copyright (C) 2008-2015 Jay Freeman (saurik)
3+
*/
4+
5+
/* GNU General Public License, Version 3 {{{ */
6+
/*
7+
* Cydia is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published
9+
* by the Free Software Foundation, either version 3 of the License,
10+
* or (at your option) any later version.
11+
*
12+
* Cydia is distributed in the hope that it will be useful, but
13+
* WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with Cydia. If not, see <http://www.gnu.org/licenses/>.
19+
**/
20+
/* }}} */
21+
22+
#ifndef Cydia_MIMEAddress_H
23+
#define Cydia_MIMEAddress_H
24+
25+
#include "Menes/ObjectHandle.h"
26+
27+
@interface MIMEAddress : NSObject {
28+
_H<NSString> name_;
29+
_H<NSString> address_;
30+
}
31+
32+
- (NSString *) name;
33+
- (NSString *) address;
34+
35+
- (void) setAddress:(NSString *)address;
36+
37+
+ (MIMEAddress *) addressWithString:(NSString *)string;
38+
- (id) initWithString:(NSString *)string;
39+
40+
@end
41+
42+
#endif//Cydia_MIMEAddress_H

Cydia/MIMEAddress.mm

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/* Cydia - iPhone UIKit Front-End for Debian APT
2+
* Copyright (C) 2008-2015 Jay Freeman (saurik)
3+
*/
4+
5+
/* GNU General Public License, Version 3 {{{ */
6+
/*
7+
* Cydia is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published
9+
* by the Free Software Foundation, either version 3 of the License,
10+
* or (at your option) any later version.
11+
*
12+
* Cydia is distributed in the hope that it will be useful, but
13+
* WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with Cydia. If not, see <http://www.gnu.org/licenses/>.
19+
**/
20+
/* }}} */
21+
22+
#include "CyteKit/UCPlatform.h"
23+
24+
#include "Cydia/MIMEAddress.h"
25+
#include "CyteKit/RegEx.hpp"
26+
27+
#include "iPhonePrivate.h"
28+
29+
@implementation MIMEAddress
30+
31+
- (NSString *) name {
32+
return name_;
33+
}
34+
35+
- (NSString *) address {
36+
return address_;
37+
}
38+
39+
- (void) setAddress:(NSString *)address {
40+
address_ = address;
41+
}
42+
43+
+ (MIMEAddress *) addressWithString:(NSString *)string {
44+
return [[[MIMEAddress alloc] initWithString:string] autorelease];
45+
}
46+
47+
+ (NSArray *) _attributeKeys {
48+
return [NSArray arrayWithObjects:
49+
@"address",
50+
@"name",
51+
nil];
52+
}
53+
54+
- (NSArray *) attributeKeys {
55+
return [[self class] _attributeKeys];
56+
}
57+
58+
+ (BOOL) isKeyExcludedFromWebScript:(const char *)name {
59+
return ![[self _attributeKeys] containsObject:[NSString stringWithUTF8String:name]] && [super isKeyExcludedFromWebScript:name];
60+
}
61+
62+
- (id) initWithString:(NSString *)string {
63+
if ((self = [super init]) != nil) {
64+
const char *data = [string UTF8String];
65+
size_t size = [string lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
66+
67+
static RegEx address_r("\"?(.*)\"? <([^>]*)>");
68+
69+
if (address_r(data, size)) {
70+
name_ = address_r[1];
71+
address_ = address_r[2];
72+
} else {
73+
name_ = string;
74+
address_ = nil;
75+
}
76+
} return self;
77+
}
78+
79+
@end

0 commit comments

Comments
 (0)