// **********************************************************************
|
//
|
// Copyright (c) 2008-2023 VCI-Tech, Inc. All rights reserved.
|
//
|
// This copy of Ice is licensed to you under the terms described the
|
// ICE_LICENSE file included this distribution.
|
//
|
// **********************************************************************
|
|
#pragma once
|
|
#include "01-common.ice"
|
|
[["java:package:com.vci.corba"]]
|
["cs:namespace:com.vci.corba"]
|
|
// module com {
|
// module vci {
|
// module corba {
|
module message {
|
module data {
|
struct RefObject {
|
string btName; // 业务对象类型
|
string oid; // 对象OID
|
};
|
sequence<RefObject> RefObjectList;
|
|
// 消息对象
|
struct PLMessage{
|
string oid; // ID
|
string title; // 标题
|
string content; // 内容
|
string creator; // 创建者
|
string createTime; // 创建时间
|
string status; // 状态
|
RefObjectList refObjs; // 关联的业务对象
|
};
|
sequence<PLMessage> PLMessageList;
|
}
|
|
// 消息订阅回调
|
interface MessageCallback {
|
// 发送消息通知
|
void notify(data::PLMessage msg);
|
// 判断接口关联的客户端是否活着
|
bool isAlive();
|
}
|
|
// 消息服务
|
interface MessageService {
|
// 注册业务对象事件消息
|
//long regBusinessObjectMessage(string btName, string eventName) throws common::VCIError;
|
|
// 订阅事件消息
|
//bool subscribeMessage(string user, string btName, string eventName) throws common::VCIError;
|
|
// 注册回调接口
|
void regMessageCallback(MessageCallback* callback);
|
|
// 检查我的消息数量, 根据状态查询我的消息数量,如果不设置status,则查询未读消息
|
long checkMessage(string user);
|
|
// 获取指定消息
|
data::PLMessage getMessage(string msgid) throws common::VCIError;
|
|
// 获取指定用户的所有未读消息
|
data::PLMessageList getMessages(string user) throws common::VCIError;
|
|
// 获取指定消息
|
data::PLMessageList getMessagesByIds(common::data::StringArray msgids) throws common::VCIError;
|
|
// 获取指定用户的所有指定状态的消息,不指定状态则获取所有消息
|
data::PLMessageList getMessagesByPage(string user, string status, int pageNo, int pageSize) throws common::VCIError;
|
|
// 设置指定消息指定用户已读
|
bool setMessageReaded(string user, string msgid) throws common::VCIError;
|
|
// 设置指定用户指定消息已完成
|
bool setMessageCompleted(string user, string msgid) throws common::VCIError;
|
|
// 创建消息,返回消息OID
|
string createMessage(string title, string msg, data::RefObjectList refObjs) throws common::VCIError;
|
|
// 保存并发送消息,用户账号数组
|
bool createAndSendMessage(string title, string msg, data::RefObjectList refObjs, common::data::StringArray users) throws common::VCIError;
|
|
// 发送消息给指定用户
|
bool sendMessageTo(string msgid, common::data::StringArray users) throws common::VCIError;
|
}
|
}
|
// }}}
|