• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/Security-57031.1.35/Security/sec/SOSCircle/Regressions/

Lines Matching refs:ds

43     struct SOSDataSource ds;
68 struct SOSTestDataSource *ds = (struct SOSTestDataSource *)data_source;
69 ds->cm_count++;
71 CFDictionaryForEach(ds->d2database, ^(const void *key, const void *value) {
77 ccdigest(ccsha1_di(), SOSManifestGetSize(manifest), SOSManifestGetBytePtr(manifest), ds->manifest_digest);
78 ds->clean = true;
84 struct SOSTestDataSource *ds = (struct SOSTestDataSource *)data_source;
85 ds->co_count++;
88 handle_object(key, (SOSObjectRef)CFDictionaryGetValue(ds->d2database, key), stop);
94 struct SOSTestDataSource *ds = (struct SOSTestDataSource *)data_source;
95 CFReleaseSafe(ds->d2database);
96 CFReleaseSafe(ds->p2database);
97 CFReleaseSafe(ds->statedb);
98 free(ds);
233 SOSTestDataSourceRef ds = (SOSTestDataSourceRef)txn;
237 SOSObjectRef myObject = (SOSObjectRef)CFDictionaryGetValue(ds->p2database, pk);
253 CFDictionaryRemoveValue(ds->d2database, myKey);
254 SOSDigestVectorAppend(&ds->removals, CFDataGetBytePtr(myKey));
257 CFDictionarySetValue(ds->d2database, key, merged);
258 SOSDigestVectorAppend(&ds->additions, CFDataGetBytePtr(key));
260 CFDictionarySetValue(ds->p2database, pk, merged);
264 SOSTestDataSourceAddObject((SOSDataSourceRef)ds, object, error);
271 static CFStringRef dsGetName(SOSDataSourceRef ds) {
275 static void dsSetNotifyPhaseBlock(SOSDataSourceRef ds, SOSDataSourceNotifyBlock notifyBlock) {
276 ((SOSTestDataSourceRef)ds)->notifyBlock = Block_copy(notifyBlock);
279 static CFDataRef dsCopyStateWithKey(SOSDataSourceRef ds, CFStringRef key, CFStringRef pdmn, CFErrorRef *error) {
280 SOSTestDataSourceRef tds = (SOSTestDataSourceRef)ds;
287 static bool dsWith(SOSDataSourceRef ds, CFErrorRef *error, SOSDataSourceTransactionSource source, void(^transaction)(SOSTransactionRef txn, bool *commit)) {
288 SOSTestDataSourceRef tds = (SOSTestDataSourceRef)ds;
290 transaction((SOSTransactionRef)ds, &commit);
291 if (commit && ((SOSTestDataSourceRef)ds)->notifyBlock && (tds->removals.count || tds->additions.count)) {
292 ((SOSTestDataSourceRef)ds)->notifyBlock(ds, (SOSTransactionRef)ds, kSOSDataSourceTransactionWillCommit, source, &tds->removals, &tds->additions);
299 static bool dsSetStateWithKey(SOSDataSourceRef ds, SOSTransactionRef txn, CFStringRef pdmn, CFStringRef key, CFDataRef state, CFErrorRef *error) {
300 SOSTestDataSourceRef tds = (SOSTestDataSourceRef)ds;
320 SOSTestDataSourceRef ds = calloc(1, sizeof(struct SOSTestDataSource));
322 ds->ds.engine = NULL;
323 ds->ds.dsGetName = dsGetName;
324 ds->ds.dsSetNotifyPhaseBlock = dsSetNotifyPhaseBlock;
325 ds->ds.dsCopyManifest = copy_manifest;
326 ds->ds.dsForEachObject = foreach_object;
327 ds->ds.dsCopyStateWithKey = dsCopyStateWithKey;
328 ds->ds.dsWith = dsWith;
329 ds->ds.dsRelease = dispose;
331 ds->ds.dsMergeObject = mergeObject;
332 ds->ds.dsSetStateWithKey = dsSetStateWithKey;
333 ds->ds.dsRestoreObject = dsRestoreObject;
335 ds->ds.objectCopyDigest = copyDigest;
336 ds->ds.objectCopyPrimaryKey = copyPrimaryKey;
337 ds->ds.objectCreateWithPropertyList = createWithPropertyList;
338 ds->ds.objectCopyPropertyList = copyPropertyList;
339 ds->ds.objectCopyBackup = objectCopyBackup;
341 ds->d2database = CFDictionaryCreateMutable(0, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
342 ds->p2database = CFDictionaryCreateMutable(0, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
343 ds->statedb = CFDictionaryCreateMutable(0, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
344 ds->clean = false;
346 return (SOSDataSourceRef)ds;
385 static bool do_nothing(SOSDataSourceRef ds, CFErrorRef *error) {
389 void SOSTestDataSourceFactoryAddDataSource(SOSDataSourceFactoryRef factory, CFStringRef name, SOSDataSourceRef ds)
394 ds->dsRelease = do_nothing;
396 CFDictionarySetValue(dsf->data_sources, name, ds);
401 struct SOSTestDataSource *ds = (struct SOSTestDataSource *)data_source;
406 SOSObjectRef myObject = (SOSObjectRef)CFDictionaryGetValue(ds->p2database, pk);
419 CFDictionaryRemoveValue(ds->d2database, myKey);
420 SOSDigestVectorAppend(&ds->removals, CFDataGetBytePtr(myKey));
423 CFDictionarySetValue(ds->d2database, key, merged);
424 CFDictionarySetValue(ds->p2database, pk, merged);
425 SOSDigestVectorAppend(&ds->additions, CFDataGetBytePtr(key));
426 ds->clean = false;
437 //struct SOSTestDataSource *ds = (struct SOSTestDataSource *)data_source;
442 struct SOSTestDataSource *ds = (struct SOSTestDataSource *)data_source;
443 return ds->d2database;
447 SOSObjectRef SOSDataSourceCreateGenericItemWithData(SOSDataSourceRef ds, CFStringRef account, CFStringRef service, bool is_tomb, CFDataRef data) {
470 SOSObjectRef object = ds->objectCreateWithPropertyList(dict, &localError);
479 SOSObjectRef SOSDataSourceCreateGenericItem(SOSDataSourceRef ds, CFStringRef account, CFStringRef service) {
480 return SOSDataSourceCreateGenericItemWithData(ds, account, service, false, NULL);
483 SOSObjectRef SOSDataSourceCopyObject(SOSDataSourceRef ds, SOSObjectRef match, CFErrorRef *error)
487 CFDataRef digest = SOSObjectCopyDigest(ds, match, error);
493 SOSDataSourceForEachObject(ds, manifest, error, ^void (CFDataRef key, SOSObjectRef object, bool *stop) {