basicfamilyeventtrigger.mm

来自「lumaqq」· MM 代码 · 共 911 行 · 第 1/3 页

MM
911
字号
		case kQQSubCommandClusterGetMessageSetting:			NSLog(@"Get Message Setting %@", ([p reply] == kQQReplyOK) ? @"OK" : @"Failed");			event = [[QQNotification alloc] initWithId:(([p reply] == kQQReplyOK) ? kQQEventClusterGetMessageSettingOK : kQQEventClusterGetMessageSettingFailed)												packet:p];			break;		case kQQSubCommandClusterModifyMessageSetting:			NSLog(@"Modify Message Setting %@", ([p reply] == kQQReplyOK) ? @"OK" : @"Failed");			event = [[QQNotification alloc] initWithId:(([p reply] == kQQReplyOK) ? kQQEventClusterModifyMessageSettingOK : kQQEventClusterModifyMessageSettingFailed)												packet:p];			break;		case kQQSubCommandClusterModifyChannelSetting:			NSLog(@"Modify Channel Setting %@", ([p reply] == kQQReplyOK) ? @"OK" : @"Failed");			event = [[QQNotification alloc] initWithId:(([p reply] == kQQReplyOK) ? kQQEventClusterModifyChannelSettingOK : kQQEventClusterModifyChannelSettingFailed)												packet:p];			break;		case kQQSubCommandClusterGetChannelSetting:			NSLog(@"Get Channel Setting %@", ([p reply] == kQQReplyOK) ? @"OK" : @"Failed");			event = [[QQNotification alloc] initWithId:(([p reply] == kQQReplyOK) ? kQQEventClusterGetChannelSettingOK : kQQEventClusterGetChannelSettingFailed)												packet:p];			break;		case kQQSubCommandClusterGetLastTalkTime:			NSLog(@"Get Last Talk Time %@", ([p reply] == kQQReplyOK) ? @"OK" : @"Failed");			event = [[QQNotification alloc] initWithId:(([p reply] == kQQReplyOK) ? kQQEventClusterGetLastTalkTimeOK : kQQEventClusterGetLastTalkTimeFailed)												packet:p];			break;	}		if(event)		return [event autorelease];	else		return nil;}+ (QQNotification*)processModifyInfoReply:(InPacket*)packet client:(QQClient*)client {	QQNotification* event = nil;	ModifyInfoReplyPacket* p = (ModifyInfoReplyPacket*)packet;	if([p QQ] == [[client user] QQ]) {		NSLog(@"Modify Info OK");		event = [[QQNotification alloc] initWithId:kQQEventModifyInfoOK packet:p];	} else {		NSLog(@"Modify Info Failed");		event = [[QQNotification alloc] initWithId:kQQEventModifyInfoFailed packet:p];	}		if(event)		return [event autorelease];	else		return nil;}+ (QQNotification*)processFriendDataOpReply:(InPacket*)packet {	QQNotification* event = nil;	FriendDataOpReplyPacket* p = (FriendDataOpReplyPacket*)packet;	switch([p subCommand]) {		case kQQSubCommandBatchGetFriendRemark:			NSLog(@"Batch Get Friend Remark OK");			event = [[QQNotification alloc] initWithId:kQQEventBatchGetFriendRemarkOK packet:p];			break;		case kQQSubCommandUploadFriendRemark:			NSLog(@"Upload Friend Remark %@", ([p reply] == kQQReplyOK) ? @"OK" : @"Failed");			event = [[QQNotification alloc] initWithId:(([p reply] == kQQReplyOK) ? kQQEventUploadFriendRemarkOK : kQQEventUploadFriendRemarkFailed)												packet:p];			break;		case kQQSubCommandRemoveFriendFromList:			NSLog(@"Remove Friend From List %@", ([p reply] == kQQReplyOK) ? @"OK" : @"Failed");			event = [[QQNotification alloc] initWithId:(([p reply] == kQQReplyOK) ? kQQEventRemoveFriendFromListOK : kQQEventRemoveFriendFromListFailed)												packet:p];			break;		case kQQSubCommandGetFriendRemark:			NSLog(@"Get Friend Remark OK");			event = [[QQNotification alloc] initWithId:kQQEventGetFriendRemarkOK packet:p];			break;		case kQQSubCommandModifyRemarkName:			NSLog(@"Modify Remark Name %@", ([p reply] == kQQReplyOK) ? @"OK" : @"Failed");			event = [[QQNotification alloc] initWithId:(([p reply] == kQQReplyOK) ? kQQEventModifyRemarkNameOK : kQQEventModifyRemarkNameFailed)												packet:p];			break;	}		if(event)		return [event autorelease];	else		return nil;}+ (QQNotification*)processSignatureOpReply:(InPacket*)packet {	QQNotification* event = nil;	SignatureOpReplyPacket* p = (SignatureOpReplyPacket*)packet;	switch([p subCommand]) {		case kQQSubCommandModifySignature:			switch([p reply]) {				case kQQReplyOK:					NSLog(@"Modify Signature OK");					event = [[QQNotification alloc] initWithId:kQQEventModifySigatureOK packet:p];					break;				default:					NSLog(@"Modify Signature Failed");					event = [[QQNotification alloc] initWithId:kQQEventModifySigatureFailed packet:p];					break;			}			break;		case kQQSubCommandDeleteSignature:			switch([p reply]) {				case kQQReplyOK:					NSLog(@"Delete Signature OK");					event = [[QQNotification alloc] initWithId:kQQEventDeleteSignatureOK packet:p];					break;				default:					NSLog(@"Delete Signature Failed");					event = [[QQNotification alloc] initWithId:kQQEventDeleteSignatureFailed packet:p];					break;			}			break;		case kQQSubCommandGetSignature:			switch([p reply]) {				case kQQReplyOK:					NSLog(@"Get Signature OK");					event = [[QQNotification alloc] initWithId:kQQEventGetSignatureOK packet:p];					break;				default:					NSLog(@"Get Signature Failed");					event = [[QQNotification alloc] initWithId:kQQEventGetSignatureFailed packet:p];					break;			}			break;		default:			NSLog(@"Unknown Signature Op Sub Command");			break;	}		if(event)		return [event autorelease];	else		return nil;}+ (QQNotification*)processPropertyOpReply:(InPacket*)packet {	NSLog(@"Get User Property OK");	QQNotification* event = [[QQNotification alloc] initWithId:kQQEventGetUserPropertyOK packet:packet];	return [event autorelease];}+ (QQNotification*)processFriendLevelOpReply:(InPacket*)packet {	NSLog(@"Get Friend Level OK");	QQNotification* event = [[QQNotification alloc] initWithId:kQQEventGetFriendLevelOK packet:packet];	return [event autorelease];}+ (QQNotification*)processGroupDataOpReply:(InPacket*)packet {	QQNotification* event = nil;	GroupDataOpReplyPacket* p = (GroupDataOpReplyPacket*)packet;	switch([p subCommand]) {		case kQQSubCommandDownloadGroupName:			switch([p reply]) {				case kQQReplyOK:					NSLog(@"Download Group Names OK");					event = [[QQNotification alloc] initWithId:kQQEventDownloadGroupNamesOK packet:p];					break;				default:					NSLog(@"Unknown Download Group Name Reply Code");					break;			}			break;		case kQQSubCommandUploadGroupName:			NSLog(@"Upload Group Name %@", ([p reply] == kQQReplyOK) ? @"OK" : @"Failed");			event = [[QQNotification alloc] initWithId:(([p reply] == kQQReplyOK) ? kQQEventUploadGroupNamesOK : kQQEventUploadGroupNamesFailed)												packet:p];			break;	}	return [event autorelease];}+ (QQNotification*)processGetFriendGroupReply:(InPacket*)packet {	NSLog(@"Get Friend Group OK");	QQNotification* event = [[QQNotification alloc] initWithId:kQQEventGetFriendGroupOK packet:packet];	return [event autorelease];}+ (QQNotification*)processGetFriendListReply:(InPacket*)packet {	NSLog(@"Get Friend List OK");	QQNotification* event = [[QQNotification alloc] initWithId:kQQEventGetFriendListOK packet:packet];	return [event autorelease];}+ (QQNotification*)processGetUserInfoReply:(InPacket*)packet {	NSLog(@"Get User Info OK");	QQNotification* event = [[QQNotification alloc] initWithId:kQQEventGetUserInfoOK packet:packet];	return [event autorelease];}+ (QQNotification*)processGetOnlineOpReply:(InPacket*)packet {	NSLog(@"Get Online Friend OK");	QQNotification* event = [[QQNotification alloc] initWithId:kQQEventGetOnlineFriendOK packet:packet];	return [event autorelease];}+ (QQNotification*)processChangeStatusReply:(InPacket*)packet {	QQNotification* event = nil;	ChangeStatusReplyPacket* p = (ChangeStatusReplyPacket*)packet;	switch([p reply]) {		case kQQReplyChangeStatusOK:			NSLog(@"Change Status OK");			event = [[QQNotification alloc] initWithId:kQQEventChangeStatusOK packet:p];			break;		default:			NSLog(@"Unknown change status reply code");			break;	}		if(event)		return [event autorelease];	else		return nil;}+ (QQNotification*)processGetLoginTokenReply:(InPacket*)packet {	QQNotification* event = nil;	GetLoginTokenReplyPacket* p = (GetLoginTokenReplyPacket*)packet;	switch([p reply]) {		case kQQReplyOK:			NSLog(@"Get Login Token OK");			event = [[QQNotification alloc] initWithId:kQQEventGetLoginTokenOK packet:p];			break;		case kQQReplyNeedVerifyCode:			NSLog(@"Need Verify Code");			event = [[QQNotification alloc] initWithId:kQQEventNeedVerifyCode packet:p];			break;	}		if(event)		return [event autorelease];	else		return nil;}+ (QQNotification*)processLoginReply:(InPacket*)packet {	QQNotification* event = nil;	LoginReplyPacket* p = (LoginReplyPacket*)packet;	switch([p reply]) {		case kQQReplyOK:			NSLog(@"Login OK");			event = [[QQNotification alloc] initWithId:kQQEventLoginOK packet:p];			break;		case kQQReplyRedirect:			NSLog(@"Login Redirect");			if([p isRedirectIpNull])				event = [[QQNotification alloc] initWithId:kQQEventLoginRedirectNull packet:p];			else				event = [[QQNotification alloc] initWithId:kQQEventLoginRedirect packet:p];			break;		case kQQReplyPasswordError:		case kQQReplyServerBusy:		case kQQReplyLoginFailed:			NSLog(@"Login Failed");			event = [[QQNotification alloc] initWithId:kQQEventLoginFailed packet:p];			break;	}		if(event)		return [event autorelease];	else		return nil;}+ (QQNotification*)processKeepAliveReply:(InPacket*)packet {	QQNotification* event = nil;	KeepAliveReplyPacket* p = (KeepAliveReplyPacket*)packet;	switch([p reply]) {		case kQQReplyOK:			NSLog(@"Keep Alive OK");			event = [[QQNotification alloc] initWithId:kQQEventKeepAliveOK packet:p];			break;		default:			NSLog(@"Uknown Keep Alive reply code");			break;	}		if(event)		return [event autorelease];	else		return nil;}+ (QQNotification*)processGetKeyReply:(InPacket*)packet {	QQNotification* event = nil;	GetKeyReplyPacket* p = (GetKeyReplyPacket*)packet;	switch([p reply]) {		case kQQReplyOK:			NSLog(@"Get Key OK");			event = [[QQNotification alloc] initWithId:kQQEventGetKeyOK packet:p];			break;		default:			NSLog(@"Unknown get key reply code");	}		if(event)		return [event autorelease];	else		return nil;}@end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?