iPhone method vs pjsip callback method?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Everybody!

I make a iPhone application and I have a following problem:
I have a tableview in my application, which stores the messages. When an
incoming message arrives, the own "on_pager" callback methods handle the
event.

*static void on_pager(pjsua_call_id call_id, const pj_str_t *from,
                     const pj_str_t *to, const pj_str_t *contact,
                     const pj_str_t *mime_type, const pj_str_t *text)
{
    NSLog(@"SIP - on_pager_starting");
    messageTransferToStore ([[NSString alloc] initWithBytes:from->ptr
length:(NSUInteger)from->slen encoding:NSUTF8StringEncoding],
                            [[NSString alloc] initWithBytes:to->ptr
length:(NSUInteger)to->slen encoding:NSUTF8StringEncoding],
                            [[NSString alloc] initWithBytes:contact->ptr
length:(NSUInteger)contact->slen encoding:NSUTF8StringEncoding],
                            [[NSString alloc] initWithBytes:mime_type->ptr
length:(NSUInteger)mime_type->slen encoding:NSUTF8StringEncoding],
                            [[NSString alloc] initWithBytes:text->ptr
length:(NSUInteger)text->slen encoding:NSUTF8StringEncoding]);

    NSLog(@"SIP - on_pager_ending");
}

void messageTransferToStore(NSString *from, NSString *to, NSString *contact,
NSString *mime_type, NSString *text)
{
    iPhoneClientDevAppDelegate *appDelegate = (iPhoneClientDevAppDelegate
*)[[UIApplication sharedApplication] delegate];
    [appDelegate add_message_from:from message_to:to message_conatct:contact
message_mime_type:mime_type message_text:text];
}*

I storing the data, and I like to display on a tableview. But it doesn't
work.
Every time I use the [tableview reloadData] method and it's working fine.
But in this case don't working.

My question: What makes the situation changes, when in a callback method I
call the functions reloadData or other Objective-C method?

Thank you in advance for your help.

Greetings,
Balazs







What makes the situation changes when a callback method to call the
functions reloadData or Other?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20100714/bdc83056/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux