Browse Source

Add missing files.

pull/76/head
Chris Smith 9 years ago
parent
commit
f6ff601095

+ 1
- 0
.gitignore View File

@@ -11,4 +11,5 @@ build-before-profiler.xml
11 11
 /etc/nexus-teamcity.properties
12 12
 /.gradle
13 13
 /*/build
14
+/*/generated
14 15
 /nexus-teamcity.gradle

+ 74
- 0
irc/src/com/dmdirc/parser/irc/IRCParserModule.java View File

@@ -0,0 +1,74 @@
1
+/*
2
+ * Copyright (c) 2006-2015 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.irc;
24
+
25
+import com.dmdirc.parser.irc.processors.ProcessorsModule;
26
+
27
+import javax.inject.Named;
28
+
29
+import dagger.Module;
30
+import dagger.Provides;
31
+
32
+/**
33
+ * Dagger module for injecting the main IRC parser and its dependencies.
34
+ */
35
+@Module(includes = ProcessorsModule.class, injects = ProcessingManager.class)
36
+public class IRCParserModule {
37
+
38
+    private final IRCParser parser;
39
+    private final PrefixModeManager prefixModeManager;
40
+    private final ModeManager userModeManager;
41
+    private final ModeManager chanModeManager;
42
+
43
+    public IRCParserModule(final IRCParser parser, final PrefixModeManager prefixModeManager,
44
+            final ModeManager userModeManager, final ModeManager chanModeManager) {
45
+        // TODO: Make all of these things injected.
46
+        this.parser = parser;
47
+        this.prefixModeManager = prefixModeManager;
48
+        this.userModeManager = userModeManager;
49
+        this.chanModeManager = chanModeManager;
50
+    }
51
+
52
+    @Provides
53
+    public IRCParser getParser() {
54
+        return parser;
55
+    }
56
+
57
+    @Provides
58
+    public PrefixModeManager getPrefixModeManager() {
59
+        return prefixModeManager;
60
+    }
61
+
62
+    @Provides
63
+    @Named("user")
64
+    public ModeManager getUserModeManager() {
65
+        return userModeManager;
66
+    }
67
+
68
+    @Provides
69
+    @Named("channel")
70
+    public ModeManager getChanModeManager() {
71
+        return chanModeManager;
72
+    }
73
+
74
+}

+ 149
- 0
irc/src/com/dmdirc/parser/irc/processors/ProcessorsModule.java View File

@@ -0,0 +1,149 @@
1
+/*
2
+ * Copyright (c) 2006-2015 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.parser.irc.processors;
24
+
25
+import dagger.Module;
26
+import dagger.Provides;
27
+
28
+/**
29
+ * Dagger module that supplies a set of processors.
30
+ */
31
+@Module(library = true, complete = false)
32
+public class ProcessorsModule {
33
+
34
+    @Provides(type = Provides.Type.SET)
35
+    public IRCProcessor getProcessor(final Process001 processor) {
36
+        return processor;
37
+    }
38
+
39
+    @Provides(type = Provides.Type.SET)
40
+    public IRCProcessor getProcessor(final Process464 processor) {
41
+        return processor;
42
+    }
43
+
44
+    @Provides(type = Provides.Type.SET)
45
+    public IRCProcessor getProcessor(final Process004005 processor) {
46
+        return processor;
47
+    }
48
+
49
+    @Provides(type = Provides.Type.SET)
50
+    public IRCProcessor getProcessor(final ProcessAccount processor) {
51
+        return processor;
52
+    }
53
+
54
+    @Provides(type = Provides.Type.SET)
55
+    public IRCProcessor getProcessor(final ProcessAway processor) {
56
+        return processor;
57
+    }
58
+
59
+    @Provides(type = Provides.Type.SET)
60
+    public IRCProcessor getProcessor(final ProcessCap processor) {
61
+        return processor;
62
+    }
63
+
64
+    @Provides(type = Provides.Type.SET)
65
+    public IRCProcessor getProcessor(final ProcessInvite processor) {
66
+        return processor;
67
+    }
68
+
69
+    @Provides(type = Provides.Type.SET)
70
+    public IRCProcessor getProcessor(final ProcessJoin processor) {
71
+        return processor;
72
+    }
73
+
74
+    @Provides(type = Provides.Type.SET)
75
+    public IRCProcessor getProcessor(final ProcessKick processor) {
76
+        return processor;
77
+    }
78
+
79
+    @Provides(type = Provides.Type.SET)
80
+    public IRCProcessor getProcessor(final ProcessList processor) {
81
+        return processor;
82
+    }
83
+
84
+    @Provides(type = Provides.Type.SET)
85
+    public IRCProcessor getProcessor(final ProcessListModes processor) {
86
+        return processor;
87
+    }
88
+
89
+    @Provides(type = Provides.Type.SET)
90
+    public IRCProcessor getProcessor(final ProcessMessage processor) {
91
+        return processor;
92
+    }
93
+
94
+    @Provides(type = Provides.Type.SET)
95
+    public IRCProcessor getProcessor(final ProcessMode processor) {
96
+        return processor;
97
+    }
98
+
99
+    @Provides(type = Provides.Type.SET)
100
+    public IRCProcessor getProcessor(final ProcessMOTD processor) {
101
+        return processor;
102
+    }
103
+
104
+    @Provides(type = Provides.Type.SET)
105
+    public IRCProcessor getProcessor(final ProcessNames processor) {
106
+        return processor;
107
+    }
108
+
109
+    @Provides(type = Provides.Type.SET)
110
+    public IRCProcessor getProcessor(final ProcessNick processor) {
111
+        return processor;
112
+    }
113
+
114
+    @Provides(type = Provides.Type.SET)
115
+    public IRCProcessor getProcessor(final ProcessNickInUse processor) {
116
+        return processor;
117
+    }
118
+
119
+    @Provides(type = Provides.Type.SET)
120
+    public IRCProcessor getProcessor(final ProcessNoticeAuth processor) {
121
+        return processor;
122
+    }
123
+
124
+    @Provides(type = Provides.Type.SET)
125
+    public IRCProcessor getProcessor(final ProcessPart processor) {
126
+        return processor;
127
+    }
128
+
129
+    @Provides(type = Provides.Type.SET)
130
+    public IRCProcessor getProcessor(final ProcessQuit processor) {
131
+        return processor;
132
+    }
133
+
134
+    @Provides(type = Provides.Type.SET)
135
+    public IRCProcessor getProcessor(final ProcessTopic processor) {
136
+        return processor;
137
+    }
138
+
139
+    @Provides(type = Provides.Type.SET)
140
+    public IRCProcessor getProcessor(final ProcessWallops processor) {
141
+        return processor;
142
+    }
143
+
144
+    @Provides(type = Provides.Type.SET)
145
+    public IRCProcessor getProcessor(final ProcessWho processor) {
146
+        return processor;
147
+    }
148
+
149
+}

Loading…
Cancel
Save