This commit is contained in:
wangcongtao
2020-01-06 19:49:05 +08:00
parent 9ad9722cd2
commit 09053f4a0b
106 changed files with 691 additions and 36 deletions

View File

@@ -50,4 +50,14 @@ public class MogoServicePaths {
* 状态管理接口
*/
public static final String PATH_STATUS_MANAGER = "/statusmanager/api";
/**
* 消息中心
*/
public static final String PATH_MSG_CENTER = "/msgcenter/api";
/**
* 消息中心
*/
public static final String PATH_WINDOW_MANAGER = "/windowmanger/api";
}

View File

@@ -0,0 +1,34 @@
package com.mogo.service.statusmanager;
import com.alibaba.android.arouter.facade.template.IProvider;
/**
* @author congtaowang
* @since 2020-01-06
* <p>
* 消息管控
*/
public interface IMogoMsgCenter extends IProvider {
/**
* 设置消息状态
*
* @param hasMsg 是否有未读消息
* @param msgAmount 未读消息数量
*/
void setMsgStatus( boolean hasMsg, int msgAmount );
/**
* 注册消息监听
*
* @param listener
*/
void registerMsgCenterListener( IMogoMsgCenterListener listener );
/**
* 注册消息监听
*
* @param listener
*/
void unregisterMsgCenterListener( IMogoMsgCenterListener listener );
}

View File

@@ -0,0 +1,18 @@
package com.mogo.service.statusmanager;
/**
* @author congtaowang
* @since 2020-01-06
* <p>
* 消息管控
*/
public interface IMogoMsgCenterListener {
/**
* 消息变更
*
* @param hasMsg 是否有消息
* @param amount 消息数量
*/
void onMsgChanged( boolean hasMsg, int amount );
}

View File

@@ -0,0 +1,32 @@
package com.mogo.service.windowview;
import android.view.View;
import com.alibaba.android.arouter.facade.template.IProvider;
/**
* @author congtaowang
* @since 2020-01-06
* <p>
* 根据优先级控制显示 window view.
*/
public interface IMogoWindowManager extends IProvider {
/**
* 向window中添加指定的布局
*
* @param priority 优先级
* @param view 添加的实例
* @param x 左上角x坐标
* @param y 左上角y坐标
* @param movable 是否可移动(无效)
*/
void addView( int priority, View view, int x, int y, boolean movable );
/**
* 移除对应的 view
*
* @param view
*/
void removeView( View view );
}