// // config.h // ABtong // // Created by qin on 2025/7/28. // // #ifndef config_h #define config_h #import #ifdef DEBUG static NSString *WebSocketUrl = @"ws://abt1.my-im.com:9326?"; #else static NSString *WebSocketUrl = @"ws://aiim.my-im.com:9326?"; #endif #ifdef DEBUG static NSString *httphost = @"https://abt1.my-im.com"; #else static NSString *httphost = @"http://aiim.my-im.com:8080"; #endif //abt1.my-im.com,abt2.my-im.com是安博通版本的两台测试服务器, //abt1.my-im.com可以替换原来的52,做开发环境测试。 //本地数据库文件名称 static NSString *locateDB = @"BlocateDB.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 * privacyPolicy = @"https://main.abtim-my.com/myimyszc.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, GCTypeinpuv, GCTycellbg, }; 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:0x58/255.0 green:0x28/255.0 blue:0xEE/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:0xF3/255.0 green:0xF4/255.0 blue:0xFF/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]; case GCTypeinpuv: return [UIColor colorWithRed:0x25/255.0 green:0x2A/255.0 blue:0x4D/255.0 alpha:1.0]; case GCTycellbg: return [UIColor colorWithRed:0x1A/255.0 green:0x1E/255.0 blue:0x3A/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 */