I write new class that implements BuddyStorage interface to change the way stores buddylist from files-based to database.
But I found something strange in the result :
In retrieval of buddy variables for one buddy I get one buddy variable for key "$key1". But it is not online, and offline variables, because the result always be empty in result of getOnlineVariables and getOfflineVariables functions.
Code: Select all
NSArray * array=[buddy getOfflineVariables];
SFSBuddyVariable * var ;
//Here [array count]=0 ;
for(int j=0;j<[array count];j++)
{
var=[array objectAtIndex:j];
NSLog(@" value = %@", [var getStringValue]);
}
array=[buddy getOnlineVariables];
//Here [array count]=0 ;
for(int j=0;j<[array count];j++)
{
var=[array objectAtIndex:j];
NSLog(@" value = %@", [var getStringValue]);
}
//Here I get value of variable for key $key1.
{
var=[buddy getVariable:@"$key1"];
NSLog(@"key = value = %@", [var getStringValue]);
}
So I found variable that is not online, and offline ?
Could you please explain me why this happened .
Thank you very much !
Doanh