JXChatViewController.h 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. //
  2. // JXChatViewController.h
  3. //
  4. // Created by Reese on 13-8-11.
  5. // Copyright (c) 2013年 Reese. All rights reserved.
  6. //
  7. #import <UIKit/UIKit.h>
  8. #import <CoreData/CoreData.h>
  9. #import <AVFoundation/AVFoundation.h>
  10. #import "JXTableViewController.h"
  11. #import "JXTableMsgChatVC.h"
  12. #import "JXLocationVC.h"
  13. #import "SimpleAudioPlayer.h"
  14. @class JXEmoji;
  15. @class JXSelectImageView;
  16. @class JXVolumeView;
  17. @class JXRoomObject;
  18. @class JXBaseChatCell;
  19. @class JXVideoPlayer;
  20. typedef void(^PerBlockBtn)(memberData *personData);
  21. @interface JXChatViewController : JXTableMsgChatVC<UIImagePickerControllerDelegate,UITextViewDelegate,AVAudioPlayerDelegate,UIImagePickerControllerDelegate,AVAudioRecorderDelegate,UINavigationControllerDelegate,LXActionSheetDelegate>
  22. {
  23. NSMutableArray *_pool;
  24. UITextView *_messageText;
  25. // UIImageView *inputBar;
  26. UIButton* _recordBtn;
  27. UIButton* _recordBtnLeft;
  28. UIImage *_myHeadImage,*_userHeadImage;
  29. JXSelectImageView *_moreView;
  30. UIButton* _btnFace;
  31. emojiViewController* _faceView;
  32. JXEmoji* _messageConent;
  33. BOOL recording;
  34. NSTimer *peakTimer;
  35. AVAudioRecorder *audioRecorder;
  36. AVAudioPlayer *audioPlayer;
  37. NSURL *pathURL;
  38. UIView* talkView;
  39. NSString* _lastRecordFile;
  40. NSString* _lastPlayerFile;
  41. NSTimeInterval _lastPlayerTime;
  42. long _lastIndex;
  43. double lowPassResults;
  44. NSTimeInterval _timeLen;
  45. int _refreshCount;
  46. JXVolumeView* _voice;
  47. NSTimeInterval _disableSay;
  48. NSString * _audioMeetingNo;
  49. NSString * _videoMeetingNo;
  50. NSMutableArray * _orderRedPacketArray ;
  51. }
  52. - (IBAction)sendIt:(id)sender;
  53. - (IBAction)shareMore:(id)sender;
  54. //- (void)refresh;
  55. //- (void)createPerson:(^PerBlockBtn)(memberData *personData);
  56. -(void)createPerson:(memberData *)url success:(void(^)(memberData *responseObject))success;
  57. @property (nonatomic,strong) AVPlayer *palyer;
  58. @property (nonatomic,weak) UIImageView *inputBar;
  59. @property (nonatomic,copy) NSString *backUserId;
  60. @property (nonatomic,strong) memberData *memberDataXX;
  61. @property (nonatomic,strong) NSArray *groupLevelNameArray;// 群头衔数组
  62. @property (nonatomic,strong) JXRoomObject* chatRoom;
  63. @property (nonatomic,strong) roomData * room;
  64. @property (nonatomic,strong) NSMutableArray * soundSendArray;
  65. @property (nonatomic,strong) NSDictionary * lotterDict;
  66. @property (nonatomic,strong) NSMutableArray * oneAtttenPersonArr;
  67. @property (nonatomic,assign) NSInteger selectIndexAaaa;
  68. @property (nonatomic,strong) JXUserObject *chatPerson;//必须要赋值
  69. @property (nonatomic, strong) JXMessageObject *lastMsg;
  70. @property (nonatomic,strong) NSString* roomJid;//相当于RoomJid
  71. @property (nonatomic,strong) NSString* fromUserID;//相当于RoomJid
  72. @property (nonatomic,assign) int tempChat;//相当于RoomJid
  73. @property (nonatomic,assign) int biaotishifoBC;//相当于RoomJid
  74. @property (nonatomic,assign) BOOL isAttritionRecall;
  75. @property (nonatomic,assign) BOOL isOpenIntegral;
  76. @property (nonatomic,strong) NSString* gongzonghaoID;
  77. @property (nonatomic,assign) int isShowRedPackage;
  78. @property (nonatomic,assign) int intAAA;
  79. @property (nonatomic,strong) NSString* roomId;
  80. @property (nonatomic,strong) JXBaseChatCell* selCell;
  81. @property (nonatomic,strong) JXLocationVC * locationVC;
  82. @property (nonatomic, strong) NSMutableArray *array;
  83. //@property (nonatomic, strong) JXMessageObject *relayMsg;
  84. @property (nonatomic, strong) NSMutableArray *relayMsgArray;
  85. @property (nonatomic, assign) int scrollLine;
  86. @property (nonatomic, strong) NSMutableArray *courseArray;
  87. @property (nonatomic, copy) NSString *courseId;
  88. @property (nonatomic, strong) NSNumber *groupStatus;
  89. @property (nonatomic, copy) NSString *recordFromUserName;
  90. @property (nonatomic, copy) NSString *recordFromUseId;
  91. @property (nonatomic, assign) BOOL isCYMSGgroupANDFriendy;
  92. @property (nonatomic, strong) NSMutableArray *userNamesWithGroup;
  93. @property (nonatomic, strong) NSMutableArray *userNmaesWithFriend;
  94. @property (nonatomic, assign) BOOL isGroupMessages;
  95. @property (nonatomic, strong) NSMutableArray *userIds;
  96. @property (nonatomic, strong) NSMutableArray *userNames;
  97. @property (nonatomic, assign) BOOL isHiddenFooter;
  98. @property (nonatomic, strong) NSMutableArray *chatLogArray;
  99. @property (nonatomic, assign) NSInteger rowIndex;
  100. @property (nonatomic, assign) int newMsgCount;
  101. @property (nonatomic, strong) JXVideoPlayer *player;
  102. @property (nonatomic, strong) UIView *playerView;
  103. @property (nonatomic, assign) BOOL isShare;
  104. @property (nonatomic, copy) NSString *shareSchemes;
  105. @property (nonatomic, copy) NSString *pushType;
  106. @property (nonatomic, assign) int useInfoTempChat;
  107. @property (nonatomic, assign) int iscpGourp;
  108. @property (nonatomic, assign) int lotterInt;
  109. @property (nonatomic, assign) int enterFirst;
  110. @property (nonatomic, copy) NSString *customerPush;
  111. -(void)sendRedPacket:(NSDictionary*)redPacketDict withGreet:(NSString *)greet;
  112. //-(void)onPlay;
  113. //-(void)recordPlay:(long)index;
  114. -(void)resend:(JXMessageObject*)p;
  115. -(void)deleteMsg:(JXMessageObject*)p;
  116. -(void)showOneMsg:(JXMessageObject*)msg;
  117. -(void)showBack:(memberData*)msguser;
  118. @end
  119. /**
  120. BOOL isOpen = [g_default boolForKey:kgoucaiComePush];
  121. BOOL isOpen2 = [g_default boolForKey:kGuanXinComePush];
  122. if (isOpen==1 && isOpen2==1) {
  123. _noticeView2.hidden = YES;
  124. _noticeViewScrollView.hidden = YES;
  125. }else if (isOpen==1 && isOpen2==0) {
  126. // _table.contentInset = UIEdgeInsetsMake(38, 0, 0, 0);
  127. _noticeViewScrollView.hidden = NO;
  128. _noticeViewScrollView.frame=CGRectMake(0, JX_SCREEN_TOP+(JX_SCREEN_HEIGHT>=812?-6:18), JX_SCREEN_WIDTH, 37);
  129. _noticeView2.hidden = YES;_table.contentInset = UIEdgeInsetsMake(36, 0, 0, 0);
  130. }else if (isOpen==0 && isOpen2==1){
  131. if ( _biaotishifoBC==1111) {
  132. _table.contentInset = UIEdgeInsetsMake(36, 0, 0, 0);
  133. // self.showTopView.xiaLineView.hidden=NO;
  134. _noticeView2.hidden = NO;
  135. self.showTopView.xiaLineView.hidden=NO;
  136. }else{
  137. _noticeView2.hidden = YES;
  138. }
  139. _noticeViewScrollView.hidden = YES;
  140. }else if (isOpen==0 && isOpen2==0) {
  141. _noticeViewScrollView.hidden = NO;
  142. self.showTopView.xiaLineView.hidden=YES;
  143. _noticeView2.hidden = NO;
  144. _noticeViewScrollView.frame=CGRectMake(0, JX_SCREEN_TOP+(JX_SCREEN_HEIGHT>=812?-6:18), JX_SCREEN_WIDTH, 37);
  145. _table.contentInset = UIEdgeInsetsMake(73, 0, 0, 0);
  146. }
  147. */