2019-06-18 18:00:20 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2019 New Vector Ltd
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2019-07-02 15:27:08 +00:00
|
|
|
package im.vector.riotx.core.di
|
2019-06-18 18:00:20 +00:00
|
|
|
|
|
|
|
import android.content.Context
|
|
|
|
import android.content.res.Resources
|
|
|
|
import dagger.BindsInstance
|
|
|
|
import dagger.Component
|
|
|
|
import im.vector.matrix.android.api.Matrix
|
2019-06-20 17:26:59 +00:00
|
|
|
import im.vector.matrix.android.api.auth.Authenticator
|
2019-06-18 18:00:20 +00:00
|
|
|
import im.vector.matrix.android.api.session.Session
|
2019-07-02 15:27:08 +00:00
|
|
|
import im.vector.riotx.EmojiCompatFontProvider
|
2019-08-29 15:27:49 +00:00
|
|
|
import im.vector.riotx.EmojiCompatWrapper
|
2019-07-02 15:27:08 +00:00
|
|
|
import im.vector.riotx.VectorApplication
|
|
|
|
import im.vector.riotx.core.pushers.PushersManager
|
|
|
|
import im.vector.riotx.features.configuration.VectorConfiguration
|
|
|
|
import im.vector.riotx.features.crypto.keysrequest.KeyRequestHandler
|
|
|
|
import im.vector.riotx.features.crypto.verification.IncomingVerificationRequestHandler
|
|
|
|
import im.vector.riotx.features.home.AvatarRenderer
|
|
|
|
import im.vector.riotx.features.home.HomeNavigator
|
|
|
|
import im.vector.riotx.features.home.HomeRoomListObservableStore
|
|
|
|
import im.vector.riotx.features.home.group.SelectedGroupStore
|
2019-07-02 16:29:59 +00:00
|
|
|
import im.vector.riotx.features.html.EventHtmlRenderer
|
2019-07-02 15:27:08 +00:00
|
|
|
import im.vector.riotx.features.navigation.Navigator
|
|
|
|
import im.vector.riotx.features.notifications.NotifiableEventResolver
|
|
|
|
import im.vector.riotx.features.notifications.NotificationBroadcastReceiver
|
|
|
|
import im.vector.riotx.features.notifications.NotificationDrawerManager
|
|
|
|
import im.vector.riotx.features.notifications.PushRuleTriggerListener
|
|
|
|
import im.vector.riotx.features.rageshake.BugReporter
|
2019-09-02 12:33:53 +00:00
|
|
|
import im.vector.riotx.features.rageshake.VectorFileLogger
|
2019-07-02 15:27:08 +00:00
|
|
|
import im.vector.riotx.features.rageshake.VectorUncaughtExceptionHandler
|
2019-08-08 09:52:50 +00:00
|
|
|
import im.vector.riotx.features.settings.VectorPreferences
|
2019-06-18 18:00:20 +00:00
|
|
|
import javax.inject.Singleton
|
|
|
|
|
|
|
|
@Component(modules = [VectorModule::class])
|
|
|
|
@Singleton
|
|
|
|
interface VectorComponent {
|
|
|
|
|
2019-06-27 13:25:01 +00:00
|
|
|
fun inject(vectorApplication: NotificationBroadcastReceiver)
|
|
|
|
|
2019-06-26 13:22:44 +00:00
|
|
|
fun inject(vectorApplication: VectorApplication)
|
|
|
|
|
2019-06-18 18:00:20 +00:00
|
|
|
fun matrix(): Matrix
|
|
|
|
|
|
|
|
fun currentSession(): Session
|
|
|
|
|
|
|
|
fun notificationDrawerManager(): NotificationDrawerManager
|
|
|
|
|
|
|
|
fun appContext(): Context
|
|
|
|
|
|
|
|
fun resources(): Resources
|
|
|
|
|
|
|
|
fun vectorConfiguration(): VectorConfiguration
|
|
|
|
|
2019-06-27 16:56:23 +00:00
|
|
|
fun avatarRenderer(): AvatarRenderer
|
|
|
|
|
2019-06-26 13:22:44 +00:00
|
|
|
fun activeSessionHolder(): ActiveSessionHolder
|
|
|
|
|
2019-06-20 17:26:59 +00:00
|
|
|
fun emojiCompatFontProvider(): EmojiCompatFontProvider
|
|
|
|
|
2019-08-29 15:27:49 +00:00
|
|
|
fun emojiCompatWrapper() : EmojiCompatWrapper
|
|
|
|
|
2019-07-01 18:19:50 +00:00
|
|
|
fun eventHtmlRenderer(): EventHtmlRenderer
|
|
|
|
|
2019-06-18 18:00:20 +00:00
|
|
|
fun navigator(): Navigator
|
|
|
|
|
2019-06-19 17:40:59 +00:00
|
|
|
fun homeNavigator(): HomeNavigator
|
|
|
|
|
2019-06-18 18:00:20 +00:00
|
|
|
fun homeRoomListObservableStore(): HomeRoomListObservableStore
|
|
|
|
|
|
|
|
fun selectedGroupStore(): SelectedGroupStore
|
|
|
|
|
|
|
|
fun incomingVerificationRequestHandler(): IncomingVerificationRequestHandler
|
|
|
|
|
|
|
|
fun incomingKeyRequestHandler(): KeyRequestHandler
|
|
|
|
|
2019-06-20 17:26:59 +00:00
|
|
|
fun authenticator(): Authenticator
|
|
|
|
|
2019-06-26 13:22:44 +00:00
|
|
|
fun bugReporter(): BugReporter
|
|
|
|
|
|
|
|
fun vectorUncaughtExceptionHandler(): VectorUncaughtExceptionHandler
|
|
|
|
|
2019-06-27 13:25:01 +00:00
|
|
|
fun pushRuleTriggerListener(): PushRuleTriggerListener
|
|
|
|
|
2019-06-28 07:35:34 +00:00
|
|
|
fun pusherManager(): PushersManager
|
|
|
|
|
|
|
|
fun notifiableEventResolver(): NotifiableEventResolver
|
|
|
|
|
2019-08-08 09:52:50 +00:00
|
|
|
fun vectorPreferences(): VectorPreferences
|
|
|
|
|
2019-09-02 12:33:53 +00:00
|
|
|
fun vectorFileLogger(): VectorFileLogger
|
|
|
|
|
2019-06-18 18:00:20 +00:00
|
|
|
@Component.Factory
|
|
|
|
interface Factory {
|
|
|
|
fun create(@BindsInstance context: Context): VectorComponent
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|