CONSTANT.m
6.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
//
// CONSTANT.m
// Login
//
// Created by 钱鋆 on 15/4/1.
// Copyright (c) 2015年 pcbeta. All rights reserved.
//
NSString *const REPLACEMENT_NODATA = @"";
NSString *const REPLACEMENT_NOHEADIMG = @"DefaultAvatar";
UInt64 const SESSIONID_SYSTEM = 13579;
NSString *const callBackKey_needRecoverSelectRow = @"callBackKey_needRecoverSelectRow";
/*
* 常量定义
*/
float const JPEG_QUALITY = 0.8;
NSString *const DEFAULT_TENANT_NAME = @"犀牛网络科技";
NSString *const XMPPMESSAGE_MESSAGE = @"message";
NSString *const XMPPMESSAGE_FROM = @"from";
NSString *const XMPPMESSAGE_BODY = @"body";
NSString *const XMPPMESSAGE_IQ = @"iq";
NSString *const XMPPMESSAGE_SUBJECT = @"subject";
NSString *const XMPPMESSAGE_TYPE = @"type";
NSString *const SYSTEMMSG_TYPE_GROUPINVITE = @"GROUPINVITE";
NSString *const SYSTEMMSG_TYPE_USERINVITE = @"USERINVITE";
NSString *const PREFIX_AGREE_BUDDYADD = @"http://agreeBuddyAdd:";
NSString *const AGREE_BUDDYADD = @"agreeBuddyAdd";
NSString *const PREFIX_REJECT_BUDDYADD = @"http://rejectBuddyAdd:";
NSString *const REJECT_BUDDYADD = @"rejectBuddyAdd";
NSString *const GROUPINVIET_AGREE = @"1";
NSString *const GROUPINVIET_REJECT = @"2";
NSString *const USERINVIET_AGREE = @"1";
NSString *const USERINVIET_REJECT = @"2";
/*
* URL定义
*/
NSString *const URL_ForgetPassword = @"http://auth.xiniunet.com/forget.htm";
NSString *const URL_ModifyPassword = @"https://auth.xiniunet.com/change.htm";
NSString *const PREFIX_REJECT_GROUPINVITE = @"http://rejectGroupInvite:";
NSString *const REJECT_GROUPINVITE = @"rejectGroupInvite";
NSString *const AGREE_GROUPINVITE = @"agreeGroupInvite";
NSString *const PREFIX_AGREE_GROUPINVITE = @"http://agreeGroupInvite:";
NSString *const PREFIX_OPENIMAGE = @"http://openImage:";
NSString *const PREFIX_OPENFILE = @"http://openfile:";
NSString *const PREFIX_DOWNLOADFILE = @"http://downloadfile:";
NSString *const PREFIX_AGREE_GROUPMEMBERJOIN = @"http://agreeGroupMemberJoin:";
NSString *const AGREE_GROUPMEMBERJOIN = @"agreeGroupMemberJoin";
NSString *const PREFIX_REJECT_GROUPMEMBERJOIN = @"http://rejectGroupMemberJoin:";
NSString *const REJECT_GROUPMEMBERJOIN = @"rejectGroupMemberJoin";
/*
* 通过protobuf转换生成的message的类型
*/
NSString *const PROTOBUF_TYPE_UserLoginResponse = @"UserLoginResponse";
NSString *const PROTOBUF_TYPE_MessageSendResponse = @"MessageSendResponse";
NSString *const PROTOBUF_TYPE_MessagePushNotify = @"MessagePushNotify";
NSString *const PROTOBUF_TYPE_FileUploadComplteResponse = @"FileUploadComplteResponse";
NSString *const PROTOBUF_TYPE_BuddyAddResponse = @"BuddyAddResponse";
NSString *const PROTOBUF_TYPE_GroupInviteResponse = @"GroupInviteResponse";
NSString *const PROTOBUF_TYPE_UserStateChangeNofity = @"UserStateChangeNofity";
NSString *const PROTOBUF_TYPE_ImageUploadComplteResponse = @"ImageUploadComplteResponse";
NSString *const PROTOBUF_TYPE_ImageDownloadReadyNotify = @"ImageDownloadReadyNotify";
NSString *const PROTOBUF_TYPE_FileDownloadReadyNofity = @"FileDownloadReadyNofity";
NSString *const PROTOBUF_TYPE_BuddyAddNotify = @"BuddyAddNotify";
NSString *const PROTOBUF_TYPE_GroupInviteNotify = @"GroupInviteNotify";
NSString *const PROTOBUF_TYPE_GroupMemberJoinReponse = @"GroupMemberJoinReponse";
NSString *const PROTOBUF_TYPE_GroupMemberJoinNotify = @"GroupMemberJoinNotify";
NSString *const PROTOBUF_TYPE_GroupMemberJoinReplyReponse = @"GroupMemberJoinReplyReponse";
NSString *const PROTOBUF_TYPE_GroupNewMemberJoinedNotify = @"GroupNewMemberJoinedNotify";
NSString *const PROTOBUF_TYPE_GroupMemberJoinProcessNotify = @"GroupMemberJoinProcessNotify";
NSString *const PROTOBUF_TYPE_BuddyAddReplyResponse = @"BuddyAddReplyResponse";
NSString *const PROTOBUF_TYPE_BuddyAddedNofity = @"BuddyAddedNofity";
NSString *const PROTOBUF_TYPE_BuddyAddProcessNotify = @"BuddyAddProcessNotify";
NSString *const PROTOBUF_TYPE_GroupInviteReplyReponse = @"GroupInviteReplyReponse";
NSString *const PROTOBUF_TYPE_GroupInviteProcessNotify = @"GroupInviteProcessNotify";
NSString *const PROTOBUF_TYPE_GroupCreateProcessNotify = @"GroupCreateResponse";
NSString *const PROTOBUF_TYPE_GroupUpdateProcessNotify = @"GroupUpdatedNotify";
NSString *const PROTOBUF_TYPE_UserStateChangeResponse = @"UserStateChangeResponse";
NSString *const PROTOBUF_TYPE_GroupMemberRemoveResponse = @"GroupMemberRemoveResponse";
NSString *const PROTOBUF_TYPE_GroupMemberRemovedNotify = @"GroupMemberRemovedNotify";
#pragma mark - 消息名称定义
// 注册登录结果回调
NSString *const noti_LoginResult = @"noti_LoginResult";
// 注册接收IQ消息(不可离线)
NSString *const noti_ReceiveIQ = @"noti_ReceiveIQ";
// 注册接收非IQ消息(可以离线)
NSString *const noti_MessageCenter_didReceiveMessage = @"noti_MessageCenter_didReceiveMessage";
// 用于申请加入群/申请好友的回调
NSString *const noti_System_showAddMemberOrGroupResponse = @"noti_System_showAddMemberOrGroupResponse";
// 群邀请发出时显示服务器收到返回的结果
NSString *const noti_System_showGroupInviteResponse = @"noti_System_showGroupInviteResponse";
// 注册用户在线状态回调
NSString *const noti_pb_userPresenceGetResult = @"noti_pb_userPresenceGetResult";
// 刷新群列表
NSString *const noti_refreshGroupOtl = @"noti_refreshGroupOtl";
// 刷新联系人列表
NSString *const noti_refreshContactOtl = @"noti_refreshContactOtl";
// 刷新聊天列表
NSString *const noti_refreshSessionTable = @"noti_refreshSessionTable";
// 注册登录成功
NSString *const noti_LoginView_LoginSuccess = @"noti_LoginView_LoginSuccess";
// 登录失败
NSString *const noti_LoginView_LoginFail = @"noti_LoginView_LoginFail";
// 下载图片的回调
NSString *const noti_ImageHelper_didDownloadImage = @"noti_ImageHelper_didDownloadImage";
// 下载用户头像的回调
NSString *const noti_MainView_didDownAvatar = @"noti_MainView_didDownAvatar";
// 文件上传结果的回调
NSString *const noti_FileHelper_didUploadFile = @"noti_FileHelper_didUploadFile";
// 文件下载结果的回调
NSString *const noti_FileHelper_didDownloadFile = @"noti_FileHelper_didDownloadFile";
#pragma mark - 字典KEY的定义
NSString *const dic_key_response = @"dic_key_response";
// 群消息
NSString *const XMPPMESSAGE_GROUP = @"@group.im.xiniunet.com";
// 承租群消息
NSString *const XMPPMESSAGE_TENANT = @"@tenant.im.xiniunet.com";
// 个人消息
NSString *const XMPPMESSAGE_JID = @"@im.xiniunet.com";