// Path: module_girls/src/main/java/com/guiying/module/girls/data/GirlsDataSource.java
// public interface GirlsDataSource {
// 
//     interface LoadGirlsCallback {
// 
//         void onGirlsLoaded(GirlsParser girlsParser);
// 
//         void onDataNotAvailable();
//     }
// 
//     void getGirls(int size, int page, LoadGirlsCallback callback);
// 
// }
// 
// Path: module_girls/src/main/java/com/guiying/module/girls/data/bean/GirlsParser.java
// public class GirlsParser {
// 
//     /**
//      * error : false
//      * results : [{"_id":"5771d5eb421aa931ddcc50d6","createdAt":"2016-06-28T09:42:03.761Z","desc":"Dagger2图文完全教程","publishedAt":"2016-06-28T11:33:25.276Z","source":"web","type":"Android","url":"https://github.com/luxiaoming/dagger2Demo","used":true,"who":"代码GG陆晓明"},{"_id":"5771c9ca421aa931ca5a7e59","createdAt":"2016-06-28T08:50:18.731Z","desc":"Android Design 设计模板","publishedAt":"2016-06-28T11:33:25.276Z","source":"chrome","type":"Android","url":"https://github.com/andreasschrade/android-design-template","used":true,"who":"代码家"}]
//      */
// 
//     private boolean error;
//     /**
//      * _id : 5771d5eb421aa931ddcc50d6
//      * createdAt : 2016-06-28T09:42:03.761Z
//      * desc : Dagger2图文完全教程
//      * publishedAt : 2016-06-28T11:33:25.276Z
//      * source : web
//      * type : Android
//      * url : https://github.com/luxiaoming/dagger2Demo
//      * used : true
//      * who : 代码GG陆晓明
//      */
// 
//     private List<Girls> results;
// 
//     public void setError(boolean error) {
//         this.error = error;
//     }
// 
//     public void setResults(List<Girls> results) {
//         this.results = results;
//     }
// 
//     public boolean isError() {
//         return error;
//     }
// 
//     public List<Girls> getResults() {
//         return results;
//     }
// 
// 
// }
// 
// Path: module_girls/src/main/java/com/guiying/module/girls/data/source/RemoteGirlsDataSource.java
// public class RemoteGirlsDataSource implements GirlsDataSource {
// 
//     @Override
//     public void getGirls(int size, int page, final LoadGirlsCallback callback) {
//         HttpClient client = new HttpClient.Builder()
//                 .baseUrl(Constants.GAN_HUO_API)
//                 .url("福利/" + size + "/" + page)
//                 .bodyType(DataType.JSON_OBJECT, GirlsParser.class)
//                 .build();
//         client.get(new OnResultListener<GirlsParser>() {
// 
//             @Override
//             public void onSuccess(GirlsParser result) {
//                 callback.onGirlsLoaded(result);
//             }
// 
//             @Override
//             public void onError(int code, String message) {
//                 callback.onDataNotAvailable();
//             }
// 
//             @Override
//             public void onFailure(String message) {
//                 callback.onDataNotAvailable();
//             }
//         });
//     }
// 
// }


import com.guiying.module.girls.data.GirlsDataSource;
import com.guiying.module.girls.data.bean.GirlsParser;
import com.guiying.module.girls.data.source.RemoteGirlsDataSource;
package com.guiying.module.girls.main;


/**
 * <p>类说明</p>
 *
 * @author 张华洋 2017/2/22 20:33
 * @version V1.2.0
 * @name GirlsPresenter
 */
public class GirlsPresenter implements GirlsContract.Presenter {

    private GirlsContract.View mView;
    private GirlsDataSource mDataSource;

// Path: module_girls/src/main/java/com/guiying/module/girls/data/GirlsDataSource.java
// public interface GirlsDataSource {
// 
//     interface LoadGirlsCallback {
// 
//         void onGirlsLoaded(GirlsParser girlsParser);
// 
//         void onDataNotAvailable();
//     }
// 
//     void getGirls(int size, int page, LoadGirlsCallback callback);
// 
// }
// 
// Path: module_girls/src/main/java/com/guiying/module/girls/data/bean/GirlsParser.java
// public class GirlsParser {
// 
//     /**
//      * error : false
//      * results : [{"_id":"5771d5eb421aa931ddcc50d6","createdAt":"2016-06-28T09:42:03.761Z","desc":"Dagger2图文完全教程","publishedAt":"2016-06-28T11:33:25.276Z","source":"web","type":"Android","url":"https://github.com/luxiaoming/dagger2Demo","used":true,"who":"代码GG陆晓明"},{"_id":"5771c9ca421aa931ca5a7e59","createdAt":"2016-06-28T08:50:18.731Z","desc":"Android Design 设计模板","publishedAt":"2016-06-28T11:33:25.276Z","source":"chrome","type":"Android","url":"https://github.com/andreasschrade/android-design-template","used":true,"who":"代码家"}]
//      */
// 
//     private boolean error;
//     /**
//      * _id : 5771d5eb421aa931ddcc50d6
//      * createdAt : 2016-06-28T09:42:03.761Z
//      * desc : Dagger2图文完全教程
//      * publishedAt : 2016-06-28T11:33:25.276Z
//      * source : web
//      * type : Android
//      * url : https://github.com/luxiaoming/dagger2Demo
//      * used : true
//      * who : 代码GG陆晓明
//      */
// 
//     private List<Girls> results;
// 
//     public void setError(boolean error) {
//         this.error = error;
//     }
// 
//     public void setResults(List<Girls> results) {
//         this.results = results;
//     }
// 
//     public boolean isError() {
//         return error;
//     }
// 
//     public List<Girls> getResults() {
//         return results;
//     }
// 
// 
// }
// 
// Path: module_girls/src/main/java/com/guiying/module/girls/data/source/RemoteGirlsDataSource.java
// public class RemoteGirlsDataSource implements GirlsDataSource {
// 
//     @Override
//     public void getGirls(int size, int page, final LoadGirlsCallback callback) {
//         HttpClient client = new HttpClient.Builder()
//                 .baseUrl(Constants.GAN_HUO_API)
//                 .url("福利/" + size + "/" + page)
//                 .bodyType(DataType.JSON_OBJECT, GirlsParser.class)
//                 .build();
//         client.get(new OnResultListener<GirlsParser>() {
// 
//             @Override
//             public void onSuccess(GirlsParser result) {
//                 callback.onGirlsLoaded(result);
//             }
// 
//             @Override
//             public void onError(int code, String message) {
//                 callback.onDataNotAvailable();
//             }
// 
//             @Override
//             public void onFailure(String message) {
//                 callback.onDataNotAvailable();
//             }
//         });
//     }
// 
// }


// Path: module_girls/src/main/java/com/guiying/module/girls/main/GirlsPresenter.java
import com.guiying.module.girls.data.GirlsDataSource;
import com.guiying.module.girls.data.bean.GirlsParser;
import com.guiying.module.girls.data.source.RemoteGirlsDataSource;

package com.guiying.module.girls.main;


/**
 * <p>类说明</p>
 *
 * @author 张华洋 2017/2/22 20:33
 * @version V1.2.0
 * @name GirlsPresenter
 */
public class GirlsPresenter implements GirlsContract.Presenter {

    private GirlsContract.View mView;
    private GirlsDataSource mDataSource;

    public GirlsPresenter(GirlsContract.View view) {