Mac-Carbon
view release on metacpan or search on metacpan
InternetConfig/InternetConfig.xs view on Meta::CPAN
=item ICGeneralFindConfigFile INST, SEARCH_PREFS, CAN_CREATE
=item ICGeneralFindConfigFile INST
B<Mac OS only.>
It is illegal to call this routine inside a ICBegin/End pair.
Call to configure this connection to IC.
This routine acts as a more general replacement for
ICFindConfigFile and ICFindUserConfigFile.
Set search_prefs to 1 (default) if you want it to search the preferences folder.
Set can_create to 1 if you want it to be able to create a new config.
Set count as the number of valid elements in folders.
Set folders to a pointer to the folders to search.
Setting count to 0 and folders to nil is OK.
Searches the specified folders and then optionally the Preferences folder
in a unspecified manner.
=cut
MacOSRet
ICGeneralFindConfigFile(inst, search_prefs=1, can_create=0, ...)
ICInstance inst;
Boolean search_prefs;
Boolean can_create;
PREINIT:
int i;
short count;
FSSpec spec;
ICDirSpec spex[8];
CODE:
#ifndef MACOS_TRADITIONAL
croak("Usage: Mac::InternetConfig::ICGeneralFindConfigFile unsupported in Carbon");
#else
count = 0;
for (i=3; i<items; ++i)
if (!GUSIPath2FSp((char *) SvPV_nolen(ST(i)), &spec) && !GUSIFSpDown(&spec, "\p")) {
spex[count].vRefNum = spec.vRefNum;
spex[count].dirID = spec.parID;
++count;
}
RETVAL = ICGeneralFindConfigFile(inst, search_prefs, can_create, count, (ICDirSpecArrayPtr) spex);
#endif
OUTPUT:
RETVAL
=item ICChooseConfig INST
B<Mac OS only.>
Requires IC 1.2.
It is illegal to call this routine inside a ICBegin/End pair.
InternetConfig/InternetConfig.xs view on Meta::CPAN
#else
RETVAL = ICSetConfigReference(inst, (ICConfigRefHandle) ref, flags);
#endif
OUTPUT:
RETVAL
=item ICGetSeed INST
You do not have to specify a configuration before calling this routine.
You do not have to be inside an ICBegin/End pair to call this routine.
Returns the current seed for the IC prefs database.
This seed changes each time a non-volatile preference is changed.
You can poll this to determine if any cached preferences change.
=cut
long
ICGetSeed(inst)
ICInstance inst;
CODE:
if (gMacPerl_OSErr = ICGetSeed(inst, &RETVAL)) {
( run in 2.064 seconds using v1.01-cache-2.11-cpan-0bb4e1dffa6 )