package com.qimai.log

import android.content.ContentProvider
import android.content.ContentValues
import android.database.Cursor
import android.net.Uri

class InitContentProvider : ContentProvider() {

    override fun delete(uri: Uri, selection: String?, selectionArgs: Array<String>?): Int {
        throw  UnsupportedOperationException("Not yet implemented")
    }

    override fun getType(uri: Uri): String? {
        throw  UnsupportedOperationException("Not yet implemented")
    }

    override fun insert(uri: Uri, values: ContentValues?): Uri? {
        throw  UnsupportedOperationException("Not yet implemented")
    }

    override fun onCreate(): Boolean {
         context?.let { LogInit.getInstance().init(it) }
        return true
    }

    override fun query(
        uri: Uri, projection: Array<String>?, selection: String?,
        selectionArgs: Array<String>?, sortOrder: String?
    ): Cursor? {
        throw  UnsupportedOperationException("Not yet implemented")
    }

    override fun update(
        uri: Uri, values: ContentValues?, selection: String?,
        selectionArgs: Array<String>?
    ): Int {
        throw  UnsupportedOperationException("Not yet implemented")
    }
}