package kr.co.hanwha.hifive.data.source.contract;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import kr.co.hanwha.hifive.base.BaseDataSource;
import kr.co.hanwha.hifive.data.model.MessageAddData;
import kr.co.hanwha.hifive.data.model.MessageListRoot;
import kr.co.hanwha.hifive.network.hanwha.HanwhaNetworkCallback;

/**
 * TASK - 댓글 관련 데이터 저장소 인터페이스
 *
 * @see kr.co.hanwha.hifive.data.source.TaskMessageDataRepository
 * Created by sanghoonkwon on 2018. 7. 9..
 */
public interface TaskMessageDataSource extends BaseDataSource {
    /**
     * 댓글 - 댓글 목록 조회
     *
     * @param context      Context
     * @param task_id      TASK ID
     * @param current_page 현재 페에지 No
     * @param callback     콜백
     */
    void requestGetMessageList(@NonNull Context context,
                               @NonNull int task_id,
                               @NonNull int current_page,
                               @Nullable HanwhaNetworkCallback<MessageListRoot> callback);

    /**
     * 댓글 - 댓글 등록
     *
     * @param context  Context
     * @param task_id  TASK ID
     * @param contents 댓글 내용
     * @param callback 콜백
     */
    void requestAddMessage(@NonNull Context context,
                           @NonNull int task_id,
                           @NonNull String contents,
                           @Nullable HanwhaNetworkCallback<MessageAddData> callback);

    /**
     * 댓글 삭제
     *
     * @param context  Context
     * @param id       댓글 ID
     * @param callback 콜백
     */
    void requestDeleteMessage(@NonNull Context context,
                              @NonNull int id,
                              @Nullable HanwhaNetworkCallback callback);
}
