-
Notifications
You must be signed in to change notification settings - Fork 56
/
AmazonPlugin.m
51 lines (42 loc) · 871 Bytes
/
AmazonPlugin.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//
// AmazonPlugin.m
// MetaZ
//
// Created by Brian Olsen on 16/11/09.
// Copyright 2009 Maven-Group. All rights reserved.
//
#import "AmazonPlugin.h"
#import "AmazonSearchProvider.h"
@implementation AmazonPlugin
+ (void)initialize
{
static BOOL initialized = NO;
/* Make sure code only gets executed once. */
if (initialized == YES) return;
initialized = YES;
[MZTag registerTag:[MZStringTag tagWithIdentifier:ASINTagIdent]];
}
- (id)init
{
self = [super init];
if(self)
{
AmazonSearchProvider* a = [[[AmazonSearchProvider alloc] init] autorelease];
searchProviders = [[NSArray arrayWithObject:a] retain];
}
return self;
}
- (void)dealloc
{
[searchProviders release];
[super dealloc];
}
- (BOOL)isBuiltIn
{
return YES;
}
- (NSArray *)searchProviders
{
return searchProviders;
}
@end