-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDelivererContext.h
74 lines (62 loc) · 2.35 KB
/
DelivererContext.h
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/**
* @file DelivererContext.h
* @brief DelivererContext class declaration
* @author Masayuki YAMAYA
* @date 2008-03-03
*/
#import <Foundation/NSObject.h>
#import <WebKit/WebScriptObject.h>
@class DOMHTMLDocument;
@class DOMHTMLElement;
@class DOMNode;
@class DOMXPathResult;
@interface DelivererContext : NSObject
{
DOMHTMLDocument * document_;
}
@property (nonatomic, readonly) DOMHTMLDocument * document;
@property (nonatomic, readonly) NSString * documentTitle;
@property (nonatomic, readonly) NSString * documentURL;
@property (nonatomic, readonly) NSString * anchorToDocument;
@property (nonatomic, readonly) NSString * menuTitle;
/**
* To process HTML documents to determine whether.
* @param[in] document DOM document to be evaluated
* @param[in] targetElement DOM lement to be evaluated
* @return YES is to be processed
*/
+ (BOOL)match:(DOMHTMLDocument *)document target:(NSDictionary *)targetElement;
/**
* To process HTML documents to determine whether - auto detect DOM element.
* @param[in] document DOM document to be evaluated
* @param[in] wso WebScriptObject object
* @return YES is to be processed
*/
+ (DOMHTMLElement *)matchForAutoDetection:(DOMHTMLDocument *)document windowScriptObject:(WebScriptObject *)wso;
/**
* Initialize object
* creates an object inside DelivererContext.
* @param[in] document Currently displayed object DOMHTMLDocument
* @param[in] targetElement Selected elements
*/
- (id)initWithDocument:(DOMHTMLDocument *)document target:(NSDictionary *)targetElement;
/**
* Evaluate XPath expression
* Utility method for Subclass.
* @param[in] expressions XPath expression (array of NSString object)
* @param[in] document DOM document to be evaluated
* @param[in] contextNode DOM node to be evaluated
* @return DOMHTMLElement object of XPath evalueted
*/
+ (DOMHTMLElement *)evaluate:(NSArray *)expressions document:(DOMHTMLDocument *)document contextNode:(DOMNode *)node;
/**
* Evaluate XPath expression
* Utility method for Subclass.
* @param[in] expressions XPath expression string
* @param[in] contextNode DOM node to be evaluated
* @param[in] type XPath evaluate type
* @param[in] inResult XPathResult object for evaluate
* @return DOMXPathResult object
*/
- (DOMXPathResult *)evaluateToDocument:(NSString *)expression contextNode:(DOMNode *)contextNode type:(unsigned short)type inResult:(DOMXPathResult *)inResult;
@end