/ src / frameworks / DirectoryServices / src / DirectoryService.c
DirectoryService.c
  1  /*
  2   This file is part of Darling.
  3  
  4   Copyright (C) 2017 Lubos Dolezel
  5  
  6   Darling is free software: you can redistribute it and/or modify
  7   it under the terms of the GNU General Public License as published by
  8   the Free Software Foundation, either version 3 of the License, or
  9   (at your option) any later version.
 10  
 11   Darling is distributed in the hope that it will be useful,
 12   but WITHOUT ANY WARRANTY; without even the implied warranty of
 13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 14   GNU General Public License for more details.
 15  
 16   You should have received a copy of the GNU General Public License
 17   along with Darling.  If not, see <http://www.gnu.org/licenses/>.
 18  */
 19  
 20  
 21  #include "DirectoryService.h"
 22  #include <stdlib.h>
 23  #include <stdio.h>
 24  
 25  static int verbose = 0;
 26  
 27  __attribute__((constructor))
 28  static void initme(void) {
 29      verbose = getenv("STUB_VERBOSE") != NULL;
 30  }
 31  
 32  void* dsAddAttribute(void) {
 33      if (verbose) puts("STUB: dsAddAttribute called");
 34      return NULL;
 35  }
 36  
 37  void* dsAddAttributeValue(void) {
 38      if (verbose) puts("STUB: dsAddAttributeValue called");
 39      return NULL;
 40  }
 41  
 42  void* dsAddChildPIDToReference(void) {
 43      if (verbose) puts("STUB: dsAddChildPIDToReference called");
 44      return NULL;
 45  }
 46  
 47  void* dsAllocAttributeValueEntry(void) {
 48      if (verbose) puts("STUB: dsAllocAttributeValueEntry called");
 49      return NULL;
 50  }
 51  
 52  void* dsAllocStringsFromList(void) {
 53      if (verbose) puts("STUB: dsAllocStringsFromList called");
 54      return NULL;
 55  }
 56  
 57  void* dsAppendAuthBuffer(void) {
 58      if (verbose) puts("STUB: dsAppendAuthBuffer called");
 59      return NULL;
 60  }
 61  
 62  void* dsAppendAuthBufferWithAuthorityAttribute(void) {
 63      if (verbose) puts("STUB: dsAppendAuthBufferWithAuthorityAttribute called");
 64      return NULL;
 65  }
 66  
 67  void* dsAppendAuthBufferWithAuthorityStrings(void) {
 68      if (verbose) puts("STUB: dsAppendAuthBufferWithAuthorityStrings called");
 69      return NULL;
 70  }
 71  
 72  void* dsAppendStringToList(void) {
 73      if (verbose) puts("STUB: dsAppendStringToList called");
 74      return NULL;
 75  }
 76  
 77  void* dsAppendStringToListAlloc(void) {
 78      if (verbose) puts("STUB: dsAppendStringToListAlloc called");
 79      return NULL;
 80  }
 81  
 82  void* dsAuthBufferGetDataListAllocPriv(void) {
 83      if (verbose) puts("STUB: dsAuthBufferGetDataListAllocPriv called");
 84      return NULL;
 85  }
 86  
 87  void* dsAuthBufferGetDataListPriv(void) {
 88      if (verbose) puts("STUB: dsAuthBufferGetDataListPriv called");
 89      return NULL;
 90  }
 91  
 92  void* dsBuildFromPath(void) {
 93      if (verbose) puts("STUB: dsBuildFromPath called");
 94      return NULL;
 95  }
 96  
 97  void* dsBuildListFromNodes(void) {
 98      if (verbose) puts("STUB: dsBuildListFromNodes called");
 99      return NULL;
100  }
101  
102  void* dsBuildListFromNodesAlloc(void) {
103      if (verbose) puts("STUB: dsBuildListFromNodesAlloc called");
104      return NULL;
105  }
106  
107  void* dsBuildListFromPathAlloc(void) {
108      if (verbose) puts("STUB: dsBuildListFromPathAlloc called");
109      return NULL;
110  }
111  
112  void* dsBuildListFromStrings(void) {
113      if (verbose) puts("STUB: dsBuildListFromStrings called");
114      return NULL;
115  }
116  
117  void* dsBuildListFromStringsAlloc(void) {
118      if (verbose) puts("STUB: dsBuildListFromStringsAlloc called");
119      return NULL;
120  }
121  
122  void* dsBuildListFromStringsAllocV(void) {
123      if (verbose) puts("STUB: dsBuildListFromStringsAllocV called");
124      return NULL;
125  }
126  
127  void* dsCloseAttributeList(void) {
128      if (verbose) puts("STUB: dsCloseAttributeList called");
129      return NULL;
130  }
131  
132  void* dsCloseAttributeValueList(void) {
133      if (verbose) puts("STUB: dsCloseAttributeValueList called");
134      return NULL;
135  }
136  
137  void* dsCloseDirNode(void) {
138      if (verbose) puts("STUB: dsCloseDirNode called");
139      return NULL;
140  }
141  
142  void* dsCloseDirService(void) {
143      if (verbose) puts("STUB: dsCloseDirService called");
144      return NULL;
145  }
146  
147  void* dsCloseRecord(void) {
148      if (verbose) puts("STUB: dsCloseRecord called");
149      return NULL;
150  }
151  
152  void* dsConvertAuthAuthorityToCFDict(void) {
153      if (verbose) puts("STUB: dsConvertAuthAuthorityToCFDict called");
154      return NULL;
155  }
156  
157  void* dsConvertCFDictToAuthAuthority(void) {
158      if (verbose) puts("STUB: dsConvertCFDictToAuthAuthority called");
159      return NULL;
160  }
161  
162  void* dsCopyDataFromDirRef(void) {
163      if (verbose) puts("STUB: dsCopyDataFromDirRef called");
164      return NULL;
165  }
166  
167  void* dsCopyDataFromNodeRef(void) {
168      if (verbose) puts("STUB: dsCopyDataFromNodeRef called");
169      return NULL;
170  }
171  
172  void* dsCopyDirStatusName(void) {
173      if (verbose) puts("STUB: dsCopyDirStatusName called");
174      return NULL;
175  }
176  
177  void* dsCreateDataDirRefData(void) {
178      if (verbose) puts("STUB: dsCreateDataDirRefData called");
179      return NULL;
180  }
181  
182  void* dsCreateNodeRefData(void) {
183      if (verbose) puts("STUB: dsCreateNodeRefData called");
184      return NULL;
185  }
186  
187  void* dsCreateRecord(void) {
188      if (verbose) puts("STUB: dsCreateRecord called");
189      return NULL;
190  }
191  
192  void* dsCreateRecordAndOpen(void) {
193      if (verbose) puts("STUB: dsCreateRecordAndOpen called");
194      return NULL;
195  }
196  
197  void* dsDataBufferAllocate(void) {
198      if (verbose) puts("STUB: dsDataBufferAllocate called");
199      return NULL;
200  }
201  
202  void* dsDataBufferDeAllocate(void) {
203      if (verbose) puts("STUB: dsDataBufferDeAllocate called");
204      return NULL;
205  }
206  
207  void* dsDataListAllocate(void) {
208      if (verbose) puts("STUB: dsDataListAllocate called");
209      return NULL;
210  }
211  
212  void* dsDataListCopyList(void) {
213      if (verbose) puts("STUB: dsDataListCopyList called");
214      return NULL;
215  }
216  
217  void* dsDataListDeAllocate(void) {
218      if (verbose) puts("STUB: dsDataListDeAllocate called");
219      return NULL;
220  }
221  
222  void* dsDataListDeallocate(void) {
223      if (verbose) puts("STUB: dsDataListDeallocate called");
224      return NULL;
225  }
226  
227  void* dsDataListDeleteThisNode(void) {
228      if (verbose) puts("STUB: dsDataListDeleteThisNode called");
229      return NULL;
230  }
231  
232  void* dsDataListGetNode(void) {
233      if (verbose) puts("STUB: dsDataListGetNode called");
234      return NULL;
235  }
236  
237  void* dsDataListGetNodeAlloc(void) {
238      if (verbose) puts("STUB: dsDataListGetNodeAlloc called");
239      return NULL;
240  }
241  
242  void* dsDataListGetNodeCount(void) {
243      if (verbose) puts("STUB: dsDataListGetNodeCount called");
244      return NULL;
245  }
246  
247  void* dsDataListGetNodeStringPriv(void) {
248      if (verbose) puts("STUB: dsDataListGetNodeStringPriv called");
249      return NULL;
250  }
251  
252  void* dsDataListInsertAfter(void) {
253      if (verbose) puts("STUB: dsDataListInsertAfter called");
254      return NULL;
255  }
256  
257  void* dsDataListInsertNode(void) {
258      if (verbose) puts("STUB: dsDataListInsertNode called");
259      return NULL;
260  }
261  
262  void* dsDataListMergeList(void) {
263      if (verbose) puts("STUB: dsDataListMergeList called");
264      return NULL;
265  }
266  
267  void* dsDataListMergeListAfter(void) {
268      if (verbose) puts("STUB: dsDataListMergeListAfter called");
269      return NULL;
270  }
271  
272  void* dsDataListRemoveNodes(void) {
273      if (verbose) puts("STUB: dsDataListRemoveNodes called");
274      return NULL;
275  }
276  
277  void* dsDataListRemoveThisNode(void) {
278      if (verbose) puts("STUB: dsDataListRemoveThisNode called");
279      return NULL;
280  }
281  
282  void* dsDataNodeAllocateBlock(void) {
283      if (verbose) puts("STUB: dsDataNodeAllocateBlock called");
284      return NULL;
285  }
286  
287  void* dsDataNodeAllocateString(void) {
288      if (verbose) puts("STUB: dsDataNodeAllocateString called");
289      return NULL;
290  }
291  
292  void* dsDataNodeDeAllocate(void) {
293      if (verbose) puts("STUB: dsDataNodeDeAllocate called");
294      return NULL;
295  }
296  
297  void* dsDataNodeGetLength(void) {
298      if (verbose) puts("STUB: dsDataNodeGetLength called");
299      return NULL;
300  }
301  
302  void* dsDataNodeGetSize(void) {
303      if (verbose) puts("STUB: dsDataNodeGetSize called");
304      return NULL;
305  }
306  
307  void* dsDataNodeSetLength(void) {
308      if (verbose) puts("STUB: dsDataNodeSetLength called");
309      return NULL;
310  }
311  
312  void* dsDeallocAttributeEntry(void) {
313      if (verbose) puts("STUB: dsDeallocAttributeEntry called");
314      return NULL;
315  }
316  
317  void* dsDeallocAttributeValueEntry(void) {
318      if (verbose) puts("STUB: dsDeallocAttributeValueEntry called");
319      return NULL;
320  }
321  
322  void* dsDeallocRecordEntry(void) {
323      if (verbose) puts("STUB: dsDeallocRecordEntry called");
324      return NULL;
325  }
326  
327  void* dsDeleteRecord(void) {
328      if (verbose) puts("STUB: dsDeleteRecord called");
329      return NULL;
330  }
331  
332  void* dsDoAttributeValueSearch(void) {
333      if (verbose) puts("STUB: dsDoAttributeValueSearch called");
334      return NULL;
335  }
336  
337  void* dsDoAttributeValueSearchWithData(void) {
338      if (verbose) puts("STUB: dsDoAttributeValueSearchWithData called");
339      return NULL;
340  }
341  
342  void* dsDoDirNodeAuth(void) {
343      if (verbose) puts("STUB: dsDoDirNodeAuth called");
344      return NULL;
345  }
346  
347  void* dsDoDirNodeAuthOnRecordType(void) {
348      if (verbose) puts("STUB: dsDoDirNodeAuthOnRecordType called");
349      return NULL;
350  }
351  
352  void* dsDoMultipleAttributeValueSearch(void) {
353      if (verbose) puts("STUB: dsDoMultipleAttributeValueSearch called");
354      return NULL;
355  }
356  
357  void* dsDoMultipleAttributeValueSearchWithData(void) {
358      if (verbose) puts("STUB: dsDoMultipleAttributeValueSearchWithData called");
359      return NULL;
360  }
361  
362  void* dsDoPlugInCustomCall(void) {
363      if (verbose) puts("STUB: dsDoPlugInCustomCall called");
364      return NULL;
365  }
366  
367  void* dsFillAuthBuffer(void) {
368      if (verbose) puts("STUB: dsFillAuthBuffer called");
369      return NULL;
370  }
371  
372  void* dsFindDirNodes(void) {
373      if (verbose) puts("STUB: dsFindDirNodes called");
374      return NULL;
375  }
376  
377  void* dsFlushRecord(void) {
378      if (verbose) puts("STUB: dsFlushRecord called");
379      return NULL;
380  }
381  
382  void* dsGetAttributeEntry(void) {
383      if (verbose) puts("STUB: dsGetAttributeEntry called");
384      return NULL;
385  }
386  
387  void* dsGetAttributeValue(void) {
388      if (verbose) puts("STUB: dsGetAttributeValue called");
389      return NULL;
390  }
391  
392  void* dsGetCustomAllocate(void) {
393      if (verbose) puts("STUB: dsGetCustomAllocate called");
394      return NULL;
395  }
396  
397  void* dsGetCustomThread(void) {
398      if (verbose) puts("STUB: dsGetCustomThread called");
399      return NULL;
400  }
401  
402  void* dsGetDataLength(void) {
403      if (verbose) puts("STUB: dsGetDataLength called");
404      return NULL;
405  }
406  
407  void* dsGetDirNodeCount(void) {
408      if (verbose) puts("STUB: dsGetDirNodeCount called");
409      return NULL;
410  }
411  
412  void* dsGetDirNodeCountWithInfo(void) {
413      if (verbose) puts("STUB: dsGetDirNodeCountWithInfo called");
414      return NULL;
415  }
416  
417  void* dsGetDirNodeInfo(void) {
418      if (verbose) puts("STUB: dsGetDirNodeInfo called");
419      return NULL;
420  }
421  
422  void* dsGetDirNodeList(void) {
423      if (verbose) puts("STUB: dsGetDirNodeList called");
424      return NULL;
425  }
426  
427  void* dsGetDirNodeName(void) {
428      if (verbose) puts("STUB: dsGetDirNodeName called");
429      return NULL;
430  }
431  
432  void* dsGetNextAttributeEntry(void) {
433      if (verbose) puts("STUB: dsGetNextAttributeEntry called");
434      return NULL;
435  }
436  
437  void* dsGetNextAttributeValue(void) {
438      if (verbose) puts("STUB: dsGetNextAttributeValue called");
439      return NULL;
440  }
441  
442  void* dsGetPathFromList(void) {
443      if (verbose) puts("STUB: dsGetPathFromList called");
444      return NULL;
445  }
446  
447  void* dsGetRecordAttributeInfo(void) {
448      if (verbose) puts("STUB: dsGetRecordAttributeInfo called");
449      return NULL;
450  }
451  
452  void* dsGetRecordAttributeValueByID(void) {
453      if (verbose) puts("STUB: dsGetRecordAttributeValueByID called");
454      return NULL;
455  }
456  
457  void* dsGetRecordAttributeValueByIndex(void) {
458      if (verbose) puts("STUB: dsGetRecordAttributeValueByIndex called");
459      return NULL;
460  }
461  
462  void* dsGetRecordAttributeValueByValue(void) {
463      if (verbose) puts("STUB: dsGetRecordAttributeValueByValue called");
464      return NULL;
465  }
466  
467  void* dsGetRecordEntry(void) {
468      if (verbose) puts("STUB: dsGetRecordEntry called");
469      return NULL;
470  }
471  
472  void* dsGetRecordList(void) {
473      if (verbose) puts("STUB: dsGetRecordList called");
474      return NULL;
475  }
476  
477  void* dsGetRecordNameFromEntry(void) {
478      if (verbose) puts("STUB: dsGetRecordNameFromEntry called");
479      return NULL;
480  }
481  
482  void* dsGetRecordReferenceInfo(void) {
483      if (verbose) puts("STUB: dsGetRecordReferenceInfo called");
484      return NULL;
485  }
486  
487  void* dsGetRecordTypeFromEntry(void) {
488      if (verbose) puts("STUB: dsGetRecordTypeFromEntry called");
489      return NULL;
490  }
491  
492  void* dsOpenDirNode(void) {
493      if (verbose) puts("STUB: dsOpenDirNode called");
494      return NULL;
495  }
496  
497  void* dsOpenDirService(void) {
498      if (verbose) puts("STUB: dsOpenDirService called");
499      return NULL;
500  }
501  
502  void* dsOpenDirServiceLocal(void) {
503      if (verbose) puts("STUB: dsOpenDirServiceLocal called");
504      return NULL;
505  }
506  
507  void* dsOpenDirServiceProxy(void) {
508      if (verbose) puts("STUB: dsOpenDirServiceProxy called");
509      return NULL;
510  }
511  
512  void* dsOpenRecord(void) {
513      if (verbose) puts("STUB: dsOpenRecord called");
514      return NULL;
515  }
516  
517  void* dsParseAuthAuthority(void) {
518      if (verbose) puts("STUB: dsParseAuthAuthority called");
519      return NULL;
520  }
521  
522  void* dsParseAuthAuthorityExtended(void) {
523      if (verbose) puts("STUB: dsParseAuthAuthorityExtended called");
524      return NULL;
525  }
526  
527  void* dsRegisterCustomMemory(void) {
528      if (verbose) puts("STUB: dsRegisterCustomMemory called");
529      return NULL;
530  }
531  
532  void* dsRegisterCustomThread(void) {
533      if (verbose) puts("STUB: dsRegisterCustomThread called");
534      return NULL;
535  }
536  
537  void* dsReleaseContinueData(void) {
538      if (verbose) puts("STUB: dsReleaseContinueData called");
539      return NULL;
540  }
541  
542  void* dsRemoveAttribute(void) {
543      if (verbose) puts("STUB: dsRemoveAttribute called");
544      return NULL;
545  }
546  
547  void* dsRemoveAttributeValue(void) {
548      if (verbose) puts("STUB: dsRemoveAttributeValue called");
549      return NULL;
550  }
551  
552  void* dsServiceInformationAllocate(void) {
553      if (verbose) puts("STUB: dsServiceInformationAllocate called");
554      return NULL;
555  }
556  
557  void* dsSetAttributeValue(void) {
558      if (verbose) puts("STUB: dsSetAttributeValue called");
559      return NULL;
560  }
561  
562  void* dsSetAttributeValues(void) {
563      if (verbose) puts("STUB: dsSetAttributeValues called");
564      return NULL;
565  }
566  
567  void* dsSetRecordName(void) {
568      if (verbose) puts("STUB: dsSetRecordName called");
569      return NULL;
570  }
571  
572  void* dsSetRecordType(void) {
573      if (verbose) puts("STUB: dsSetRecordType called");
574      return NULL;
575  }
576  
577  void* dsUnRegisterCustomMemory(void) {
578      if (verbose) puts("STUB: dsUnRegisterCustomMemory called");
579      return NULL;
580  }
581  
582  void* dsUnRegisterCustomThread(void) {
583      if (verbose) puts("STUB: dsUnRegisterCustomThread called");
584      return NULL;
585  }
586  
587  void* dsVerifyDirRefNum(void) {
588      if (verbose) puts("STUB: dsVerifyDirRefNum called");
589      return NULL;
590  }