-
-
Notifications
You must be signed in to change notification settings - Fork 13
Sync Protocol
Janne Koschinski edited this page Mar 16, 2017
·
5 revisions
These objects are all serialized/deserialized as explained in the document specifying complex serialization/deserialization. Additionally, if any of the methods specified here takes a complex type as parameter, you can assume that it is in a QVariant with a proper usertype tag. If any of the methods specified here takes a complex sync type as parameter, though, it will be passed a Map instead, and you have to turn the map into the Object yourself.
Methods annotated with @Core
are only implemented on the core, and can only be
called by clients, while methods annotated as @Client
only exist on the
client, and can therefore only be called by the core.
interface AliasManager {
void addAlias(String name, String expansion);
void update(AliasManager from);
}
interface BacklogManager {
@Core void requestBacklog(BufferId id, MsgId first, MsgId last, int limit, int additional);
@Core void requestBacklogAll(MsgId first, MsgId last, int limit, int additional);
@Client void receiveBacklog(BufferId id, MsgId first, MsgId last, int limit, int additional, List<Message> messages);
@Client void receiveBacklogAll(MsgId first, MsgId last, int limit, int additional, List<Message> messages);
void update(BacklogManager from);
}
interface BufferSyncer {
@Core void requestSetLastSeenMsg(BufferId buffer, MsgId msgId);
@Core void requestSetMarkerLine(BufferId buffer, MsgId msgId);
@Core void requestRemoveBuffer(BufferId buffer);
@Core void requestRenameBuffer(BufferId buffer, String newName);
@Core void requestMergeBuffersPermanently(BufferId buffer1, BufferId buffer2);
@Core void requestPurgeBufferIds();
@Core void requestMarkBufferAsRead(BufferId buffer);
@Client void setLastSeenMsg(BufferId buffer, MsgId msgId);
@Client void setMarkerLine(BufferId buffer, MsgId msgId);
@Client void removeBuffer(BufferId buffer);
@Client void renameBuffer(BufferId buffer, String newName);
@Client void mergeBuffersPermanently(BufferId buffer1, BufferId buffer2);
@Client void markBufferAsRead(BufferId buffer);
void update(BufferSyncer from);
}
interface BufferViewConfig {
@Core void requestAddBuffer(BufferId bufferId, int pos);
@Core void requestMoveBuffer(BufferId bufferId, int pos);
@Core void requestRemoveBuffer(BufferId bufferId);
@Core void requestRemoveBufferPermanently(BufferId bufferId);
@Core void requestSetBufferViewName(String bufferViewName);
@Client void addBuffer(BufferId bufferId, int pos);
@Client void moveBuffer(BufferId bufferId, int pos);
@Client void removeBuffer(BufferId bufferId);
@Client void removeBufferPermanently(BufferId bufferId);
@Client void setBufferViewName(String bufferViewName);
void setNetworkId(NetworkId networkId);
void setAddNewBuffersAutomatically(boolean addNewBuffersAutomatically);
void setSortAlphabetically(boolean sortAlphabetically);
void setDisableDecoration(boolean disableDecoration);
void setAllowedBufferTypes(BufferId bufferTypes);
void setMinimumActivity(int activity);
void setHideInactiveBuffers(boolean hideInactiveBuffers);
void setHideInactiveNetworks(boolean hideInactiveNetworks);
void update(BufferViewConfig from);
}
interface BufferViewManager {
@Core void requestCreateBufferView(BufferViewConfig properties);
@Core void requestCreateBufferViews(List<QVariant> properties);
@Core void requestDeleteBufferView(BufferId bufferViewId);
@Core void requestDeleteBufferViews(List<Integer> bufferViews);
@Client void addBufferViewConfig(BufferId bufferViewConfigId);
@Client void newBufferViewConfig(BufferId bufferViewConfigId);
@Client void deleteBufferViewConfig(BufferId bufferViewConfigId);
void update(BufferViewManager from);
}
interface CertManager {
void setSslKey(byte[] encoded);
void setSslCert(byte[] encoded);
void update(CertManager from);
}
interface CoreInfo {
void setCoreData(Map<String, QVariant> coreData);
void update(CoreInfo from);
}
interface Identity {
void setId(IdentityId id);
void setIdentityName(String name);
void setRealName(String realName);
void setNicks(List<String> nicks);
void setAwayNick(String awayNick);
void setAwayNickEnabled(boolean enabled);
void setAwayReason(String awayReason);
void setAwayReasonEnabled(boolean enabled);
void setAutoAwayEnabled(boolean enabled);
void setAutoAwayTime(int time);
void setAutoAwayReason(String reason);
void setAutoAwayReasonEnabled(boolean enabled);
void setDetachAwayEnabled(boolean enabled);
void setDetachAwayReason(String reason);
void setDetachAwayReasonEnabled(boolean enabled);
void setIdent(String ident);
void setKickReason(String reason);
void setPartReason(String reason);
void setQuitReason(String reason);
void setSslKey(String encoded);
void setSslCert(String encoded);
void update(Identity from);
}
interface IgnoreListManager {
@Core void requestRemoveIgnoreListItem(String ignoreRule);
@Core void requestToggleIgnoreRule(String ignoreRule);
@Core void requestAddIgnoreListItem(IgnoreType type, String ignoreRule, boolean isRegEx, StrictnessType strictness, ScopeType scope, String scopeRule, boolean isActive);
@Client void removeIgnoreListItem(String ignoreRule);
@Client void toggleIgnoreRule(String ignoreRule);
@Client void addIgnoreListItem(IgnoreType type, String ignoreRule, boolean isRegEx, StrictnessType strictness, ScopeType scope, String scopeRule, boolean isActive);
void update(Map<String, QVariant> from);
void update(IgnoreListManager from);
enum IgnoreType {
SENDER(0),
MESSAGE(1),
CTCP(2)
}
enum StrictnessType {
UNMATCHED(0),
SOFT(1),
HARD(2)
}
enum ScopeType {
GLOBAL(0),
NETWORK(1),
CHANNEL(2)
}
}
interface IrcChannel {
void setTopic(String topic);
void setPassword(String password);
void setEncrypted(boolean encrypted);
void joinIrcUsers(List<IrcUser> users, List<String> modes);
void joinIrcUsers(List<String> nicks, List<String> modes);
void part(String nick);
void setUserModes(String nick, String modes);
void addUserMode(String nick, String mode);
void removeUserMode(String nick, String mode);
void addChannelMode(char mode, String value);
void removeChannelMode(char mode, String value);
void update(IrcChannel from);
}
interface IrcUser {
void setAway(boolean away);
void setUser(String user);
void setHost(String host);
void setNick(String nick);
void setRealName(String realName);
void setAwayMessage(String awayMessage);
void setIdleTime(DateTime idleTime);
void setLoginTime(DateTime loginTime);
void setServer(String server);
void setIrcOperator(String ircOperator);
void setLastAwayMessage(MsgId lastAwayMessage);
void setWhoisServiceReply(String whoisServiceReply);
void setSuserHost(String suserHost);
void setEncrypted(boolean encrypted);
void updateHostmask(String mask);
void setUserModes(String modes);
void joinChannel(String channelname);
void partChannel(String channelname);
void quit();
void addUserModes(String modes);
void removeUserModes(String modes);
void update(IrcUser from);
}
interface Network {
void setConnected(boolean isConnected);
void setAutoAwayActive(boolean active);
void setNetworkName(String networkName);
void setCurrentServer(String currentServer);
void setConnectionState(int state);
void setMyNick(String mynick);
void setLatency(int latency);
void setIdentity(IdentityId identityId);
void setServerList(List<NetworkServer> serverList);
void setUseRandomServer(boolean useRandomServer);
void setPerform(List<String> performs);
void setUseAutoIdentify(boolean useAutoIdentify);
void setAutoIdentifyService(String autoIdentifyService);
void setAutoIdentifyPassword(String autoIdentifyPassword);
void setUseSasl(boolean useSasl);
void setSaslAccount(String saslAccount);
void setSaslPassword(String saslPassword);
void setUseAutoReconnect(boolean useAutoReconnect);
void setAutoReconnectInterval(int autoReconnectInterval);
void setAutoReconnectRetries(short autoReconnectRetries);
void setUnlimitedReconnectRetries(boolean unlimitedReconnectRetries);
void setRejoinChannels(boolean rejoinChannels);
void setCodecForServer(String codecName);
void setCodecForEncoding(String codecName);
void setCodecForDecoding(String codecName);
void addSupport(String param);
void addSupport(String param, String value);
void removeSupport(String param);
void addIrcUser(String hostmask);
void addIrcChannel(String channel);
void updateNickFromMask(String mask);
void ircUserNickChanged(String oldNick, String newnick);
void connect();
void disconnect();
void setNetworkInfo(NetworkInfo info);
void removeChansAndUsers();
void update(Network from);
enum ConnectionState {
DISCONNECTED(0),
CONNECTING(1),
INITIALIZING(2),
INITIALIZED(3),
RECONNECTING(4),
DISCONNECTING(5)
}
enum ChannelModeType {
INVALID(0),
A(1),
B(2),
C(3),
D(4)
}
}
interface NetworkConfig {
@Core void requestSetPingTimeoutEnabled(boolean pingTimeoutEnabled);
@Core void requestSetPingInterval(int pingInterval);
@Core void requestSetMaxPingCount(int maxPingCount);
@Core void requestSetAutoWhoEnabled(boolean autoWhoEnabled);
@Core void requestSetAutoWhoInterval(int autoWhoInterval);
@Core void requestSetAutoWhoNickLimit(int autoWhoNickLimit);
@Core void requestSetAutoWhoDelay(int autoWhoDelay);
@Core void requestSetStandardCtcp(boolean standardCtcp);
@Client void setPingTimeoutEnabled(boolean pingTimeoutEnabled);
@Client void setPingInterval(int pingInterval);
@Client void setMaxPingCount(int maxPingCount);
@Client void setAutoWhoEnabled(boolean autoWhoEnabled);
@Client void setAutoWhoInterval(int autoWhoInterval);
@Client void setAutoWhoNickLimit(int autoWhoNickLimit);
@Client void setAutoWhoDelay(int autoWhoDelay);
@Client void setStandardCtcp(boolean standardCtcp);
void update(NetworkConfig from);
}