Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (BOOL)_didReceiveVCard:(TNStropheStanza)aStanza
- {
- var aVCard = [aStanza firstChildWithName:@"vCard"];
- if (aVCard)
- {
- _vCard = aVCard;
- if ((_nickname == _nodeName) && ([aVCard firstChildWithName:@"NAME"]))
- _nickname = [[aVCard firstChildWithName:@"NAME"] text];
- var photoNode;
- if (photoNode = [aVCard firstChildWithName:@"PHOTO"])
- {
- var contentType = [[photoNode firstChildWithName:@"TYPE"] text],
- data = [[photoNode firstChildWithName:@"BINVAL"] text];
- _avatar = [TNBase64Image base64ImageWithContentType:contentType andData:data];
- [CPTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(_fireVCardReceivedNotification) userInfo:nil repeats:NO];
- }
- else
- [self _fireVCardReceivedNotification];
- }
- return YES;
- }
- - (BOOL)_fireVCardReceivedNotification
- {
- [[CPNotificationCenter defaultCenter] postNotificationName:TNStropheContactVCardReceivedNotification object:self];
- }
Add Comment
Please, Sign In to add comment