| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220 |
- //
- // config.h
- // AIIM
- //
- // Created by gan on 2025/4/17.
- //
- #ifndef config_h
- #define config_h
- #import <UIKit/UIKit.h>
- //#ifdef DEBUG
- //static NSString *WebSocketUrl = @"ws://abt1.my-im.com:9326?";
- //#else
- //static NSString *WebSocketUrl = @"wss://aiim.my-im.com/wss?";
- //#endif
- //
- //#ifdef DEBUG
- //static NSString *httphost = @"http://abt1.my-im.com:8080";
- //#else
- //static NSString *httphost = @"https://aiim.my-im.com";
- //#endif
- static NSString *WebSocketUrl = @"wss://aiim.my-im.com/wss?";
- static NSString *httphost = @"https://aiim.my-im.com";
- //static NSString *WebSocketUrl = @"wss://aliaiim.my-im.com/wss?";
- //static NSString *httphost = @"https://aliaiim.my-im.com";
- //
- //static NSString *WebSocketUrl = @"wss://web.my-im.com/wss?";
- //static NSString *httphost = @"https://web.my-im.com";
- //static NSString *WebSocketUrl = @"ws://192.168.1.7:9326?";
- //static NSString *httphost = @"http://192.168.1.7:8080";
- //static NSString *httphost = @"http://br1.qihg091ew.com:8080";
-
- //本地数据库文件名称
- static NSString *locateDB = @"AlocateDB.sqlite";
- //JitsiMeet 服务器
- static NSString *JitsiMeetSV = @"https://rtc2.my-im.com/";
- //static NSString *JitsiMeetSV = @"https://rtc.my-im.com/";
- //static NSString *JitsiMeetSV = @"https://meet.jit.si/";
- //旧地址 @"https://rtc.my-im.com/"
- static NSString *filehttphost = @"http://upload.my-im.com";//生产文件服务器
- static NSString *ossfilehttphost = @"http://newweb.abtim-my.com/api/oss/uploadPart";//生产文件服务器
- static NSString * privacyPolicy = @"https://download.gobuy99.com/ynszc.html";//隐私政策
- //websocket
- //心跳
- static NSString *SendCode_PING= @"0";
- //准备
- static NSString *SendCode_READY= @"1";
- //消息
- static NSString *SendCode_MESSAGE= @"2";
- //读取消息
- static NSString *SendCode_READ= @"3";
- //其他设备登录
- static NSString *SendCode_OTHER_LOGIN= @"4";
- //好友申请
- static NSString *SendCode_NEW_FRIEND= @"5";
- //群申请验证
- static NSString *SendCode_GROUP_VALIDATE= @"6";
- //音视频通话结果
- static NSString *SendCode_WEBRTC_result= @"7";
- //视频通话
- static NSString *SendCode_WEBRTC_CALL= @"8";
- //关闭视频通话
- static NSString *SendCode_WEBRTC_CLOSE= @"9";
- //视频通话忙碌
- static NSString *SendCode_WEBRTC_BUSY= @"10";
- //webrtc信令
- static NSString *SendCode_WEBRTC_xinling= @"11";
- //对方正在忙
- static NSString *SendCode_WEBRTC_DFBUSY= @"12";
- //删除指令
- static NSString *SendCode_deletemsg= @"del";
- //消息已收到回执
- static NSString *SendCode_RECMsg = @"rec";
- //message
- //文本消息
- static NSString *MessageType_text= @"0";
- //图片消息
- static NSString *MessageType_image= @"1";
- //文件消息
- static NSString *MessageType_file= @"2";
- //语音消息
- static NSString *MessageType_voice= @"3";
- //撤回消息
- static NSString *MessageType_back= @"4";
- //删除消息
- static NSString *MessageType_delete= @"del";
- //视频消息
- static NSString *MessageType_video= @"5";
- //转发的消息
- static NSString *MessageType_forward= @"6";
- //音视频通话结果
- static NSString *MessageType_webrtcrs= @"7";
- //事件消息
- static NSString *MessageType_event= @"9";
- //webrtc 信令消息
- static NSString *MessageType_webrtc= @"webrtc";
- // 撤回
- static NSString *MessageType_CallBack2 = @"11"; // 撤回2
- // 删除
- static NSString *MessageType_Del = @"12";
- // 对方正在忙
- static NSString *MessageType_DFBUSY = @"13";
- static NSString *Type_FRIEND= @"0";
- static NSString *Type_GROUP= @"1";
- static int MAX_USERS = 100;
- typedef NS_ENUM(NSInteger, GlobalColorType) {
- GCTypeGreen,
- GCTypeGreend,
- GCTypeYellow,
- GCTypeBluel,
- GCTypeBlued,
- GCTypeRedd,
- GCTypeRedl,
- GCTypeOrangeR,
- GCTypeDark1,
- GCTypeDark2,
- GCTypeDark3,
- GCTypeDark4,
- GCTypeDark5,
- GCTypeDark6,
- GCTypeDark7,
- GCTypeWhite,
- GCTypeBlack,
- };
-
- static inline UIColor *globalColor(GlobalColorType type) {
- switch (type) {
- case GCTypeGreen:
- return [UIColor colorWithRed:0x1E/255.0 green:0xEC/255.0 blue:0x99/255.0 alpha:1.0];
- case GCTypeGreend:
- return [UIColor colorWithRed:0x50/255.0 green:0xCA/255.0 blue:0x75/255.0 alpha:1.0];
- case GCTypeYellow:
- return [UIColor colorWithRed:0xF0/255.0 green:0xFB/255.0 blue:0x60/255.0 alpha:1.0];
- case GCTypeBluel:
- return [UIColor colorWithRed:0x2E/255.0 green:0xF6/255.0 blue:0xE6/255.0 alpha:1.0];
- case GCTypeBlued:
- return [UIColor colorWithRed:0x6E/255.0 green:0x75/255.0 blue:0xFB/255.0 alpha:1.0];
- case GCTypeRedd:
- return [UIColor colorWithRed:0xFF/255.0 green:0x3A/255.0 blue:0x00/255.0 alpha:1.0];
- case GCTypeRedl:
- return [UIColor colorWithRed:0xFF/255.0 green:0x5F/255.0 blue:0x00/255.0 alpha:1.0];
- case GCTypeOrangeR:
- return [UIColor colorWithRed:0xFF/255.0 green:0x66/255.0 blue:0x00/255.0 alpha:1.0];
- case GCTypeDark1:
- return [UIColor colorWithRed:0xF6/255.0 green:0xF6/255.0 blue:0xF6/255.0 alpha:1.0];
- case GCTypeDark2:
- return [UIColor colorWithRed:0xD2/255.0 green:0xD2/255.0 blue:0xD2/255.0 alpha:1.0];
- case GCTypeDark3:
- return [UIColor colorWithRed:0xA1/255.0 green:0xA1/255.0 blue:0xA1/255.0 alpha:1.0];
- case GCTypeDark4:
- return [UIColor colorWithRed:0x78/255.0 green:0x7C/255.0 blue:0x85/255.0 alpha:1.0];
- case GCTypeDark5:
- return [UIColor colorWithRed:0x34/255.0 green:0x34/255.0 blue:0x34/255.0 alpha:1.0];
- case GCTypeDark6:
- return [UIColor colorWithRed:0x2F/255.0 green:0x32/255.0 blue:0x37/255.0 alpha:1.0];
- case GCTypeDark7:
- return [UIColor colorWithRed:0x83/255.0 green:0x89/255.0 blue:0x99/255.0 alpha:1.0];
- case GCTypeWhite:
- return [UIColor colorWithRed:0xFF/255.0 green:0xFF/255.0 blue:0xFF/255.0 alpha:1.0];
- case GCTypeBlack:
- return [UIColor colorWithRed:0x00/255.0 green:0x00/255.0 blue:0x00/255.0 alpha:1.0];
- default:
- return [UIColor blackColor]; // 默认颜色或者其他颜色
- }
- }
- /// 屏幕宽度,会根据横竖屏的变化而变化
- #define SCREEN_WIDTH ([[UIScreen mainScreen] bounds].size.width)
- /// 屏幕高度,会根据横竖屏的变化而变化
- #define SCREEN_HEIGHT ([[UIScreen mainScreen] bounds].size.height)
- #define SCREEN_TOP [UIDevice navigationFullHeight] //顶部状态栏加导航栏高度
- #define NAVIGATIONBAR_HEIGHT [UIDevice navigationBarHeight]
- #define SCREEN_BOTTOM (isIphoneX ? 83 : 49) //底部tabbar高度
- #define SCREEN_X_BTM [UIDevice safeDistanceBottom] //刘海屏底部高度
- #define STATUS_Height [UIDevice statusBarHeight] //状态栏高度
- #define WINDOW [UIApplication sharedApplication].delegate.window
- #pragma mark - Image
- #define kImageMake(name) [UIImage imageNamed:name]
- #pragma mark - Font
- #define SYSFONT(size) [UIFont systemFontOfSize:size]
- #define SYSMFONT(size) [UIFont systemFontOfSize:size weight:UIFontWeightMedium]
- #define SYSBFONT(size) [UIFont systemFontOfSize:size weight:UIFontWeightBold]
- #define SYSHFONT(size) [UIFont systemFontOfSize:size weight:UIFontWeightHeavy]
- /* URL*/
- #define getURL(x) [NSURL URLWithString:x]
- #pragma mark weak
- #define weakSelf(var) __weak typeof(var) weak##var = var;
- #endif /* config_h */
|